1// SPDX-License-Identifier: MIT
2
3syntax = "proto3";
4
5package ermite;
6
7import "ermite/runner.proto";
8import "google/protobuf/timestamp.proto";
9
10// Run is one execution of one workflow file for one event, like a GitHub
11// workflow run. A re-run keeps the run and adds an attempt.
12message Run {
13 // Repo is the name of the repository.
14 string repo = 1;
15 // Id identifies the run on the whole server: it is the "github.run_id".
16 // Increasing, never reused.
17 int64 id = 2;
18 // Number counts the runs of the same workflow file in the repository,
19 // starting at 1, never reused: it is the "github.run_number". It does not
20 // change on a re-run.
21 int64 number = 3;
22 // Attempt is the attempt this message describes: 1 for the first, one more
23 // after each RerunRun. ListRuns and events describe the latest attempt;
24 // GetRun can ask for another one.
25 int32 attempt = 4;
26 // WorkflowPath is the path of the workflow file at sha, for example
27 // ".github/workflows/ci.yml".
28 string workflow_path = 5;
29 // WorkflowName is the "name" of the workflow, or workflow_path when it has
30 // none (as GitHub does). It is the "github.workflow" of the run and the
31 // workflow name of its checks. See name for the name of the run itself.
32 string workflow_name = 6;
33 // Title is GitHub's display title, at most 256 characters: the evaluated
34 // "run-name" of the workflow when it has one, else for a push to a branch
35 // the first line of the message of the commit sha, and for a push of a tag
36 // the name of the workflow registered for workflow_path (the "name" of that
37 // file on the default branch, else workflow_name).
38 string title = 7;
39 // Event is the event that triggered the run, in GitHub's name: "push" (the
40 // only one for now; push to a branch or a tag, and merge of a merge
41 // request). New values may be added; clients show the ones they do not
42 // know as they are.
43 string event = 8;
44 // Ref is the full ref name that was pushed, for example "refs/heads/main"
45 // or "refs/tags/v1.0.0".
46 string ref = 9;
47 // Sha is the full id of the commit the run is for.
48 string sha = 10;
49 // Actor names who triggered the run: the label of the token that pushed, or
50 // "root", or "owner" (a web session, a merge of the web UI), as
51 // MergeRequest.author. It is informational.
52 string actor = 11;
53 // Status is where this attempt is: QUEUED until a job starts, IN_PROGRESS
54 // while jobs run or wait, COMPLETED when every job is over.
55 CiStatus status = 12;
56 // Conclusion is how this attempt ended, from its jobs' conclusions like
57 // GitHub: CANCELLED if it was cancelled, else FAILURE if a job failed or
58 // timed out, else SUCCESS (also when jobs were skipped). Unset until
59 // status is COMPLETED.
60 CiConclusion conclusion = 13;
61 // Error is set when the run failed without running a job because the
62 // workflow could not be used: an invalid workflow file (the run then has
63 // no jobs and conclusion FAILURE), as GitHub's "Invalid workflow file".
64 // It holds the errors with their positions, one per line, at most 8 KiB.
65 // Empty otherwise.
66 string error = 14;
67 // CreatedAt is when this attempt was created: for attempt 1 when the
68 // trigger was planned, for later ones when RerunRun was called.
69 google.protobuf.Timestamp created_at = 15;
70 // StartedAt is when the first job of this attempt was given to a runner.
71 // Unset until then.
72 google.protobuf.Timestamp started_at = 16;
73 // CompletedAt is when this attempt completed. Unset until then.
74 google.protobuf.Timestamp completed_at = 17;
75 // Version counts the changes of this run on the server: it grows by at least
76 // one at every change and never goes back, also across attempts. Events are
77 // not delivered in order, and a client that holds two copies of a run keeps
78 // the one with the higher version and drops the other.
79 int64 version = 18;
80 // Name is the name of the run, GitHub's "name" of a workflow run: the
81 // evaluated "run-name" of the workflow when it has one, else the same value
82 // as workflow_name. It is what GitHub lists as the run's name, whereas
83 // workflow_name stays the name of the workflow ("github.workflow") even when
84 // the workflow has a "run-name". A run stored before this field existed
85 // reads as workflow_name.
86 string name = 19;
87}
88
89// RunJob is a job of a run as people see it: the state of one job instance
90// (one matrix combination is one job) in one attempt. It is not Job, which is
91// what a runner receives.
92message RunJob {
93 // Id is the Job.job_id. It is the same in every attempt.
94 string id = 1;
95 // RunId is the run the job belongs to.
96 int64 run_id = 2;
97 // Attempt is the attempt of the run in which this job executed. It is lower
98 // than the attempt of the run when the job was kept from an earlier attempt
99 // by a re-run of the failed jobs only; the log and steps are then those of
100 // that earlier attempt. Pass it to GetJob and GetJobLog.
101 int32 attempt = 3;
102 // Repo is the name of the repository.
103 string repo = 4;
104 // Key is the key of the job under "jobs:" in the workflow (the
105 // "github.job"). Matrix instances of one job share it.
106 string key = 5;
107 // Name is the display name of the job, evaluated, with the matrix suffix as
108 // GitHub names them, for example "build (linux, 1.27)". It is also the
109 // name of the job's check.
110 string name = 6;
111 // Status is where the job is. A job waits QUEUED for a runner and for the
112 // jobs it needs.
113 CiStatus status = 7;
114 // Conclusion is how the job ended. Unset until status is COMPLETED.
115 CiConclusion conclusion = 8;
116 // Error explains a FAILURE, CANCELLED or TIMED_OUT that no step explains, in
117 // GitHub's words where it has them: the runner was lost ("The self-hosted
118 // runner: <name> lost communication with the server..."), it received a
119 // shutdown signal, no runner took the job within 24 hours, the log limit
120 // was reached, the workflow uses a feature that is not supported yet
121 // ("not supported yet: <feature>"). At most 4 KiB. Empty otherwise.
122 string error = 9;
123 // Labels are the runs-on labels of the job, evaluated. Empty while the job
124 // is not planned yet.
125 repeated string labels = 10;
126 // Needs are the keys of the jobs this job needs, for drawing the graph.
127 repeated string needs = 11;
128 // RunnerId is the id of the runner that executed or is executing the job.
129 // Empty while queued, and when the runner has since been removed (runner_name
130 // and isolation are kept).
131 string runner_id = 12;
132 // RunnerName is the name of that runner. Empty while queued.
133 string runner_name = 13;
134 // Isolation is how that runner isolated the job. UNSPECIFIED while queued.
135 RunnerIsolation isolation = 14;
136 // Steps are the steps reported so far, ordered by number, including the
137 // implicit "Set up job" and "Complete job". Empty while queued. Always
138 // set, including in JobUpdated events.
139 repeated Step steps = 15;
140 // CreatedAt is when the job was created (planned).
141 google.protobuf.Timestamp created_at = 16;
142 // StartedAt is when the job was given to a runner. Unset until then.
143 google.protobuf.Timestamp started_at = 17;
144 // CompletedAt is when the job completed. Unset until then.
145 google.protobuf.Timestamp completed_at = 18;
146 // Version counts the changes of this job on the server (status, conclusion,
147 // runner, steps, with any attempt): it grows by at least one at every change
148 // and never goes back. A client that holds two copies of a job keeps the
149 // one with the higher version and drops the other, as for Run.version.
150 int64 version = 19;
151}
152
153// Step is one step of a job, with where its lines are in the job log.
154message Step {
155 // Number is the 1-based number of the step in the job, the one the runner
156 // uses in UpdateJob and AppendLog.
157 int32 number = 1;
158 // Name is the display name of the step.
159 string name = 2;
160 // State is where the step is.
161 StepState state = 3;
162 // Conclusion is how the step ended. Unset until state is COMPLETED.
163 CiConclusion conclusion = 4;
164 // StartedAt is when the step started. Unset while PENDING.
165 google.protobuf.Timestamp started_at = 5;
166 // CompletedAt is when the step ended. Unset until COMPLETED.
167 google.protobuf.Timestamp completed_at = 6;
168 // LogStart is the number of the first line of the step in the job log (the
169 // offset of GetJobLogRequest and AppendLogRequest), counted from 0.
170 int64 log_start = 7;
171 // LogEnd is the number of the line after the last one of the step. For an
172 // IN_PROGRESS step it is the number of lines held at the time of the
173 // call and grows; for a step without a line it equals log_start.
174 int64 log_end = 8;
175 // Outcome is how the step ended before continue-on-error was applied, as
176 // StepUpdate.outcome: it differs from conclusion only for a failed step with
177 // continue-on-error. Unset until state is COMPLETED, and for a step stored
178 // by a server or runner before this field existed (read it as conclusion).
179 CiConclusion outcome = 9;
180}
181
182// Check is the result of one job on one commit, the unit shown next to a
183// commit or a merge request and counted by the merge rules. There is one per
184// job instance, named like GitHub's checks.
185message Check {
186 // Id identifies the check. It is opaque and stable across attempts.
187 string id = 1;
188 // Repo is the name of the repository.
189 string repo = 2;
190 // Sha is the full id of the commit.
191 string sha = 3;
192 // Name is the name of the check: the RunJob.name of the job.
193 string name = 4;
194 // Status is where the check is.
195 CiStatus status = 5;
196 // Conclusion is how the check ended. Unset until status is COMPLETED. The
197 // value "stale" of GitHub is never used.
198 CiConclusion conclusion = 6;
199 // RunId is the run of the job.
200 int64 run_id = 7;
201 // JobId is the RunJob.id of the job, to open its page and log.
202 string job_id = 8;
203 // Attempt is the attempt the check describes: the latest attempt of the run.
204 int32 attempt = 9;
205 // WorkflowName is the Run.workflow_name of the run.
206 string workflow_name = 10;
207 // StartedAt is when the job was given to a runner. Unset while queued.
208 google.protobuf.Timestamp started_at = 11;
209 // CompletedAt is when the job completed. Unset until then.
210 google.protobuf.Timestamp completed_at = 12;
211}
212
213// Runner is a registered CI runner. It never contains the runner token nor its
214// hash.
215message Runner {
216 // Id identifies the runner in RemoveRunner. It is not a secret.
217 string id = 1;
218 // Name is the unique name chosen at registration.
219 string name = 2;
220 // Labels are all the labels the runner can match: the ones chosen at
221 // registration plus the implicit ones ("self-hosted", the os and the arch),
222 // lowercase, sorted.
223 repeated string labels = 3;
224 // Isolation is how the runner isolates jobs.
225 RunnerIsolation isolation = 4;
226 // Version is the version of the runner software.
227 string version = 5;
228 // Arch is "x64" or "arm64".
229 string arch = 6;
230 // Os is "linux".
231 string os = 7;
232 // RegisteredAt is when the runner was registered.
233 google.protobuf.Timestamp registered_at = 8;
234 // LastSeen is when the server last heard from the runner: a FetchJob poll or
235 // a heartbeat of one of its jobs. Unset if never. It may lag behind the real
236 // time by a short delay. A runner not seen for more than about 2 minutes is
237 // offline.
238 google.protobuf.Timestamp last_seen = 9;
239 // Busy is true while the runner has a job in progress.
240 bool busy = 10;
241}
242
243// RunService reads and controls CI runs, like `gh run` does on GitHub. It is for
244// owners and their tools; runners use RunnerService.
245//
246// Runs, jobs, checks, logs, annotations and summaries belong to a repository,
247// and reading them needs the same access as reading it: nothing for a public
248// repository, the repo:read scope for a private one. A repository that does not exist or that
249// the caller cannot read gives not_found; so does a run or a job that belongs
250// to another repository than the one named (ids are global but are always
251// checked against the repository). Cancelling and re-running need the ci:write
252// scope on the repository (a token restricted to other repositories gets
253// permission_denied). The runner RPCs (ListRunners, RemoveRunner) are not about
254// a repository and need the runner:register scope on a token that is not
255// restricted to repositories, or the root token. A caller without the needed
256// scope gets permission_denied.
257//
258// Page sizes and page tokens work as in the other services: page_size 0 is the
259// server default, larger values are lowered to the server maximum, and a
260// page_token is the next_page_token of a previous response for the same
261// request (other fields must be unchanged).
262//
263// Servers that implement the runs side (every RPC but ListRunners,
264// RemoveRunner, ListAnnotations and GetStepSummaries) list "ci.runs" in
265// GetVersionResponse.features; those that
266// implement the runners side list "ci.runners", as RunnerService does. A server
267// that honours the filters of ListRunsRequest also lists "ci.runs.filters".
268// ListAnnotations needs "ci.annotations" and GetStepSummaries "ci.summaries",
269// which are also the features of the runner side of each.
270service RunService {
271 // ListRuns lists the runs of a repository, highest id (newest) first. Each
272 // run is described by its latest attempt. The filters narrow the result; a
273 // server without the feature "ci.runs.filters" ignores them and returns
274 // every run, so a client that needs them checks the feature. Fails with
275 // invalid_argument if a filter is malformed.
276 rpc ListRuns(ListRunsRequest) returns (ListRunsResponse);
277 // GetRun returns a run with its jobs and their steps, for the latest attempt
278 // or for the one asked. Fails with not_found if the run or the attempt does
279 // not exist.
280 rpc GetRun(GetRunRequest) returns (GetRunResponse);
281 // GetJob returns one job with its steps. Fails with not_found if the job
282 // or the attempt does not exist.
283 rpc GetJob(GetJobRequest) returns (GetJobResponse);
284 // ListAnnotations lists the annotations of a run attempt, optionally of one
285 // job, ordered by job (as in GetRun), step number, then the order in which
286 // the step produced them. For each job it gives the annotations of the
287 // attempt in which that job executed (RunJob.attempt), which is lower than
288 // the attempt of the run for a job kept by a re-run of failed jobs only. Needs the same access as GetRun. Returns at most
289 // 1,000 annotations (truncated tells). A run without annotations gives an
290 // empty list. Only servers with the feature "ci.annotations" implement it
291 // (unimplemented otherwise). Fails with not_found if the run, the attempt or
292 // the job does not exist, or if the job is not a job of the run.
293 rpc ListAnnotations(ListAnnotationsRequest) returns (ListAnnotationsResponse);
294 // GetStepSummaries returns the job summaries (the Markdown written to
295 // GITHUB_STEP_SUMMARY) of the steps of a job that have one, ordered by step
296 // number. Like GitHub, it returns at most 20 summaries per job: the first 20
297 // steps that have one, in step order; truncated says there are more. Needs
298 // the same access as GetJob. Only servers with the feature
299 // "ci.summaries" implement it (unimplemented otherwise). A job without
300 // summaries gives an empty list. Fails with not_found if the job or the
301 // attempt does not exist.
302 rpc GetStepSummaries(GetStepSummariesRequest) returns (GetStepSummariesResponse);
303 // GetJobLog streams the lines of the log of a job, from a line number. The
304 // server sends them in order in messages of at most 1,000 lines and 64 KiB of
305 // text each.
306 //
307 // Without follow, the stream ends after the last line stored when the call
308 // was made. With follow, it goes on as lines arrive, with at most 1 second of
309 // delay after the runner's AppendLog, and ends without error once the job has
310 // completed and all its lines were sent; on a completed job follow changes
311 // nothing. A client that loses the stream calls again with the offset after
312 // the last line it received. The client may cancel at any time.
313 //
314 // Fails with not_found if the job, the attempt or its log does not exist (the
315 // log is removed by the retention sweep, and a queued job has none: with
316 // follow, the call waits for the first line instead), with out_of_range if
317 // offset is beyond the end of the log of a job without follow, and with
318 // resource_exhausted when there are too many concurrent log streams, in
319 // total or from one client. Like Watch, a stream ends with unauthenticated
320 // when the token was revoked or expired.
321 rpc GetJobLog(GetJobLogRequest) returns (stream GetJobLogResponse);
322 // CancelRun asks to cancel the latest attempt of a run. Needs the ci:write
323 // scope. Jobs that have not started are cancelled at once; jobs in progress
324 // get a CANCEL_REASON_USER request through WatchJob, and the run completes
325 // when they have ended, so the returned run may still be IN_PROGRESS.
326 // Cancelling a run that already has a cancellation requested succeeds and
327 // changes nothing. Fails with failed_precondition if the run has completed.
328 rpc CancelRun(CancelRunRequest) returns (CancelRunResponse);
329 // RerunRun starts a new attempt of a completed run: same run id and number,
330 // attempt + 1, same commit and same workflow file as at the original run (the
331 // file of the repository is not read again). Needs the ci:write scope. Fails
332 // with failed_precondition if the latest attempt has not completed, or if
333 // failed_only is set and no job failed. The new attempt is returned QUEUED.
334 rpc RerunRun(RerunRunRequest) returns (RerunRunResponse);
335 // ListChecks lists the checks of a commit: for each job of each run on that
336 // sha, the one of the latest attempt, ordered by creation time then name.
337 // A commit without a run has no check: the list is empty, which is not an
338 // error, and the server does not verify that the commit exists. Returns at
339 // most 1,000 checks (truncated tells).
340 rpc ListChecks(ListChecksRequest) returns (ListChecksResponse);
341 // ListRunners lists the registered runners, ordered by name. Needs the
342 // runner:register scope.
343 rpc ListRunners(ListRunnersRequest) returns (ListRunnersResponse);
344 // RemoveRunner removes a runner: its runner token stops working at once (a
345 // FetchJob in progress ends with unauthenticated) and it no longer gets
346 // jobs. A job it is running is not affected: it ends normally, or fails as
347 // a lost runner without heartbeats. Needs the runner:register scope. Fails
348 // with not_found if the id is unknown.
349 rpc RemoveRunner(RemoveRunnerRequest) returns (RemoveRunnerResponse);
350}
351
352// ListRunsRequest selects a page of runs.
353message ListRunsRequest {
354 // Repo is the repository name.
355 string repo = 1;
356 // PageSize is the maximum number of runs to return.
357 int32 page_size = 2;
358 // PageToken is the next_page_token of a previous response. Empty for the
359 // first page.
360 string page_token = 3;
361 // Workflow restricts the result to one workflow file: its path
362 // (".github/workflows/ci.yml") or its file name ("ci.yml"). Empty means
363 // every workflow. Ignored by servers without "ci.runs.filters".
364 string workflow = 4;
365 // Branch restricts the result to the runs whose ref is this branch, by
366 // short name ("main"). Empty means every ref. Ignored by servers without
367 // "ci.runs.filters".
368 string branch = 5;
369 // Status restricts the result to the runs whose latest attempt has this
370 // status. CI_STATUS_UNSPECIFIED means every status. Ignored by servers
371 // without "ci.runs.filters".
372 CiStatus status = 6;
373}
374
375// ListRunsResponse is one page of runs.
376message ListRunsResponse {
377 // Runs are the runs of this page, highest id first, without jobs.
378 repeated Run runs = 1;
379 // NextPageToken is passed as page_token to get the next page. Empty when
380 // there is no next page.
381 string next_page_token = 2;
382}
383
384// GetRunRequest selects a run.
385message GetRunRequest {
386 // Repo is the repository name.
387 string repo = 1;
388 // RunId is the Run.id.
389 int64 run_id = 2;
390 // Attempt is the attempt to read. 0 means the latest.
391 int32 attempt = 3;
392}
393
394// GetRunResponse holds a run with its jobs.
395message GetRunResponse {
396 // Run is the run, as of the attempt asked.
397 Run run = 1;
398 // Jobs are the jobs of that attempt, with their steps, in the order of the
399 // workflow file (matrix instances in the order of the matrix). Jobs kept from
400 // an earlier attempt by a re-run of failed jobs are included, with their own
401 // RunJob.attempt. Empty for a run that failed on an invalid workflow file.
402 repeated RunJob jobs = 2;
403 // LatestAttempt is the latest attempt of the run, to offer the other ones.
404 int32 latest_attempt = 3;
405}
406
407// GetJobRequest selects a job.
408message GetJobRequest {
409 // Repo is the repository name.
410 string repo = 1;
411 // JobId is the RunJob.id.
412 string job_id = 2;
413 // Attempt is the RunJob.attempt to read. 0 means the latest.
414 int32 attempt = 3;
415}
416
417// GetJobResponse holds a job.
418message GetJobResponse {
419 // Job is the job with its steps.
420 RunJob job = 1;
421}
422
423// ListAnnotationsRequest selects the annotations of a run.
424message ListAnnotationsRequest {
425 // Repo is the repository name.
426 string repo = 1;
427 // RunId is the Run.id.
428 int64 run_id = 2;
429 // Attempt is the attempt to read. 0 means the latest, and then each job
430 // contributes the annotations of its own RunJob.attempt (not necessarily the
431 // latest attempt of the run, see ListAnnotations).
432 int32 attempt = 3;
433 // JobId restricts the result to one job (RunJob.id). Empty means every job
434 // of the run.
435 string job_id = 4;
436}
437
438// ListAnnotationsResponse holds the annotations of a run.
439message ListAnnotationsResponse {
440 // Annotations are the annotations, at most 1,000.
441 repeated JobAnnotation annotations = 1;
442 // Truncated is true when there are more annotations than annotations holds.
443 bool truncated = 2;
444}
445
446// JobAnnotation is an annotation with the job it belongs to.
447message JobAnnotation {
448 // JobId is the RunJob.id of the job.
449 string job_id = 1;
450 // Annotation is the annotation as the runner sent it, after the server
451 // checked it. Its step_number is the step of the job.
452 Annotation annotation = 2;
453}
454
455// GetStepSummariesRequest selects a job.
456message GetStepSummariesRequest {
457 // Repo is the repository name.
458 string repo = 1;
459 // JobId is the RunJob.id.
460 string job_id = 2;
461 // Attempt is the RunJob.attempt to read. 0 means the latest.
462 int32 attempt = 3;
463}
464
465// GetStepSummariesResponse holds the summaries of a job.
466message GetStepSummariesResponse {
467 // Summaries are the summaries of the steps that have one, ordered by step
468 // number: at most 20, the first 20 steps having one.
469 repeated StepSummary summaries = 1;
470 // Truncated is true when the job has more than 20 steps with a summary and
471 // summaries holds only the first 20.
472 bool truncated = 2;
473}
474
475// StepSummary is the job summary of one step.
476message StepSummary {
477 // StepNumber is the number of the step (see Step.number).
478 int32 step_number = 1;
479 // Markdown is the summary as uploaded, at most 1 MiB. Clients render it
480 // safely: it is untrusted content (raw HTML and script URLs must not run).
481 string markdown = 2;
482}
483
484// GetJobLogRequest selects the lines to stream.
485message GetJobLogRequest {
486 // Repo is the repository name.
487 string repo = 1;
488 // JobId is the RunJob.id.
489 string job_id = 2;
490 // Attempt is the RunJob.attempt whose log to read. 0 means the latest.
491 int32 attempt = 3;
492 // Offset is the number of the first line to send, counted from 0 across all
493 // steps (see Step.log_start). Negative is invalid_argument.
494 int64 offset = 4;
495 // Follow keeps the stream open while the job runs. See GetJobLog.
496 bool follow = 5;
497}
498
499// GetJobLogResponse is one message of the log stream.
500message GetJobLogResponse {
501 // Offset is the number of the first line of lines.
502 int64 offset = 1;
503 // Lines are consecutive lines of the log, at most 1,000, at most 64 KiB of
504 // text in total. Never empty.
505 repeated JobLogLine lines = 2;
506}
507
508// JobLogLine is one line of a job log, as the runner sent it.
509message JobLogLine {
510 // Step is the number of the step the line belongs to.
511 int32 step = 1;
512 // Time is when the runner produced the line, with nanosecond precision.
513 google.protobuf.Timestamp time = 2;
514 // Text is the line without its terminator, as in LogLine.text, including the
515 // "##[group]" and "##[endgroup]" markers. Clients show it escaped.
516 string text = 3;
517 // Continued is true when the line continues the line before it, which was
518 // too long for the runner to send whole (see LogLine.continued). Pieces keep
519 // their own line numbers, so offsets are the same as the runner's; a client
520 // that shows lines joins a continued line to the previous one. The raw log
521 // file already has them joined.
522 bool continued = 4;
523}
524
525// CancelRunRequest names the run to cancel.
526message CancelRunRequest {
527 // Repo is the repository name.
528 string repo = 1;
529 // RunId is the Run.id.
530 int64 run_id = 2;
531}
532
533// CancelRunResponse holds the run after the request.
534message CancelRunResponse {
535 // Run is the latest attempt of the run.
536 Run run = 1;
537}
538
539// RerunRunRequest names the run to run again.
540message RerunRunRequest {
541 // Repo is the repository name.
542 string repo = 1;
543 // RunId is the Run.id.
544 int64 run_id = 2;
545 // FailedOnly runs again only the jobs of the latest attempt that did not
546 // succeed (conclusion FAILURE, CANCELLED, TIMED_OUT or ACTION_REQUIRED) and
547 // the jobs that need them, directly or not, even if they were skipped. The
548 // other jobs keep their result, steps and log from the earlier attempt. When
549 // false, every job runs again.
550 bool failed_only = 3;
551}
552
553// RerunRunResponse holds the new attempt.
554message RerunRunResponse {
555 // Run is the run as of the new attempt, QUEUED.
556 Run run = 1;
557}
558
559// ListChecksRequest names the commit.
560message ListChecksRequest {
561 // Repo is the repository name.
562 string repo = 1;
563 // Sha is the full commit id (40 lowercase hexadecimal characters for SHA-1).
564 // Abbreviations and names are invalid_argument.
565 string sha = 2;
566}
567
568// ListChecksResponse holds the checks of a commit.
569message ListChecksResponse {
570 // Checks are the checks of the commit, one per job of the latest attempt of
571 // each run, ordered by creation time then name.
572 repeated Check checks = 1;
573 // Truncated is true when the commit has more checks than checks holds.
574 bool truncated = 2;
575}
576
577// ListRunnersRequest selects a page of runners.
578message ListRunnersRequest {
579 // PageSize is the maximum number of runners to return.
580 int32 page_size = 1;
581 // PageToken is the next_page_token of a previous response. Empty for the
582 // first page.
583 string page_token = 2;
584}
585
586// ListRunnersResponse is one page of runners.
587message ListRunnersResponse {
588 // Runners are the runners of this page, ordered by name.
589 repeated Runner runners = 1;
590 // NextPageToken is passed as page_token to get the next page. Empty when
591 // there is no next page.
592 string next_page_token = 2;
593}
594
595// RemoveRunnerRequest names the runner to remove.
596message RemoveRunnerRequest {
597 // RunnerId is the Runner.id.
598 string runner_id = 1;
599}
600
601// RemoveRunnerResponse is empty.
602message RemoveRunnerResponse {}