Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If a running workflow is deleted, workflow archive is not created #13658

Open
4 tasks done
frauniki opened this issue Sep 24, 2024 · 0 comments
Open
4 tasks done

If a running workflow is deleted, workflow archive is not created #13658

frauniki opened this issue Sep 24, 2024 · 0 comments

Comments

@frauniki
Copy link

frauniki commented Sep 24, 2024

Pre-requisites

  • I have double-checked my configuration
  • I have tested with the :latest image tag (i.e. quay.io/argoproj/workflow-controller:latest) and can confirm the issue still exists on :latest. If not, I have explained why, in detail, in my description below.
  • I have searched existing issues and could not find a match for this bug
  • I'd like to contribute the fix myself (see contributing guide)

What happened? What did you expect to happen?

We manage workflow resources directly in GitOps.
In an environment where ArchiveWorkflow is enabled, if there is a workflow in the running state and the workflow is deleted by GitOps, the archive is not created even though ArchiveWorkflow is enabled.

This is due to the workflow archive mechanism in Argo Workflows.
Workflow controller triggers the workflow archive when the workflow phase is marked as Succeeded or Failed or Failed.

woc.wf.Labels[common.LabelKeyWorkflowArchivingStatus] = "Pending"

However, if a running workflow is deleted, the workflow archive is not created because the workflow phase is deleted without being marked as any phase.
Thus, the target workflow will be forever untraceable.
This problem could potentially occur in non-GitOps environments as well.

I think the workflow phase should be marked as one of the end phases before deleting the workflow. (i.e. the workflow archive is created).
However, I could not think of a good way to block workflow deletion until the workflow phase is changed.

Version(s)

v3.5.11

Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.

# Delete workflow during running status
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: hello-world-
spec:
  entrypoint: hello-world
  templates:
  - name: hello-world
    container:
      image: busybox
      command: [sleep]
      args: ["10000"]

Logs from the workflow controller

None

Logs from in your workflow's wait container

None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants