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

delete step should be idempotent #3497

Closed
jessesuen opened this issue Feb 13, 2025 · 0 comments · Fixed by #3498
Closed

delete step should be idempotent #3497

jessesuen opened this issue Feb 13, 2025 · 0 comments · Fixed by #3498

Comments

@jessesuen
Copy link
Member

Description

If I try to use delete against a file/dir that does not exist, I get the following error:

step execution failed: step 0 met error threshold of 1: failed to run step "delete": failed to delete "./out": lstat out: no such file or directory

Ideally, delete should succeed if the specified path already does not exist.

If we want, we could add a strict option in case there is a use case where the path is expected to be there, but don't have a strong opinion here.

Screenshots

Image

Steps to Reproduce

apiVersion: kargo.akuity.io/v1alpha1
kind: PromotionTask
metadata:
  name: render-config
  namespace: kargo-rendered-branches
spec:
  steps:
  - uses: delete
    config:
      path: ./out

Version

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

Successfully merging a pull request may close this issue.

3 participants