Skip to content

Commit fb4750f

Browse files
committed
maintner: add RPC endpoint for listing Go releases
This change adds an RPC endpoint to maintnerd API server to list the supported Go releases. This is needed and will be used by cmd/coordinator to run subrepo trybots on previous Go release (in addition to current). It's implemented on top of the Gerrit project ref data that the maintner corpus already tracks. A release is considered to be exist for each git tag named "goX", "goX.Y", or "goX.Y.Z". This functionality is also implemented in some other places using data that is further away from the source of truth. Such places can start to use this endpoint instead. Add a subcommand to maintq to invoke the new list Go releases endpoint. Its current output (against a local development maintnerd server): $ go run .../maintner/maintq -server=localhost:6344 list-releases major:1 minor:11 patch:1 tag_name:"go1.11.1" tag_commit:"26957168c4c0cdcc7ca4f0b19d0eb19474d224ac" branch_name:"release-branch.go1.11" branch_commit:"97781d2ed116d2cd9cb870d0b84fc0ec598c9abc" major:1 minor:10 patch:4 tag_name:"go1.10.4" tag_commit:"2191fce26a7fd1cd5b4975e7bd44ab44b1d9dd78" branch_name:"release-branch.go1.10" branch_commit:"e97b7d68f107ff60152f5bd5701e0286f221ee93" Updates golang/go#17626 Change-Id: Ia9ea7f49d421ce0c7a9e85c423aba31572cea52b Reviewed-on: https://go-review.googlesource.com/c/146137 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 82639d0 commit fb4750f

File tree

5 files changed

+500
-33
lines changed

5 files changed

+500
-33
lines changed

maintner/maintnerd/apipb/api.pb.go

Lines changed: 174 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

maintner/maintnerd/apipb/api.proto

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,28 @@ message GerritTryWorkItem {
6262
repeated string go_branch = 6; // "master", "release-branch.go1.8", etc
6363
}
6464

65+
// By default, ListGoReleases returns only the latest patches
66+
// of releases that are considered supported per policy.
67+
message ListGoReleasesRequest {}
68+
69+
message ListGoReleasesResponse {
70+
// Releases are Go releases, sorted with latest release first.
71+
repeated GoRelease releases = 1;
72+
}
73+
74+
message GoRelease {
75+
int32 major = 1;
76+
int32 minor = 2;
77+
int32 patch = 3;
78+
string tag_name = 4; // "go1.11.1", etc.
79+
string tag_commit = 5; // "26957168c4c0cdcc7ca4f0b19d0eb19474d224ac"
80+
81+
// Release branch information for this major-minor version pair.
82+
// Empty if the corresponding release branch doesn't exist.
83+
string branch_name = 6; // "release-branch.go1.11", etc.
84+
string branch_commit = 7; // most recent commit on the release branch, e.g., "edb6c16b9b62ed8586d2e3e422911d646095b7e5"
85+
}
86+
6587
service MaintnerService {
6688
// HasAncestor reports whether one commit contains another commit
6789
// in its git history.
@@ -74,4 +96,8 @@ service MaintnerService {
7496

7597
// GoFindTryWork finds trybot work for the coordinator to build & test.
7698
rpc GoFindTryWork(GoFindTryWorkRequest) returns (GoFindTryWorkResponse);
99+
100+
// ListGoReleases lists Go releases. A release is considered to exist
101+
// if a tag for it exists.
102+
rpc ListGoReleases(ListGoReleasesRequest) returns (ListGoReleasesResponse);
77103
}

0 commit comments

Comments
 (0)