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

Rerun flaky tests in CI #1914

Merged
merged 4 commits into from
Dec 18, 2023
Merged

Rerun flaky tests in CI #1914

merged 4 commits into from
Dec 18, 2023

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Dec 15, 2023

Tests in CI are quite flaky lately. We have a retry_on_transient_errors wrapper to retry on OSError (git clone failed), TimeoutError or HTTP 502/504. But this wrapper just doesn't work (sorry I introduced it 2mo ago in #1725 🙄). This PR fixes this by using pytest-rerunfailures which seems to be far more robust and tested that doing it manually^^.

Note that only tests run in CI are rerun on failure. I did not make it a default locally as it's not compatible with --pdb. (+flaky tests are never failing locally in my experience).

@Wauplin Wauplin requested a review from LysandreJik December 15, 2023 17:42
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Wauplin
Copy link
Contributor Author

Wauplin commented Dec 15, 2023

Yay! 🎉 🎉 🎉 Should have done it earlier 😄

image

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7319ea4) 82.22% compared to head (faec54b) 82.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1914      +/-   ##
==========================================
+ Coverage   82.22%   82.31%   +0.08%     
==========================================
  Files          65       65              
  Lines        8092     8092              
==========================================
+ Hits         6654     6661       +7     
+ Misses       1438     1431       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Wauplin
Copy link
Contributor Author

Wauplin commented Dec 18, 2023

I'm merging this without review as it's mainly to fix internal testing. Happy to make a follow-up PR in case you have some feedback @LysandreJik. (I'm merging to be able to have stable CI on other opened PRs).

@Wauplin Wauplin merged commit a071655 into main Dec 18, 2023
16 checks passed
@Wauplin Wauplin deleted the try-fix-repo-test-os-errors branch December 18, 2023 10:12
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