Skip to content

Conversation

@agaudreault
Copy link
Member

@agaudreault agaudreault commented Jan 9, 2026

  • Always terminate running hooks (remove the finalizer) when a sync fails, errors or succeeds.
  • Always terminate running hooks when a sync is explicitly terminated.
  • Wait for the completion of SyncFail hooks before completing the sync.
  • Add e2e and unit tests
    Closes ArgoCD fails on hook-finalizer (after upgrade to 3.x) #23226

Add e2e test assertions to verify that hooks have their finalizers
removed after completion, both for successful and failed syncs.

This ensures:
- Hooks do not retain finalizers after sync operations complete
- Failed hooks also have finalizers properly removed
- The hook finalizer lifecycle is correctly managed

Also fixes comment typo: 'did not create' -> 'did create' in PostSyncHookFailure

Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
@bunnyshell
Copy link

bunnyshell bot commented Jan 9, 2026

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

Signed-off-by: Alexandre Gaudreault <[email protected]>
@agaudreault agaudreault changed the title Fix/hook finalizer termination fix(hooks): always remove finalizers Jan 9, 2026
@agaudreault agaudreault marked this pull request as ready for review January 12, 2026 18:08
@agaudreault agaudreault requested a review from a team as a code owner January 12, 2026 18:08
@agaudreault agaudreault changed the title fix(hooks): always remove finalizers fix(hooks): always remove finalizers (#23226) Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArgoCD fails on hook-finalizer (after upgrade to 3.x)

1 participant