Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1228,12 +1228,13 @@ def cleanup(
istio_enabled = self.is_istio_enabled(remote_pod)
pod_phase = remote_pod.status.phase if hasattr(remote_pod, "status") else None

should_keep = self.on_finish_action in {
OnFinishAction.KEEP_POD,
OnFinishAction.DELETE_ACTIVE_POD,
}

# if the pod fails or success, but we don't want to delete it
if (
pod_phase != PodPhase.SUCCEEDED
or self.on_finish_action == OnFinishAction.KEEP_POD
or self.on_finish_action == OnFinishAction.DELETE_ACTIVE_POD
):
if pod_phase != PodPhase.SUCCEEDED or should_keep:
self.patch_already_checked(remote_pod, reraise=False)

if istio_enabled or self.do_xcom_push:
Expand Down
Loading