From df3d25d935a16f40f4b24169f5d59b7c8271dc2d Mon Sep 17 00:00:00 2001 From: Arinda Arif Date: Thu, 14 Apr 2022 15:26:53 +0700 Subject: [PATCH 1/5] feat(optimus): add GetDeployJobsStatus --- odpf/optimus/core/v1beta1/job_spec.proto | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/odpf/optimus/core/v1beta1/job_spec.proto b/odpf/optimus/core/v1beta1/job_spec.proto index 6b6e1cc3..a9a98f37 100644 --- a/odpf/optimus/core/v1beta1/job_spec.proto +++ b/odpf/optimus/core/v1beta1/job_spec.proto @@ -72,8 +72,11 @@ service JobSpecificationService { // RefreshJobs do redeployment using the current persisted state. // It will returns a stream of messages which can be used to track the progress. - // Message containing ack are status events other are progress events rpc RefreshJobs(RefreshJobsRequest) returns (stream RefreshJobsResponse) {} + + // GetDeployJobsStatus check status of job deployment. + // It will returns status of the job deployment and the failure details. + rpc GetDeployJobsStatus(GetDeployJobsStatusRequest) returns (GetDeployJobsStatusResponse) {} } message DeployJobSpecificationRequest { @@ -276,7 +279,24 @@ message RefreshJobsResponse { // response type differentiate events string type = 2; - string message = 3; + string value = 3; string job_name = 4; } + +message GetDeployJobsStatusRequest { + string deploy_id = 1; +} + +message GetDeployJobsStatusResponse { + bool success = 1; + + repeated DeployJobFailure failures = 2; + int32 total_succeed = 3; + int32 total_failed = 4; +} + +message DeployJobFailure { + string job_name = 1; + string message = 2; +} From e6ee19491ea3a5ac5ae69f3214e45f30fc42a08d Mon Sep 17 00:00:00 2001 From: Arinda Arif Date: Mon, 18 Apr 2022 09:42:51 +0700 Subject: [PATCH 2/5] fix(optimus): change success field to status in GetDeployJobsStatusResponse --- odpf/optimus/core/v1beta1/job_spec.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odpf/optimus/core/v1beta1/job_spec.proto b/odpf/optimus/core/v1beta1/job_spec.proto index a9a98f37..93a93b44 100644 --- a/odpf/optimus/core/v1beta1/job_spec.proto +++ b/odpf/optimus/core/v1beta1/job_spec.proto @@ -289,7 +289,7 @@ message GetDeployJobsStatusRequest { } message GetDeployJobsStatusResponse { - bool success = 1; + string status = 1; repeated DeployJobFailure failures = 2; int32 total_succeed = 3; From ffb7b51a750bc18809760e34370ae93ffca64300 Mon Sep 17 00:00:00 2001 From: Arinda Arif Date: Mon, 18 Apr 2022 22:35:12 +0700 Subject: [PATCH 3/5] refactor(optimus): remove unused total_failure field from GetDeployJobsStatusResponse --- odpf/optimus/core/v1beta1/job_spec.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/odpf/optimus/core/v1beta1/job_spec.proto b/odpf/optimus/core/v1beta1/job_spec.proto index 93a93b44..3c970fd0 100644 --- a/odpf/optimus/core/v1beta1/job_spec.proto +++ b/odpf/optimus/core/v1beta1/job_spec.proto @@ -293,7 +293,6 @@ message GetDeployJobsStatusResponse { repeated DeployJobFailure failures = 2; int32 total_succeed = 3; - int32 total_failed = 4; } message DeployJobFailure { From 4e8dd50a60b189813be5fe10386ee13d9a7f0b9b Mon Sep 17 00:00:00 2001 From: Arinda Arif Date: Wed, 20 Apr 2022 21:13:18 +0700 Subject: [PATCH 4/5] fix(optimus): include success_count and failure_count in GetDeployJobsStatusResponse --- odpf/optimus/core/v1beta1/job_spec.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/odpf/optimus/core/v1beta1/job_spec.proto b/odpf/optimus/core/v1beta1/job_spec.proto index 3c970fd0..f08a4c64 100644 --- a/odpf/optimus/core/v1beta1/job_spec.proto +++ b/odpf/optimus/core/v1beta1/job_spec.proto @@ -292,7 +292,8 @@ message GetDeployJobsStatusResponse { string status = 1; repeated DeployJobFailure failures = 2; - int32 total_succeed = 3; + int32 success_count = 3; + int32 failure_count = 3; } message DeployJobFailure { From 4cd69522575a01a496bc5babb95d42f38cc8c2cd Mon Sep 17 00:00:00 2001 From: Arinda Arif Date: Wed, 20 Apr 2022 21:16:15 +0700 Subject: [PATCH 5/5] fix(optimus): change index of failure_count in GetDeployJobsStatusResponse --- odpf/optimus/core/v1beta1/job_spec.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odpf/optimus/core/v1beta1/job_spec.proto b/odpf/optimus/core/v1beta1/job_spec.proto index f08a4c64..d698e5d0 100644 --- a/odpf/optimus/core/v1beta1/job_spec.proto +++ b/odpf/optimus/core/v1beta1/job_spec.proto @@ -293,7 +293,7 @@ message GetDeployJobsStatusResponse { repeated DeployJobFailure failures = 2; int32 success_count = 3; - int32 failure_count = 3; + int32 failure_count = 4; } message DeployJobFailure {