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

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

Issue 2948163002: scheduler: add GetJobInvocations api. (Closed)
Patch Set: 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
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 int32 page_size = 4;
50 }
51
52 message InvocationsReply{
53 repeated Invocation invocations = 1;
54 string next_cursor = 2;
55 // now_ts is a unix timestamp in microseconds pointing to **approximately** wh en
56 // the results were computed. It is useful to compute approximate durations of
57 // invocations that are not yet final.
58 int64 now_ts = 3;
Vadim Sh. 2017/06/21 23:46:41 why is this needed? We generally assume clocks and
tandrii(chromium) 2017/06/22 15:47:42 tl;dr ok, let's remove complexity from here. I co
59 }
60
61 message Invocation {
62 int64 id = 1;
63 string job = 2;
64 string project = 3;
65
66 // TODO(tandrii): consider exposing InvocationNonce and RetryCount as these
67 // could be important to consumers of API in order to combine multiple
68 // attempts of what was supposed to be just one invocation.
69
70 // start_ts is unix timestamp in microseconds.
71 int64 started_ts = 4;
72 // finished_ts is unix timestamp in microseconds. Set only if final is true.
73 int64 finished_ts = 5;
74 // triggered_by is an identity ("kind:value") which is specified only if
75 // invocation was triggered by not the scheduler service itself.
76 string triggered_by = 6;
77 // Latest status of a job.
78 string status = 7;
79 // If true, the status of the job is final and won't change.
80 bool final = 8;
81
82 // config_revision pins project/job config version according to which this
83 // invocation was created.
84 string config_revision = 9;
85
86 // view_url points to human readable page for a given invocation if available.
87 string view_url = 10;
88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698