Skip to content

Commit

Permalink
feat: add optimus upsert job rpc (#107)
Browse files Browse the repository at this point in the history
* feat(optimus): add upsert job specifications rpc

* feat(optimus): add job upsert http api

* feat(optimus): add result to job upsert response

* refactor(optimus): change upsert job spec response

* feat(optimus): add job name and status in job upsert response

* refactor(optimus): use job name list in upsert job response
  • Loading branch information
arinda-arif authored Jun 24, 2024
1 parent 4fb568d commit 5499ce1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions gotocompany/optimus/core/v1beta1/job_spec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ service JobSpecificationService {
};
}

// UpsertJobSpecifications update or add jobs for a namespace which belongs to the given project
rpc UpsertJobSpecifications(UpsertJobSpecificationsRequest) returns (UpsertJobSpecificationsResponse) {
option (google.api.http) = {
post: "/v1beta1/project/{project_name}/namespace/{namespace_name}/jobs-upsert"
body: "*"
};
}

// GetJobSpecification reads a provided job spec of a namespace
rpc GetJobSpecification(GetJobSpecificationRequest) returns (GetJobSpecificationResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -209,6 +217,18 @@ message UpdateJobSpecificationsResponse {
repeated string successful_job_names = 2;
}

message UpsertJobSpecificationsRequest {
string project_name = 1;
string namespace_name = 2;
repeated JobSpecification specs = 3;
}
message UpsertJobSpecificationsResponse {
string log = 1;
repeated string successful_job_names = 2;
repeated string skipped_job_names = 3;
repeated string failed_job_names = 4;
}

message JobInspectRequest {
string project_name = 1;
string namespace_name = 2;
Expand Down

0 comments on commit 5499ce1

Please sign in to comment.