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

tests: AllOf failing immediately if fail-fast #5673

Merged
merged 1 commit into from May 14, 2024

Conversation

phisco
Copy link
Contributor

@phisco phisco commented May 10, 2024

Description of your changes

e2e-framework has its own fail-fast flag, see docs.

This makes funcs.AllOf aware of it, skipping the rest of the provided functions in fail-fast mode.

Fixes #5672.

I have:

Need help with this checklist? See the cheat sheet.

Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
@phisco phisco requested a review from a team as a code owner May 10, 2024 14:26
@phisco phisco requested a review from turkenh May 10, 2024 14:26
Copy link
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me @phisco!! just a question about the flag from the gha workflows getting down into the test code...

@@ -66,13 +66,18 @@ const DefaultPollInterval = time.Millisecond * 500

type onSuccessHandler func(o k8s.Object)

// AllOf runs the supplied functions in order.
// AllOf runs the supplied functions in order. If a function fails the test and
// the environment is configured to fail fast (e2e-framework's -fail-fast flag)
Copy link
Member

Choose a reason for hiding this comment

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

looks like we are specifying the intent to fail fast with -test.failfast -fail-fast in the e2e step https://github.com/crossplane/crossplane/blob/master/.github/workflows/ci.yml#L306C47-L306C72 - were you able to also verify that the flag is making it down into this testing context correctly?

Copy link
Contributor Author

@phisco phisco May 10, 2024

Choose a reason for hiding this comment

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

yes, in our specific case, we do build our environment from flags, whether another user will pass down that correctly it's up to the user.

@phisco phisco merged commit 0d0473e into crossplane:master May 14, 2024
16 of 17 checks passed
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.

e2e tests should fail fast
2 participants