diff --git a/pkg/manager/impl/execution_manager.go b/pkg/manager/impl/execution_manager.go index 1dd3f8119f..97d98959ac 100644 --- a/pkg/manager/impl/execution_manager.go +++ b/pkg/manager/impl/execution_manager.go @@ -1034,25 +1034,6 @@ func (m *ExecutionManager) GetExecution( return nil, transformerErr } - // TO BE DELETED - // TODO: Remove the publishing to deprecated fields (Inputs) after a smooth migration has been completed of our existing users - // For now, publish to deprecated fields thus ensuring old clients don't break when calling GetExecution - if len(executionModel.InputsURI) > 0 { - var inputs core.LiteralMap - if err := m.storageClient.ReadProtobuf(ctx, executionModel.InputsURI, &inputs); err != nil { - return nil, err - } - execution.Closure.ComputedInputs = &inputs - } - if len(executionModel.UserInputsURI) > 0 { - var userInputs core.LiteralMap - if err := m.storageClient.ReadProtobuf(ctx, executionModel.UserInputsURI, &userInputs); err != nil { - return nil, err - } - execution.Spec.Inputs = &userInputs - } - // END TO BE DELETED - return execution, nil } diff --git a/pkg/manager/impl/execution_manager_test.go b/pkg/manager/impl/execution_manager_test.go index 9ba7ae75c5..4e3cc65d42 100644 --- a/pkg/manager/impl/execution_manager_test.go +++ b/pkg/manager/impl/execution_manager_test.go @@ -2149,43 +2149,6 @@ func TestGetExecution_Legacy(t *testing.T) { assert.True(t, proto.Equal(getLegacyClosure(), execution.Closure)) } -func TestGetExecution_LegacyClient_OffloadedData(t *testing.T) { - repository := repositoryMocks.NewMockRepository() - startedAt := time.Date(2018, 8, 30, 0, 0, 0, 0, time.UTC) - executionGetFunc := func(ctx context.Context, input interfaces.Identifier) (models.Execution, error) { - assert.Equal(t, "project", input.Project) - assert.Equal(t, "domain", input.Domain) - assert.Equal(t, "name", input.Name) - return models.Execution{ - ExecutionKey: models.ExecutionKey{ - Project: "project", - Domain: "domain", - Name: "name", - }, - Spec: specBytes, - Phase: phase, - Closure: closureBytes, - LaunchPlanID: uint(1), - WorkflowID: uint(2), - StartedAt: &startedAt, - UserInputsURI: shared.UserInputs, - InputsURI: shared.Inputs, - }, nil - } - repository.ExecutionRepo().(*repositoryMocks.MockExecutionRepo).SetGetCallback(executionGetFunc) - storageClient := getMockStorageForExecTest(context.Background()) - execManager := NewExecutionManager(repository, getMockExecutionsConfigProvider(), storageClient, workflowengineMocks.NewMockExecutor(), mockScope.NewTestScope(), mockScope.NewTestScope(), &mockPublisher, mockExecutionRemoteURL, nil, nil, nil) - _ = storageClient.WriteProtobuf(context.Background(), storage.DataReference(shared.UserInputs), storage.Options{}, getLegacySpec().Inputs) - _ = storageClient.WriteProtobuf(context.Background(), storage.DataReference(shared.Inputs), storage.Options{}, getLegacyClosure().ComputedInputs) - execution, err := execManager.GetExecution(context.Background(), admin.WorkflowExecutionGetRequest{ - Id: &executionIdentifier, - }) - assert.NoError(t, err) - assert.True(t, proto.Equal(&executionIdentifier, execution.Id)) - assert.True(t, proto.Equal(getLegacySpec(), execution.Spec)) - assert.True(t, proto.Equal(getLegacyClosure(), execution.Closure)) -} - func TestGetExecutionData_LegacyModel(t *testing.T) { repository := repositoryMocks.NewMockRepository() startedAt := time.Date(2018, 8, 30, 0, 0, 0, 0, time.UTC)