golang.org/x/build@v0.0.0-20240506185731-218518f32b70/maintner/maintnerd/apipb/api.proto (about) 1 // Copyright 2017 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // https://developers.google.com/protocol-buffers/docs/proto3 6 syntax = "proto3"; 7 8 package apipb; 9 10 option go_package = "golang.org/x/build/maintner/maintnerd/apipb"; 11 12 message HasAncestorRequest { 13 string commit = 1; // full git commit hash (subject of query) 14 string ancestor = 2; // full git commit hash of sought ancestor 15 } 16 17 message HasAncestorResponse { 18 // has_ancestor is whether ancestor appears in commit's history. 19 bool has_ancestor = 1; 20 21 // unknown_commit is true if the provided commit was unknown. 22 bool unknown_commit = 2; 23 } 24 25 26 message GetRefRequest { 27 string ref = 1; // "HEAD", "refs/heads/master", etc. 28 29 // Either gerrit_server & gerrit_project must be specified, or 30 // github. Currently only Gerrit is supported. 31 string gerrit_server = 2; // "go.googlesource.com" 32 string gerrit_project = 3; // "go" 33 34 // TODO: github, if/when needed. 35 } 36 37 message GetRefResponse { 38 string value = 1; // git commit, or empty string on miss 39 } 40 41 message GoFindTryWorkRequest { 42 // for_staging says whether this is a trybot request for the staging 43 // cluster. When using staging, the comment "Run-StagingTryBot" 44 // is used instead of label:Run-TryBot=1. 45 bool for_staging = 1; 46 } 47 48 message GoFindTryWorkResponse { 49 // waiting are the Gerrit CLs wanting a trybot run and not yet with results. 50 // These might already be running. 51 repeated GerritTryWorkItem waiting = 1; 52 } 53 54 message GerritTryWorkItem { 55 string project = 1; // "go", "net", etc. (Gerrit Project) 56 string branch = 2; // "master", "release-branch.go1.8", etc. 57 string change_id = 3; // "I1a27695838409259d1586a0adfa9f92bccf7ceba" 58 string commit = 4; // "ecf3dffc81dc21408fb02159af352651882a8383" 59 60 // go_commit is set for subrepos and is the Go commit(s) to test against. 61 // go_branch is a branch name of go_commit, for showing to users when 62 // a try set fails. 63 repeated string go_commit = 5; // "4833e920c1d7f6b23458e6ff3c73951fcf754219" 64 repeated string go_branch = 6; // "master", "release-branch.go1.8", etc. 65 66 // go_version specifies the major and minor version of the targeted Go toolchain. 67 // For Go repo, it contains exactly one element. 68 // For subrepos, it contains elements that correspond to go_commit. 69 repeated MajorMinor go_version = 7; 70 71 // try_message is the list of TRY=xxxx messages associated with Run-TryBot votes. 72 // It's sorted from oldest to newest. 73 repeated TryVoteMessage try_message = 8; 74 75 int32 version = 9; // which Gerrit revision number commit is 76 string author_email = 10; // "foo@bar.com" 77 } 78 79 message TryVoteMessage { 80 string message = 1; // just the part after "TRY=" until end of line, without \n 81 int64 author_id = 2; // Gerrit-internal ID 82 int32 version = 3; // revision number comment was for 83 } 84 85 message MajorMinor { 86 int32 major = 1; 87 int32 minor = 2; 88 } 89 90 message ListGoReleasesRequest {} 91 92 message ListGoReleasesResponse { 93 repeated GoRelease releases = 1; 94 } 95 96 message GoRelease { 97 int32 major = 1; 98 int32 minor = 2; 99 int32 patch = 3; 100 string tag_name = 4; // "go1.11.1", etc. 101 string tag_commit = 5; // "26957168c4c0cdcc7ca4f0b19d0eb19474d224ac" 102 103 // Release branch information for this major-minor version pair. 104 string branch_name = 6; // "release-branch.go1.11", etc. 105 string branch_commit = 7; // most recent commit on the release branch, e.g., "edb6c16b9b62ed8586d2e3e422911d646095b7e5" 106 } 107 108 message DashboardRequest { 109 // page is the zero-based page number. 110 // TODO: deprecate, replace with time or commit continuation token. 111 int32 page = 1; 112 113 // repo is which repo to show ("go", "golang.org/x/net", "" means go). 114 string repo = 2; 115 116 // branch specifies which branch to show ("master", "release-branch.go1.13"). 117 // Empty means "master". 118 // The special branch value "mixed" means to blend together all branches by commit time. 119 string branch = 3; 120 121 // max_commits specifies the number of commits that are desired. 122 // Zero means to use a default. 123 int32 max_commits = 4; 124 } 125 126 message DashboardResponse { 127 // commits are the commits to display, starting with the newest. 128 repeated DashCommit commits = 1; 129 130 // commits_truncated is whether the returned commits were truncated. 131 bool commits_truncated = 5; 132 133 // repo_heads contains the current head commit (of their master 134 // branch) for every repo on Go's Gerrit server. 135 repeated DashRepoHead repo_heads = 2; 136 137 repeated string branches = 3; 138 139 // releases is the same content is ListGoReleasesResponse, but with the addition of a "master" 140 // release first, containing the info for the "master" branch, which is just commits[0] 141 // if page 0. But if page != 0, the master head wouldn't be 142 // available otherwise, so we denormalize it a bit here: 143 // It's sorted from newest to oldest (master, release-branch.go1.latest, release-branch.go1.prior) 144 // Only the branch_name and branch_commit fields are guaranteed to be populated. 145 repeated GoRelease releases = 4; 146 } 147 148 message DashCommit { 149 // commit is the git commit hash ("26957168c4c0cdcc7ca4f0b19d0eb19474d224ac"). 150 string commit = 1; 151 152 // author_name is the git author name part ("Foo Bar"). 153 string author_name = 2; // "Foo Bar" 154 155 // author_email is the git author email part ("foo@bar.com"). 156 string author_email = 3; // "foo@bar.com" 157 158 // commit_time_sec is the timestamp of git commit time, in unix seconds. 159 int64 commit_time_sec = 4; 160 161 // title is the git commit's first line ("runtime: fix all the bugs"). 162 string title = 5; 163 164 // branch is the branch this commit was queried from ("master", "release-branch.go1.14")/ 165 // This is normally redundant but is useful when DashboardRequest.branch == "mixed". 166 string branch = 7; 167 168 // For non-go repos, go_commit_at_time is what the Go master commit was at 169 // the time of DashCommit.commit_time. 170 string go_commit_at_time = 6; 171 172 // For non-go repos, go_commit_latest is the most recent Go master commit that's 173 // older than the following x/foo commit's commit_time. 174 // If DashCommit is the current HEAD, go_commit_at_time can continue to update. 175 // go_commit_at_time might be the same as go_commit_at_time. 176 string go_commit_latest = 8; 177 } 178 179 message DashRepoHead { 180 // gerrit_project is Gerrit project name ("net", "go"). 181 string gerrit_project = 1; 182 183 // commit is the current top-level commit in that project. 184 // (currently always on the master branch) 185 DashCommit commit = 2; 186 } 187 188 service MaintnerService { 189 // HasAncestor reports whether one commit contains another commit 190 // in its git history. 191 rpc HasAncestor(HasAncestorRequest) returns (HasAncestorResponse); 192 193 // GetRef returns information about a git ref. 194 rpc GetRef(GetRefRequest) returns (GetRefResponse); 195 196 // Go-specific methods: 197 198 // GoFindTryWork finds trybot work for the coordinator to build & test. 199 rpc GoFindTryWork(GoFindTryWorkRequest) returns (GoFindTryWorkResponse); 200 201 // ListGoReleases lists Go releases sorted by version with latest first. 202 // 203 // A release is considered to exist for each git tag named "goX", "goX.Y", or 204 // "goX.Y.Z", as long as it has a corresponding "release-branch.goX" or 205 // "release-branch.goX.Y" release branch. 206 // 207 // ListGoReleases returns only the latest patch versions of releases which 208 // are considered supported per policy. For example, Go 1.12.6 and 1.11.11. 209 // The response is guaranteed to have two versions, otherwise an error 210 // is returned. 211 rpc ListGoReleases(ListGoReleasesRequest) returns (ListGoReleasesResponse); 212 213 // GetDashboard returns the information for the build.golang.org 214 // dashboard. It does not (at least currently) 215 // contain any pass/fail information; it only contains information on the branches 216 // and commits themselves. 217 rpc GetDashboard(DashboardRequest) returns (DashboardResponse); 218 }