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

Reduce flakiness of CI test runs #4652

Closed
wants to merge 5 commits into from

Conversation

mbargull
Copy link
Member

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 ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Nov 25, 2022
@mbargull
Copy link
Member Author

I didn't add a news entry because this is just chore that doesn't touch anything outside the test code.
If you'd still like to have a news entry, let me know.

@mbargull
Copy link
Member Author

mbargull commented Nov 25, 2022

Re: config=testing_config:
Previously, tests failed because (even when only rendering) concurrent writes/deletions around the {croot}/work happened at conda_build.config.Config.compute_build_id (at the end in its if old_dir != work_dir: branch) happened. I didn't dig into it, but it might just be that another test creates the work (without a timestamp) folder and then compute_build_id wants to move it.
In any case, testing_config sets the croot to testing_workdir and as such the single tests use their own root dir without seeing others' work folders.

@mbargull mbargull mentioned this pull request Nov 25, 2022
3 tasks
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
Copy link
Member

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

Copy link
Member Author

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 the condition 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?

@mbargull
Copy link
Member Author

Closing in favor of gh-4653

@mbargull mbargull closed this Nov 26, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants