Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: scheduler/api/scheduler/v1/scheduler.proto

Issue 2948163002: scheduler: add GetJobInvocations api. (Closed)
Patch Set: grpc.error Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « scheduler/api/scheduler/v1/pb.discovery.go ('k') | scheduler/api/scheduler/v1/scheduler.pb.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 syntax = "proto3"; 5 syntax = "proto3";
6 6
7 package scheduler; 7 package scheduler;
8 8
9 9
10 // Scheduler exposes the public API of the Scheduler service. 10 // Scheduler exposes the public API of the Scheduler service.
11 service Scheduler { 11 service Scheduler {
12 // TODO: still in progress. 12 // TODO: still in progress.
13 13
14 // GetJobs fetches all jobs satisfying JobsRequest and visibility ACLs. 14 // GetJobs fetches all jobs satisfying JobsRequest and visibility ACLs.
15 // If JobsRequest.project is specified but the project doesn't exist, empty
16 // list of Jobs is returned.
15 rpc GetJobs(JobsRequest) returns (JobsReply); 17 rpc GetJobs(JobsRequest) returns (JobsReply);
18
19 // GetInvocations fetches invocations of a given job, most recent first.
20 rpc GetInvocations(InvocationsRequest) returns (InvocationsReply);
16 } 21 }
17 22
18 message JobsRequest { 23 message JobsRequest {
19 // If not specified or "", all projects' jobs are returned. 24 // If not specified or "", all projects' jobs are returned.
20 string project = 1; 25 string project = 1;
21 } 26 }
22 27
23 message JobsReply { 28 message JobsReply {
24 repeated Job jobs = 1; 29 repeated Job jobs = 1;
25 } 30 }
26 31
27 message Job { 32 message Job {
28 string name = 1; 33 string name = 1;
29 string project = 2; 34 string project = 2;
30 string schedule = 3; 35 string schedule = 3;
31 36
32 JobState state = 4; 37 JobState state = 4;
33 } 38 }
34 39
35 message JobState { 40 message JobState {
36 string ui_status = 1; 41 string ui_status = 1;
37 } 42 }
43
44
45 message InvocationsRequest{
46 string project = 1;
47 string job = 2;
48 string cursor = 3;
49 // page_size defaults to 50 which is maximum.
50 int32 page_size = 4;
51 }
52
53 message InvocationsReply{
54 repeated Invocation invocations = 1;
55 string next_cursor = 2;
56 }
57
58 message Invocation {
59 int64 id = 1;
60 string job = 2;
61 string project = 3;
62
63 // TODO(tandrii): consider exposing InvocationNonce and RetryCount as these
64 // could be important to consumers of API in order to combine multiple
65 // attempts of what was supposed to be just one invocation.
66
67 // start_ts is unix timestamp in microseconds.
68 int64 started_ts = 4;
69 // finished_ts is unix timestamp in microseconds. Set only if final is true.
70 int64 finished_ts = 5;
71 // triggered_by is an identity ("kind:value") which is specified only if
72 // invocation was triggered by not the scheduler service itself.
73 string triggered_by = 6;
74 // Latest status of a job.
75 string status = 7;
76 // If true, the status of the job is final and won't change.
77 bool final = 8;
78
79 // config_revision pins project/job config version according to which this
80 // invocation was created.
81 string config_revision = 9;
82
83 // view_url points to human readable page for a given invocation if available.
84 string view_url = 10;
85 }
OLDNEW
« no previous file with comments | « scheduler/api/scheduler/v1/pb.discovery.go ('k') | scheduler/api/scheduler/v1/scheduler.pb.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698