@@ -52,6 +52,14 @@ service RuntimeService {
5252 get : "/api/v1/project/{project_name}/job/{job_name}/dump"
5353 };
5454 }
55+ // CheckJobSpecification checks if a job specification is valid
56+ rpc CheckJobSpecification (CheckJobSpecificationRequest ) returns (CheckJobSpecificationResponse ) {
57+ option (google.api.http ) = {
58+ post : "/api/v1/project/{project_name}/job/check"
59+ };
60+ }
61+ // CheckJobSpecifications checks if the job specifications are valid
62+ rpc CheckJobSpecifications (CheckJobSpecificationsRequest ) returns (stream CheckJobSpecificationsResponse ) {}
5563
5664 // RegisterProject creates a new project
5765 rpc RegisterProject (RegisterProjectRequest ) returns (RegisterProjectResponse ) {
@@ -203,10 +211,10 @@ message JobStatus {
203211
204212// ResourceSpecification are datastore specification representation of a resource
205213message ResourceSpecification {
214+ reserved 3 ; // depricated "datastore"
215+
206216 int32 version = 1 ;
207217 string name = 2 ;
208-
209- string datastore = 3 ;
210218 string type = 4 ;
211219
212220 google.protobuf.Struct spec = 5 ;
@@ -261,6 +269,31 @@ message DumpJobSpecificationResponse {
261269 string content = 2 ;
262270}
263271
272+ message CheckJobSpecificationRequest {
273+ string project_name = 1 ;
274+ JobSpecification job = 2 ;
275+ }
276+
277+ message CheckJobSpecificationResponse {
278+ bool success = 1 ;
279+ }
280+
281+ message CheckJobSpecificationsRequest {
282+ string project_name = 1 ;
283+ repeated JobSpecification jobs = 2 ;
284+ }
285+
286+ message CheckJobSpecificationsResponse {
287+ bool success = 1 ;
288+
289+ // non ack responses are more of a progress/info response
290+ // and not really success or failure statuses
291+ bool ack = 2 ;
292+
293+ string message = 3 ;
294+ string job_name = 4 ;
295+ }
296+
264297message RegisterProjectRequest {
265298 ProjectSpecification project = 1 ;
266299}
0 commit comments