Skip to content

Navigation Menu

Sign in
Sign up

NO-SNOW: Reduce CI flakiness with pytest --lf retry and drop rerunfailures - #2998

Draft
sfc-gh-turbaszek wants to merge 2 commits into
main from
turbaszek-NO-SNOW-ci-flake-lf-retry
Draft

NO-SNOW: Reduce CI flakiness with pytest --lf retry and drop rerunfailures #2998
sfc-gh-turbaszek wants to merge 2 commits into
main from
turbaszek-NO-SNOW-ci-flake-lf-retry

Conversation

@sfc-gh-turbaszek

@sfc-gh-turbaszek sfc-gh-turbaszek commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace pytest-rerunfailures / @pytest.mark.flaky with a tox/FIPS follow-up pass using pytest --lf --maxfail=5 --last-failed-no-failures none to retry a small number of potential flakes.
  • Remove the pytest_unconfigure socket workaround that existed only for rerunfailures shutdown hangs.
  • Fix test_fetch_batches_with_sessions to mock SnowflakeRestful.use_requests_session so OCSP SessionManager.use_session calls during cloud chunk downloads do not inflate call_count.

Test plan

  • Confirm Build and Test no longer hits pytest_rerunfailures / _enter_buffered_busy shutdown aborts
  • Confirm test_fetch_batches_with_sessions is stable across GCP/AWS/Azure jobs
  • Spot-check that a real multi-failure run still fails (follow-up --maxfail=5 does not greenwash widespread breakage)

Supersedes #2997 (opened from fork; secrets were unavailable).

Made with Cursor

...lures
Replace pytest-rerunfailures (and its shutdown crashes) with a follow-up
--lf --maxfail=5 pass, and fix test_fetch_batches_with_sessions mocking
SnowflakeRestful so OCSP session use is not counted.
Co-authored-by: Cursor <cursoragent@cursor.com>

codecov-commenter commented Aug 7, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.89%. Comparing base (50e7fc5) to head (7579611).

Additional details and impacted files
@@ Coverage Diff @@
## main #2998 +/- ##
==========================================
- Coverage 65.12% 64.89% -0.23% 
==========================================
 Files 123 123 
 Lines 17447 17447 
 Branches 2396 2396 
==========================================
- Hits 11362 11322 -40 
- Misses 5646 5683 +37 
- Partials 439 442 +3 

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sfc-gh-turbaszek sfc-gh-turbaszek added the NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md label Aug 7, 2026
... command
The follow-up `pytest --lf --last-failed-no-failures none` ran as an
unconditional second tox command, so a green suite collected nothing and
exited 5, failing every test job. Gate the retry on the first step's outcome
instead, matching how universal-driver reruns its suites, and restore the
single plain pytest command per tox environment.
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /