Skip to content

Re-run flaky E2E tests up to 3 times#6405

Merged
negz merged 3 commits into
crossplane:mainfrom
negz:cowardice
Apr 28, 2025
Merged

Re-run flaky E2E tests up to 3 times#6405
negz merged 3 commits into
crossplane:mainfrom
negz:cowardice

Conversation

@negz

@negz negz commented Apr 25, 2025

Copy link
Copy Markdown
Member

Description of your changes

This feels a little like giving up, but realistically right now ~80% of our E2E test runs fail. When they do, we mostly just re-run the entire failed suites. Each suite run takes ~20-25 mins to complete.

This argument will only re-run the specific test that failed, automatically. This should result in less time spent running and waiting for E2Es overall.

I have:

Need help with this checklist? See the cheat sheet.

Also, report slowest tests and use standard verbose logging for maximum
insight into progress.

This feels a little like giving up, but realistically right now ~80% of
our E2E test runs fail. When they do, we mostly just re-run the entire
failed suites. Each suite run takes ~20-25 mins to complete.

This argument will only re-run the specific test that failed,
automatically. This should result in less time spent running and waiting
for E2Es overall.

Signed-off-by: Nic Cope <[email protected]>
@negz
negz marked this pull request as ready for review April 25, 2025 19:22
@negz
negz requested a review from a team as a code owner April 25, 2025 19:22
@negz
negz requested a review from phisco April 25, 2025 19:22
@negz

negz commented Apr 25, 2025

Copy link
Copy Markdown
Member Author

Well this change worked as expected, except the TestUsageComposition test just actually failed four times in a row. 😢

I think we should make the change though - if we'd manually retried this test four times it would've run the whole suite four times and thus taken 80-100 minutes rather than 40.

negz added 2 commits April 25, 2025 12:24
For three total runs - not four.

Signed-off-by: Nic Cope <[email protected]>
I find it a lot easier to spot failed tests with this format, and I also
appreciate that it gives a summary of how long each test took to run.

Default to standard-verbose for when folks run locally.

Signed-off-by: Nic Cope <[email protected]>
@negz

negz commented Apr 26, 2025

Copy link
Copy Markdown
Member Author

the TestUsageComposition test just actually failed four times in a row

Due to #6408 - fixed in #6407.

@jbw976 jbw976 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems like a reasonable trade-off for more reliability now and we can keep making progress on #5671 as we find the time.

From your experience with this retry behavior, do we get any indication if we succeeded but had to retry a test to get there? or is that not very obvious unless you go looking into the logs?

Comment thread Earthfile
ARG GOARCH=${TARGETARCH}
ARG GOOS=${TARGETOS}
ARG FLAGS="-test-suite=base"
ARG GOTESTSUM_FORMAT="standard-verbose"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice, i also like that by default when running e2e tests locally we'll get the more realtime streaming logging output 👍

@negz

negz commented Apr 28, 2025

Copy link
Copy Markdown
Member Author

From your experience with this retry behavior, do we get any indication if we succeeded but had to retry a test to get there? or is that not very obvious unless you go looking into the logs?

It's just what you see in the runs for this PR. So no, it's not very easy to spot. I'm hoping BuildPulse will still highlight tests that're failing a lot though.

@negz
negz merged commit 70e1f59 into crossplane:main Apr 28, 2025
@jbw976 jbw976 mentioned this pull request May 14, 2025
17 tasks
@negz negz mentioned this pull request Jul 9, 2025
7 tasks
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