From 4debe0c99d8cc1259b1e45eb69dccce2a50477ae Mon Sep 17 00:00:00 2001 From: siddhanta-rath Date: Thu, 10 Mar 2022 17:29:57 +0530 Subject: [PATCH 1/4] feat(optimus): fetch JobRuns for given date range --- odpf/optimus/core/v1beta1/runtime.proto | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/odpf/optimus/core/v1beta1/runtime.proto b/odpf/optimus/core/v1beta1/runtime.proto index 6e8102c1..2c618d4c 100644 --- a/odpf/optimus/core/v1beta1/runtime.proto +++ b/odpf/optimus/core/v1beta1/runtime.proto @@ -159,6 +159,14 @@ service RuntimeService { get: "/v1beta1/project/{project_name}/job/{job_name}/status" }; } + + // JobRun returns the current and past run status of jobs on a given range + rpc JobRun(JobRunRequest) returns (JobRunResponse) { + option (google.api.http) = { + get: "/v1beta1/project/{project_name}/job/{job_name}/run" + }; + } + // RegisterJobEvent notifies optimus service about an event related to job rpc RegisterJobEvent(RegisterJobEventRequest) returns (RegisterJobEventResponse) { option (google.api.http) = { @@ -670,6 +678,23 @@ message JobStatusResponse { repeated JobStatus statuses = 1; } +message JobRunRequest { + string project_name = 1; + string job_name = 2; + string start_date = 3; + string end_date = 4; + repeated string filter = 5; +} + +message JobRunResponse { + repeated RunStatus run_status = 1; +} + +message RunStatus { + string state = 1; + google.protobuf.Timestamp scheduled_at = 2; +} + message GetWindowRequest { google.protobuf.Timestamp scheduled_at = 1; string size = 2; From 4f002403b09c1f9e24e8cdba6750d479da25a3fa Mon Sep 17 00:00:00 2001 From: siddhanta-rath Date: Mon, 14 Mar 2022 04:28:03 +0530 Subject: [PATCH 2/4] feat(optimus): modify date type to timestamp --- odpf/optimus/core/v1beta1/runtime.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odpf/optimus/core/v1beta1/runtime.proto b/odpf/optimus/core/v1beta1/runtime.proto index 2c618d4c..5d7b8ef1 100644 --- a/odpf/optimus/core/v1beta1/runtime.proto +++ b/odpf/optimus/core/v1beta1/runtime.proto @@ -681,8 +681,8 @@ message JobStatusResponse { message JobRunRequest { string project_name = 1; string job_name = 2; - string start_date = 3; - string end_date = 4; + google.protobuf.Timestamp start_date = 3; + google.protobuf.Timestamp end_date = 4; repeated string filter = 5; } From 2da0f38a482ea07a56c679c5894aa90d5192557f Mon Sep 17 00:00:00 2001 From: siddhanta-rath Date: Tue, 15 Mar 2022 11:57:27 +0530 Subject: [PATCH 3/4] refactor: renamed RunStatus message to JobRun --- odpf/optimus/core/v1beta1/runtime.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odpf/optimus/core/v1beta1/runtime.proto b/odpf/optimus/core/v1beta1/runtime.proto index 5d7b8ef1..652ed5f2 100644 --- a/odpf/optimus/core/v1beta1/runtime.proto +++ b/odpf/optimus/core/v1beta1/runtime.proto @@ -687,10 +687,10 @@ message JobRunRequest { } message JobRunResponse { - repeated RunStatus run_status = 1; + repeated JobRun job_run = 1; } -message RunStatus { +message JobRun { string state = 1; google.protobuf.Timestamp scheduled_at = 2; } From 8376bc5378db1c66c8afa01e7b40c63d5a2a1423 Mon Sep 17 00:00:00 2001 From: siddhanta-rath Date: Thu, 24 Mar 2022 11:47:16 +0530 Subject: [PATCH 4/4] refactor(optimus): changed variable name from job_run to job_runs --- odpf/optimus/core/v1beta1/runtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odpf/optimus/core/v1beta1/runtime.proto b/odpf/optimus/core/v1beta1/runtime.proto index 2344388e..26faeb8c 100644 --- a/odpf/optimus/core/v1beta1/runtime.proto +++ b/odpf/optimus/core/v1beta1/runtime.proto @@ -687,7 +687,7 @@ message JobRunRequest { } message JobRunResponse { - repeated JobRun job_run = 1; + repeated JobRun job_runs = 1; } message JobRun {