Skip to content

Do not promote when not ready on skip analysis#695

Merged
stefanprodan merged 9 commits intofluxcd:masterfrom
worldtiki:skip_analysis
Sep 29, 2020
Merged

Do not promote when not ready on skip analysis#695
stefanprodan merged 9 commits intofluxcd:masterfrom
worldtiki:skip_analysis

Conversation

@worldtiki
Copy link
Contributor

@worldtiki worldtiki commented Sep 14, 2020

Fixes #362

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!

# 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