diff --git a/go/tasks/pluginmachinery/core/transition.go b/go/tasks/pluginmachinery/core/transition.go index 28f06884ed..fe7503f15a 100644 --- a/go/tasks/pluginmachinery/core/transition.go +++ b/go/tasks/pluginmachinery/core/transition.go @@ -11,6 +11,7 @@ const ( // The transition is eventually consistent. For all the state written may not be visible in the next call, but eventually will persist // Best to use when the plugin logic is completely idempotent. This is also the most performant option. TransitionTypeEphemeral TransitionType = iota + // @deprecated support for Barrier type transitions has been deprecated // This transition tries its best to make the latest state visible for every consecutive read. But, it is possible // to go back in time, i.e. monotonic consistency is violated (in rare cases). TransitionTypeBarrier diff --git a/go/tasks/pluginmachinery/internal/webapi/core.go b/go/tasks/pluginmachinery/internal/webapi/core.go index 6d506af19e..049fc431aa 100644 --- a/go/tasks/pluginmachinery/internal/webapi/core.go +++ b/go/tasks/pluginmachinery/internal/webapi/core.go @@ -97,7 +97,7 @@ func (c CorePlugin) Handle(ctx context.Context, tCtx core.TaskExecutionContext) return core.UnknownTransition, err } - return core.DoTransitionType(core.TransitionTypeBarrier, phaseInfo), nil + return core.DoTransition(phaseInfo), nil } func (c CorePlugin) Abort(ctx context.Context, tCtx core.TaskExecutionContext) error { diff --git a/go/tasks/plugins/array/k8s/executor.go b/go/tasks/plugins/array/k8s/executor.go index 1c26ac186b..7902cef156 100644 --- a/go/tasks/plugins/array/k8s/executor.go +++ b/go/tasks/plugins/array/k8s/executor.go @@ -148,7 +148,7 @@ func (e Executor) Handle(ctx context.Context, tCtx core.TaskExecutionContext) (c return core.UnknownTransition, err } - return core.DoTransitionType(core.TransitionTypeBarrier, phaseInfo), nil + return core.DoTransition(phaseInfo), nil } func (e Executor) Abort(ctx context.Context, tCtx core.TaskExecutionContext) error { diff --git a/go/tasks/plugins/hive/executor.go b/go/tasks/plugins/hive/executor.go index 80a03d9e3d..a07f7b5153 100644 --- a/go/tasks/plugins/hive/executor.go +++ b/go/tasks/plugins/hive/executor.go @@ -65,7 +65,7 @@ func (q QuboleHiveExecutor) Handle(ctx context.Context, tCtx core.TaskExecutionC return core.UnknownTransition, err } - return core.DoTransitionType(core.TransitionTypeBarrier, phaseInfo), nil + return core.DoTransition(phaseInfo), nil } func (q QuboleHiveExecutor) Abort(ctx context.Context, tCtx core.TaskExecutionContext) error { diff --git a/go/tasks/plugins/presto/executor.go b/go/tasks/plugins/presto/executor.go index b1b2325a70..64420d92e9 100644 --- a/go/tasks/plugins/presto/executor.go +++ b/go/tasks/plugins/presto/executor.go @@ -63,7 +63,7 @@ func (p Executor) Handle(ctx context.Context, tCtx core.TaskExecutionContext) (c return core.UnknownTransition, err } - return core.DoTransitionType(core.TransitionTypeBarrier, phaseInfo), nil + return core.DoTransition(phaseInfo), nil } func (p Executor) Abort(ctx context.Context, tCtx core.TaskExecutionContext) error { diff --git a/tests/end_to_end.go b/tests/end_to_end.go index 9eb1638c08..eacffb038f 100644 --- a/tests/end_to_end.go +++ b/tests/end_to_end.go @@ -252,7 +252,7 @@ func RunPluginEndToEndTest(t *testing.T, executor pluginCore.Plugin, template *i tCtx.OnMaxDatasetSizeBytes().Return(1000000) tCtx.OnSecretManager().Return(secretManager) - trns := pluginCore.DoTransitionType(pluginCore.TransitionTypeBarrier, pluginCore.PhaseInfoQueued(time.Now(), 0, "")) + trns := pluginCore.DoTransition(pluginCore.PhaseInfoQueued(time.Now(), 0, "")) for !trns.Info().Phase().IsTerminal() { trns, err = executor.Handle(ctx, tCtx) assert.NoError(t, err)