Skip to content

Fix catch-all empty string in CI pytest --only-rerun#4239

Merged
Wauplin merged 1 commit into
huggingface:mainfrom
albertvillanova:fix-ci-rerun
May 20, 2026
Merged

Fix catch-all empty string in CI pytest --only-rerun#4239
Wauplin merged 1 commit into
huggingface:mainfrom
albertvillanova:fix-ci-rerun

Conversation

@albertvillanova

@albertvillanova albertvillanova commented May 19, 2026

Copy link
Copy Markdown
Member

Fix catch-all empty string in CI pytest --only-rerun.

This PR fixes a typo in the --only-rerun regular expression pattern in the PYTEST command ( python-tests.yml workflow file) by removing an extra pipe character.

  • Remove accidental || (double pipe) in the --only-rerun regex pattern in the PYTEST command, which introduced an empty alternation that matched every test failure, causing all failing tests to be retried rather than only the intended transient errors.

Note

Low Risk
Low risk: CI-only change that narrows the --only-rerun regex so retries only trigger for intended transient errors instead of matching everything.

Overview
Fixes a typo in .github/workflows/python-tests.yml by removing an empty alternation from the pytest --only-rerun regex.

This prevents the CI rerun plugin from retrying all failures and limits reruns to the specified transient error patterns (e.g., timeouts/502/504).

Reviewed by Cursor Bugbot for commit b163ea4. Bugbot is set up for automated code reviews on this repo. Configure here.

@bot-ci-comment

Copy link
Copy Markdown

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.

@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.18%. Comparing base (1daa48b) to head (b163ea4).
⚠️ Report is 345 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4239      +/-   ##
==========================================
+ Coverage   75.00%   77.18%   +2.18%     
==========================================
  Files         145      171      +26     
  Lines       13978    19434    +5456     
==========================================
+ Hits        10484    15001    +4517     
- Misses       3494     4433     +939     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Wauplin Wauplin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice catch 🤦 How did you ended up finding about this ?

@albertvillanova

Copy link
Copy Markdown
Member Author

Thanks for your fast review, @Wauplin.

We were using the same regex in trl and I was wondering why torch.OutOfMemoryError was (correctly) being rerun. 😅

@Wauplin

Wauplin commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Thanks for backporting it :)

@Wauplin Wauplin merged commit a1de080 into huggingface:main May 20, 2026
17 checks passed
@huggingface-hub-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped as part of the v1.16.0 release.

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