Skip to content

Process all hook deletions on failure - #11334

Closed
uvegla wants to merge 7 commits into
helm:mainfrom
uvegla:process-all-hook-deletions-on-failure
Closed

uvegla wants to merge 7 commits into
helm:mainfrom
uvegla:process-all-hook-deletions-on-failure

Conversation

@uvegla

@uvegla uvegla commented Sep 12, 2022 •

Copy link
Copy Markdown
Contributor

fixes #10279

What this PR does / why we need it:

This a long standing issue that helm.sh/hook-delete-policy is not respected when a hook fails. In such case resources created by previously successful hooks are left in the cluster.

This change is an extended version of #10811 with tests.

Special notes for your reviewer:

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@pull-request-size pull-request-size Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 12, 2022
@uvegla
uvegla force-pushed the process-all-hook-deletions-on-failure branch from c9840d8 to dbeb8a1 Compare September 12, 2022 14:59
@uvegla
uvegla force-pushed the process-all-hook-deletions-on-failure branch 2 times, most recently from fa243a3 to 0269a79 Compare September 12, 2022 15:21
Signed-off-by: Laszlo Uveges <[email protected]>
@uvegla
uvegla force-pushed the process-all-hook-deletions-on-failure branch from 0269a79 to 95dde17 Compare September 12, 2022 15:28
Signed-off-by: Laszlo Uveges <[email protected]>
Signed-off-by: Laszlo Uveges <[email protected]>
Signed-off-by: Laszlo Uveges <[email protected]>
@joejulian joejulian added this to the 3.11.0 milestone Nov 8, 2022
@mattfarina mattfarina modified the milestones: 3.11.0, 3.12.0 Jan 18, 2023
@joejulian joejulian modified the milestones: 3.12.0, 3.13.0 May 5, 2023
@mattfarina mattfarina modified the milestones: 3.13.0, 3.14.0 Sep 25, 2023
@mattfarina mattfarina modified the milestones: 3.14.0, 3.15.0 Mar 13, 2024
@mattfarina mattfarina modified the milestones: 3.15.0, 3.16.0 Jun 12, 2024
@scottrigby scottrigby modified the milestones: 3.16.0, 3.17.0 Sep 11, 2024
@scottrigby scottrigby modified the milestones: 3.17.0, 3.18.0 Jan 15, 2025
@scottrigby scottrigby added the bug Categorizes issue or PR as related to a bug. label Mar 12, 2025
@nvanthao

nvanthao commented Mar 13, 2025 •

Copy link
Copy Markdown

Hi @uvegla,

I wanted to ask if you'd be willing to create a similar PR against the dev-v3

I've manually applied the changes from your PR to my local dev-v3 branch and confirmed they fix a bug I'm experiencing. You can see my test here: https://asciinema.org/a/htR5KLqDNoIf7XUI2mXGFFgys?t=5

If you'd prefer, I can also create the PR.

@uvegla

uvegla commented Mar 14, 2025

Copy link
Copy Markdown
Contributor Author

@nvanthao If you already got it working / have the change, please go for it by all means! 🙂 The real credit goes to @prafull01 for the original PR: #10811. I merely added the tests in this one. I would love to finally see this fixed in Helm, thank you for picking this up! 🙇🏻 🙂

@nvanthao

Copy link
Copy Markdown

thanks @uvegla, I've rebased the changes here #30673
I will also create a backport to dev-v3 once above PR is merged.

@scottrigby

Copy link
Copy Markdown
Member

@nvanthao If you already got it working / have the change, please go for it by all means! 🙂 The real credit goes to @prafull01 for the original PR: #10811. I merely added the tests in this one. I would love to finally see this fixed in Helm, thank you for picking this up! 🙇🏻 🙂

Thanks for noting this. We can squash commit #30673 when that gets in an add Co-authored-by commit trailer for @prafull01 when we do 👍 Always try our best to give credit where it's due. And appreciate your work on this as well!

@uvegla

uvegla commented Mar 18, 2025

Copy link
Copy Markdown
Contributor Author

Rebased and followed up on: #30673, closing this one 🙂 Thank you!

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

Labels

bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hook delete policy of "hook-failed" not honored for preceding resource on a failure

5 participants