diff --git a/Makefile b/Makefile index 9c13a177ec..980b892efd 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ NAME = "github.com/goto/optimus" LAST_COMMIT := $(shell git rev-parse --short HEAD) LAST_TAG := "$(shell git rev-list --tags --max-count=1)" OPMS_VERSION := "$(shell git describe --tags ${LAST_TAG})-next" -PROTON_COMMIT := "750afa5b646347179ab2abaf3ea3b51ce03cc3ab" +PROTON_COMMIT := "ca87ce40849dfc2a7a73ba9d2e0e9084e33dadeb" .PHONY: build test test-ci generate-proto unit-test-ci integration-test vet coverage clean install lint diff --git a/ext/scheduler/airflow/__lib.py b/ext/scheduler/airflow/__lib.py index 771ef91c6b..2b5462626a 100644 --- a/ext/scheduler/airflow/__lib.py +++ b/ext/scheduler/airflow/__lib.py @@ -88,7 +88,7 @@ def _add_connection_adapter_if_absent(self, host): def get_job_replay_config(self, project_name, job_name, schedule_time) -> dict: scheduled_at_str = schedule_time.strftime(TIMESTAMP_FORMAT) - url = '{optimus_host}/api/v1beta1/project/{optimus_project}/replay'.format( + url = '{optimus_host}/api/v1beta1/project/{optimus_project}/replay-details'.format( optimus_host=self.host, optimus_project=project_name, ) diff --git a/protos/gotocompany/optimus/core/v1beta1/replay.pb.go b/protos/gotocompany/optimus/core/v1beta1/replay.pb.go index c951bdede9..11e7292d3b 100644 --- a/protos/gotocompany/optimus/core/v1beta1/replay.pb.go +++ b/protos/gotocompany/optimus/core/v1beta1/replay.pb.go @@ -1087,7 +1087,7 @@ var file_gotocompany_optimus_core_v1beta1_replay_proto_rawDesc = []byte{ 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x72, 0x65, - 0x70, 0x6c, 0x61, 0x79, 0x73, 0x32, 0xc7, 0x08, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, + 0x70, 0x6c, 0x61, 0x79, 0x73, 0x32, 0xcf, 0x08, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9e, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, @@ -1144,7 +1144,7 @@ var file_gotocompany_optimus_core_v1beta1_replay_proto_rawDesc = []byte{ 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x12, 0xb9, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x6c, 0x12, 0xc1, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, @@ -1153,19 +1153,20 @@ var file_gotocompany_optimus_core_v1beta1_replay_proto_rawDesc = []byte{ 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x42, - 0x95, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, - 0x75, 0x73, 0x42, 0x14, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x92, 0x41, 0x3a, 0x12, 0x05, 0x32, - 0x03, 0x30, 0x2e, 0x31, 0x1a, 0x0e, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x3a, - 0x39, 0x31, 0x30, 0x30, 0x22, 0x04, 0x2f, 0x61, 0x70, 0x69, 0x2a, 0x01, 0x01, 0x72, 0x18, 0x0a, - 0x16, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x20, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x20, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x2d, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x95, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x42, 0x14, 0x52, 0x65, 0x70, 0x6c, + 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, + 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x75, 0x73, 0x92, 0x41, 0x3a, 0x12, 0x05, 0x32, 0x03, 0x30, 0x2e, 0x31, 0x1a, 0x0e, 0x31, 0x32, + 0x37, 0x2e, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x3a, 0x39, 0x31, 0x30, 0x30, 0x22, 0x04, 0x2f, 0x61, + 0x70, 0x69, 0x2a, 0x01, 0x01, 0x72, 0x18, 0x0a, 0x16, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x20, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protos/gotocompany/optimus/core/v1beta1/replay.pb.gw.go b/protos/gotocompany/optimus/core/v1beta1/replay.pb.gw.go index d2ca090ff8..c6fd03672b 100644 --- a/protos/gotocompany/optimus/core/v1beta1/replay.pb.gw.go +++ b/protos/gotocompany/optimus/core/v1beta1/replay.pb.gw.go @@ -560,7 +560,7 @@ func RegisterReplayServiceHandlerServer(ctx context.Context, mux *runtime.ServeM var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gotocompany.optimus.core.v1beta1.ReplayService/GetReplayDetails", runtime.WithHTTPPathPattern("/v1beta1/project/{project_name}/replay")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gotocompany.optimus.core.v1beta1.ReplayService/GetReplayDetails", runtime.WithHTTPPathPattern("/v1beta1/project/{project_name}/replay-details")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -722,7 +722,7 @@ func RegisterReplayServiceHandlerClient(ctx context.Context, mux *runtime.ServeM ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gotocompany.optimus.core.v1beta1.ReplayService/GetReplayDetails", runtime.WithHTTPPathPattern("/v1beta1/project/{project_name}/replay")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gotocompany.optimus.core.v1beta1.ReplayService/GetReplayDetails", runtime.WithHTTPPathPattern("/v1beta1/project/{project_name}/replay-details")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -752,7 +752,7 @@ var ( pattern_ReplayService_CancelReplay_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1beta1", "project", "project_name", "replay", "replay_id", "cancel"}, "")) - pattern_ReplayService_GetReplayDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "project", "project_name", "replay"}, "")) + pattern_ReplayService_GetReplayDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "project", "project_name", "replay-details"}, "")) ) var ( diff --git a/protos/gotocompany/optimus/core/v1beta1/replay.swagger.json b/protos/gotocompany/optimus/core/v1beta1/replay.swagger.json index 923fb20ec5..c1bfac18c5 100644 --- a/protos/gotocompany/optimus/core/v1beta1/replay.swagger.json +++ b/protos/gotocompany/optimus/core/v1beta1/replay.swagger.json @@ -23,12 +23,12 @@ "paths": { "/v1beta1/project/{projectName}/replay": { "get": { - "operationId": "ReplayService_GetReplayDetails", + "operationId": "ReplayService_ListReplay", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1beta1GetReplayDetailsResponse" + "$ref": "#/definitions/v1beta1ListReplayResponse" } }, "default": { @@ -44,35 +44,6 @@ "in": "path", "required": true, "type": "string" - }, - { - "name": "replayId", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "jobNames", - "in": "query", - "required": false, - "type": "array", - "items": { - "type": "string" - }, - "collectionFormat": "multi" - }, - { - "name": "scheduledAt", - "in": "query", - "required": false, - "type": "string", - "format": "date-time" - }, - { - "name": "status", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ @@ -141,6 +112,65 @@ ] } }, + "/v1beta1/project/{projectName}/replay-details": { + "get": { + "operationId": "ReplayService_GetReplayDetails", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1GetReplayDetailsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "projectName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "replayId", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "jobNames", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "scheduledAt", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "status", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ReplayService" + ] + } + }, "/v1beta1/project/{projectName}/replay-dry-run": { "post": { "operationId": "ReplayService_ReplayDryRun",