Skip to content

Run post-rollout hooks when skipAnalysis is true#1918

Open
singhvishalkr wants to merge 1 commit into
fluxcd:mainfrom
singhvishalkr:fix-post-rollout-hooks-skip-analysis
Open

Run post-rollout hooks when skipAnalysis is true#1918
singhvishalkr wants to merge 1 commit into
fluxcd:mainfrom
singhvishalkr:fix-post-rollout-hooks-skip-analysis

Conversation

@singhvishalkr
Copy link
Copy Markdown

When skipAnalysis: true is configured, the canary promotion completes but post-rollout webhooks are never executed. I hit this while setting up a deployment notification pipeline.

The issue is in shouldSkipAnalysis - it copies the canary spec to primary, marks the canary as succeeded, but then returns without calling runPostRolloutHooks. The normal promotion path in the finalising phase (line 414) does call it.

The fix adds a single line to call runPostRolloutHooks before the success message is logged. I also updated the skip-analysis test case in events_test.go to verify the post-rollout webhook now fires.

Fixes #1195

When skipAnalysis is enabled and the canary is promoted, the
post-rollout webhooks were not being executed. This fix ensures
that runPostRolloutHooks is called in shouldSkipAnalysis, matching
the behavior of the normal promotion path.

Fixes fluxcd#1195

Signed-off-by: Vishal Kumar Singh <vishal.kr.singh2021@gmail.com>
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.

post-rollout webhhok not exectued

1 participant