Skip to content
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

Do not promote when not ready on skip analysis #695

Merged
merged 9 commits into from
Sep 29, 2020
Merged

Do not promote when not ready on skip analysis #695

merged 9 commits into from
Sep 29, 2020

Conversation

worldtiki
Copy link
Contributor

@worldtiki worldtiki commented Sep 14, 2020

Fixes #362

if !canary.SkipAnalysis() {
return false
}

// regardless if analysis is being skipped, rollback if canary failed to progress
Copy link
Contributor Author

Choose a reason for hiding this comment

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

without this block, flagger immediately tries to promote the new version which at this point has 0 healthy pods.

@stefanprodan
Copy link
Member

@worldtiki have you managed to reproduce the condition when Flagger would promote a canary with 0 healthy pods? If so then it will be great to add an e2e test to https://github.com/weaveworks/flagger/blob/master/test/e2e-istio-tests.sh

@worldtiki
Copy link
Contributor Author

@worldtiki have you managed to reproduce the condition when Flagger would promote a canary with 0 healthy pods? If so then it will be great to add an e2e test to https://github.com/weaveworks/flagger/blob/master/test/e2e-istio-tests.sh

Sure.

Should I add a new test or create a separate file? That one looks like it's only testing happy paths where as this is more of an edge case.

@stefanprodan
Copy link
Member

@worldtiki you could add a new file and append it to Istio ClircleCI job definition here https://github.com/weaveworks/flagger/blob/master/.circleci/config.yml#L97

Thanks!

@@ -3,21 +3,6 @@
# This script runs e2e tests for Canary, B/G and A/B initialization, analysis and promotion
# Prerequisites: Kubernetes Kind and Istio

set -o errexit
Copy link
Member

Choose a reason for hiding this comment

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

Can you please add back set -o errexit to all scripts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course.

ps: I don't know if this new structure of tests makes sense. I'm happy to change this if you want.

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @worldtiki 🥇

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.

Do not promote when not ready/not live and skipping analysis
2 participants