diff --git a/gotocompany/optimus/core/v1beta1/job_run.proto b/gotocompany/optimus/core/v1beta1/job_run.proto index fa27d54c..76287249 100644 --- a/gotocompany/optimus/core/v1beta1/job_run.proto +++ b/gotocompany/optimus/core/v1beta1/job_run.proto @@ -34,6 +34,14 @@ service JobRunService { body: "*" }; } + + // GetInterval gets interval on specific job given reference time. + rpc AreAllUpstreamRunsSuccessful(AreAllUpstreamRunsSuccessfulRequest) returns (AreAllUpstreamRunsSuccessfulResponse) { + option (google.api.http) = { + get: "/v1beta1/project/{project_name}/job/{job_name}/upstream/runs" + }; + } + // JobRun returns the current and past run status of jobs on a given range rpc JobRun(JobRunRequest) returns (JobRunResponse) { option (google.api.http) = { @@ -63,6 +71,27 @@ service JobRunService { } } +message AreAllUpstreamRunsSuccessfulRequest { + string job_name = 1; + string project_name = 2; + google.protobuf.Timestamp schedule_time = 3; + + string upstream_job_name = 4; + string upstream_project_name = 5; + string upstream_namespace_name = 6; + string upstream_host = 7; + + repeated string filter = 8; +} + +message AreAllUpstreamRunsSuccessfulResponse { + bool all_success = 1; + google.protobuf.Timestamp window_interval_start = 2; + google.protobuf.Timestamp window_interval_end = 3; + repeated JobRun job_runs = 4; + bool force_pass = 5; +} + message GetIntervalRequest { google.protobuf.Timestamp reference_time = 1; string project_name = 2;