-
Notifications
You must be signed in to change notification settings - Fork 427
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
Reduce flakiness of CI test runs #4652
Conversation
Without config=testing_config the parallel tests use the same build folder/work dirs and thus randomly fail due to concurrent writes.
I didn't add a news entry because this is just chore that doesn't touch anything outside the test code. |
Re: |
A previous commit which switched to pytest-rerunfailures did not explain why it was changes. Overall, the history around which one is supposed to be used is unclear. Let's use flaky for now since - we use flaky's max_runs parameter currently, - flaky allows to filter reruns (e.g., by exception type)
pytest-rerunfailures | ||
flaky |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We recently switched to pytest-rerunfailures because it's better maintained and used in the conda code base. You should be able to achieve the same as the rerun_filter
parameter with the condition
parameter: https://github.com/pytest-dev/pytest-rerunfailures#re-run-individual-failures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We recently switched to pytest-rerunfailures because it's better maintained
Yeah, saw that too, but
You should be able to achieve the same as the
rerun_filter
parameter with thecondition
parameter: https://github.com/pytest-dev/pytest-rerunfailures#re-run-individual-failures
this appears to be just for the "outside" conditions but doesn't get the test's report information: https://github.com/pytest-dev/pytest-rerunfailures/blob/10.3/pytest_rerunfailures.py#L323-L324
I.e., pytest-rerunfailures
seems to lack comparable/flexible functionality w.r.t. flaky
.
AIUI, if we want to use pytest-rerunfailures
, we have to either be non-selective at all or add --only-rerun=ConnectionError
to addopts
in setup.cfg
and thus be too selective. Since the latter could become a footgun, the former is more sensible.
Do you want me to switch to pytest-rerunfailures
and thus remove the selectivity on ConnectionError
?
Closing in favor of gh-4653 |
Description
I started to include unrelated test fixes in gh-4650 to easier inspect failing/passing of relevant tests.
Those started to grow and it's cleaner to have them separated, anyway, so here we go.
Checklist - did you ...
news
directory (using the template) for the next release's release notes?