blob: 756d5faad4b2cb89a23c8b7c2e47b0ab09b47837 [file] [log] [blame]
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// https://developers.google.com/protocol-buffers/docs/proto3
syntax = "proto3";
package apipb;
message HasAncestorRequest {
string commit = 1; // full git commit hash (subject of query)
string ancestor = 2; // full git commit hash of sought ancestor
}
message HasAncestorResponse {
// has_ancestor is whether ancestor appears in commit's history.
bool has_ancestor = 1;
// unknown_commit is true if the provided commit was unknown.
bool unknown_commit = 2;
}
message GetRefRequest {
string ref = 1; // "HEAD", "refs/heads/master", etc.
// Either gerrit_server & gerrit_project must be specified, or
// github. Currently only Gerrit is supported.
string gerrit_server = 2; // "go.googlesource.com"
string gerrit_project = 3; // "go"
// TODO: github, if/when needed.
}
message GetRefResponse {
string value = 1; // git commit, or empty string on miss
}
message GoFindTryWorkRequest {
// for_staging says whether this is a trybot request for the staging
// cluster. When using staging, the comment "Run-StagingTryBot"
// is used instead of label:Run-TryBot=1.
bool for_staging = 1;
}
message GoFindTryWorkResponse {
// waiting are the Gerrit CLs wanting a trybot run and not yet with results.
// These might already be running.
repeated GerritTryWorkItem waiting = 1;
}
message GerritTryWorkItem {
string project = 1; // "go", "net", etc. (Gerrit Project)
string branch = 2; // "master", "release-branch.go1.8", etc.
string change_id = 3; // "I1a27695838409259d1586a0adfa9f92bccf7ceba"
string commit = 4; // "ecf3dffc81dc21408fb02159af352651882a8383"
// go_commit is set for subrepos and is the Go commit(s) to test against.
// go_branch is a branch name of go_commit, for showing to users when
// a try set fails.
repeated string go_commit = 5; // "4833e920c1d7f6b23458e6ff3c73951fcf754219"
repeated string go_branch = 6; // "master", "release-branch.go1.8", etc.
// go_version specifies the major and minor version of the targeted Go toolchain.
// For Go repo, it contains exactly one element.
// For subrepos, it contains elements that correspond to go_commit.
repeated MajorMinor go_version = 7;
}
message MajorMinor {
int32 major = 1;
int32 minor = 2;
}
message ListGoReleasesRequest {}
message ListGoReleasesResponse {
repeated GoRelease releases = 1;
}
message GoRelease {
int32 major = 1;
int32 minor = 2;
int32 patch = 3;
string tag_name = 4; // "go1.11.1", etc.
string tag_commit = 5; // "26957168c4c0cdcc7ca4f0b19d0eb19474d224ac"
// Release branch information for this major-minor version pair.
string branch_name = 6; // "release-branch.go1.11", etc.
string branch_commit = 7; // most recent commit on the release branch, e.g., "edb6c16b9b62ed8586d2e3e422911d646095b7e5"
}
service MaintnerService {
// HasAncestor reports whether one commit contains another commit
// in its git history.
rpc HasAncestor(HasAncestorRequest) returns (HasAncestorResponse);
// GetRef returns information about a git ref.
rpc GetRef(GetRefRequest) returns (GetRefResponse);
// Go-specific methods:
// GoFindTryWork finds trybot work for the coordinator to build & test.
rpc GoFindTryWork(GoFindTryWorkRequest) returns (GoFindTryWorkResponse);
// ListGoReleases lists Go releases sorted by version with latest first.
//
// A release is considered to exist for each git tag named "goX", "goX.Y", or
// "goX.Y.Z", as long as it has a corresponding "release-branch.goX" or
// "release-branch.goX.Y" release branch.
//
// ListGoReleases returns only the latest patch versions of releases which
// are considered supported per policy. For example, Go 1.12.6 and 1.11.11.
// The response is guaranteed to have two versions, otherwise an error
// is returned.
rpc ListGoReleases(ListGoReleasesRequest) returns (ListGoReleasesResponse);
}