Skip to content

update canary status before eventing #1780

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

luisr-escobar
Copy link

There is currently a mismatch on the checksum of the generated canary inital events compared to the subsequent events which is caused by the canary object status field lastAppliedSpec not being updated before the initial events are sent.

@luisr-escobar
Copy link
Author

@aryan9600 @stefanprodan would you be able to take a look at this PR?

Signed-off-by: luisr-escobar <[email protected]>
Signed-off-by: luisr-escobar <[email protected]>
@@ -866,6 +873,12 @@ func (c *Controller) checkCanaryStatus(canary *flaggerv1.Canary, canaryControlle
}

var err error
// update canary status to ensure checksum is up to date in all webhooks
if err := canaryController.SyncStatus(canary, flaggerv1.CanaryStatus{Phase: flaggerv1.CanaryPhaseProgressing}); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will break the whole thing, we can't set CanaryPhaseProgressing here, the canary status is synced only in shouldAdvance.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefanprodan local integration tests are passing and also validated that the image generated by this change works on a dev cluster but to your point I've moved the code block under shouldAdvance

@luisr-escobar
Copy link
Author

Hi @stefanprodan please let me know if any further updates are needed

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.

2 participants