-
Notifications
You must be signed in to change notification settings - Fork 270
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
fix: Hook Deletion Policies HookSucceeded should be run after whole H… #144
Conversation
…ook succeed and not only Resource succeed
Codecov Report
@@ Coverage Diff @@
## master #144 +/- ##
==========================================
+ Coverage 53.86% 54.29% +0.42%
==========================================
Files 25 25
Lines 2404 2422 +18
==========================================
+ Hits 1295 1315 +20
+ Misses 974 972 -2
Partials 135 135
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to test it and found a bug. Following pre-sync hook has HookFailed
delete policy, always fails but never got deleted.
apiVersion: batch/v1
kind: Job
metadata:
name: before
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: HookFailed
spec:
template:
spec:
containers:
- name: sleep
image: alpine:latest
command: ["fail"]
restartPolicy: Never
backoffLimit: 0
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fixes argoproj/argo-cd#4384 |
#144) * fix: Hook Deletion Policies HookSucceeded should be run after whole Hook succeed and not only Resource succeed * fix: handle HookFailed. * fix: fixing lint error.
…ook succeed and not only Resource succeed