From c6d51d609c8c8b4192bc950e347ee688945a3a2c Mon Sep 17 00:00:00 2001 From: Thomas Newton Date: Wed, 29 Nov 2023 19:06:06 +0000 Subject: [PATCH] Don't use cleanup --- flyteplugins/go/tasks/pluginmachinery/core/phase.go | 4 ---- flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/flyteplugins/go/tasks/pluginmachinery/core/phase.go b/flyteplugins/go/tasks/pluginmachinery/core/phase.go index a5893ced447..3f8c2a0914a 100644 --- a/flyteplugins/go/tasks/pluginmachinery/core/phase.go +++ b/flyteplugins/go/tasks/pluginmachinery/core/phase.go @@ -261,10 +261,6 @@ func PhaseInfoFailure(code, reason string, info *TaskInfo) PhaseInfo { return PhaseInfoFailed(PhasePermanentFailure, &core.ExecutionError{Code: code, Message: reason, Kind: core.ExecutionError_USER}, info) } -func PhaseInfoFailureWithCleanup(code, reason string, info *TaskInfo) PhaseInfo { - return phaseInfoFailed(PhasePermanentFailure, &core.ExecutionError{Code: code, Message: reason, Kind: core.ExecutionError_USER}, info, true) -} - func PhaseInfoRetryableFailure(code, reason string, info *TaskInfo) PhaseInfo { return PhaseInfoFailed(PhaseRetryableFailure, &core.ExecutionError{Code: code, Message: reason, Kind: core.ExecutionError_USER}, info) } diff --git a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go index 871f31cc338..7b90eb669c6 100644 --- a/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go +++ b/flyteplugins/go/tasks/pluginmachinery/flytek8s/pod_helper.go @@ -676,7 +676,7 @@ func DemystifyPending(status v1.PodStatus) (pluginsCore.PhaseInfo, error) { t := c.LastTransitionTime.Time gracePeriod := config.GetK8sPluginConfig().CreateContainerConfigErrorGracePeriod.Duration if time.Since(t) >= gracePeriod { - return pluginsCore.PhaseInfoFailureWithCleanup(finalReason, GetMessageAfterGracePeriod(finalMessage, gracePeriod), &pluginsCore.TaskInfo{ + return pluginsCore.PhaseInfoFailure(finalReason, GetMessageAfterGracePeriod(finalMessage, gracePeriod), &pluginsCore.TaskInfo{ OccurredAt: &t, }), nil }