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

Add "argo delete --force" to force deletion of a workflow which has a finalizer #9315

Closed
juliev0 opened this issue Aug 8, 2022 · 3 comments · Fixed by #9321
Closed

Add "argo delete --force" to force deletion of a workflow which has a finalizer #9315

juliev0 opened this issue Aug 8, 2022 · 3 comments · Fixed by #9321
Assignees
Labels
area/artifacts S3/GCP/OSS/Git/HDFS etc type/feature Feature request

Comments

@juliev0
Copy link
Contributor

juliev0 commented Aug 8, 2022

Artifact GC creates a finalizer to prevent Workflows from being deleted until their artifacts have been deleted. But if the artifacts fail to get deleted, the finalizer will remain.

This CLI command would force delete a workflow which has a finalizer, removing the finalizer first. (And thus the ArtifactGCTask, which is owned by it, and the ArtifactGC pod owned by the ArtifactGCTask would all get deleted.)


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@juliev0 juliev0 added the type/feature Feature request label Aug 8, 2022
@juliev0
Copy link
Contributor Author

juliev0 commented Aug 8, 2022

@sarabala1979 Added this per your suggestion. Can you add it to "Artifacts" project?

@caelan-io caelan-io added the area/artifacts S3/GCP/OSS/Git/HDFS etc label Aug 14, 2022
alexec pushed a commit that referenced this issue Aug 16, 2022
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
@Piroddi
Copy link

Piroddi commented Oct 5, 2022

Would it make sense to add this --force field to the UI as well ? Also would it make sense to only update the finalizer after the workflows creates the artifact? As currently if a workflow fails before an artifact exists, the finalizer is present thus preventing the workflow from being deleted until the finalizer been removed.

@juliev0
Copy link
Contributor Author

juliev0 commented Oct 5, 2022

Would it make sense to add this --force field to the UI as well ?

You can add an enhancement Issue for that if you like. The UI would of course still need to offer the "non-force" option as well.

Also would it make sense to only update the finalizer after the workflows creates the artifact? As currently if a workflow fails before an artifact exists, the finalizer is present thus preventing the workflow from being deleted until the finalizer been removed.

Hmm, there might be a bug if that's happening. The way it should work is that if you set your artifact GC to "OnWorkflowCompletion" for example, then when the Workflow completes, only artifacts that actually exist should get deleted, and then once all of these artifacts have been deleted the finalizer gets removed. If you believe there's a bug, you can write up an issue and let me know. I'm curious whether an Artifact GC Pod was created and if there's an associated WorkflowArtifactGCTask (kubectl get wfat) which would contain in its Spec the set of artifacts that need to be deleted. (Those would ultimately come from the Workflow object's status.nodes[x].outputs.artifacts.) I'm curious if that is showing an artifact that was never created in the first place ?

juchaosong pushed a commit to juchaosong/argo-workflows that referenced this issue Nov 3, 2022
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Signed-off-by: juchao <juchao@coscene.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/artifacts S3/GCP/OSS/Git/HDFS etc type/feature Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants