Skip to content

fix(infra): Fix test_dual_write test pollution causing flakes#104741

Merged
rbro112 merged 1 commit intomasterfrom
ryan/fix_test_dual_write_test_pollution_causing_flakes
Dec 11, 2025
Merged

fix(infra): Fix test_dual_write test pollution causing flakes#104741
rbro112 merged 1 commit intomasterfrom
ryan/fix_test_dual_write_test_pollution_causing_flakes

Conversation

@rbro112
Copy link
Copy Markdown
Member

@rbro112 rbro112 commented Dec 11, 2025

Fixes the new #1 offending flaky test found with shuffle-tests, test_dual_write.
Screenshot 2025-12-10 at 9 39 00 PM

The underlying issue was a mutation of global state that would only be hit when test_dual_write__min_zero was ran before test_dual_write. This fixes this with a proper copy/mutation

Repro'd and confirmed fixed with

pytest tests/sentry/workflow_engine/handlers/condition/test_issue_occurrences_handler.py::TestIssueOccurrencesCondition::test_dual_write__min_zero tests/sentry/workflow_engine/handlers/condition/test_issue_occurrences_handler.py::TestIssueOccurrencesCondition::test_dual_write -v

@rbro112 rbro112 requested a review from a team as a code owner December 11, 2025 05:35
Copy link
Copy Markdown
Member Author

rbro112 commented Dec 11, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rbro112 rbro112 changed the title Fix test_dual_write test pollution causing flakes fix(infra): Fix test_dual_write test pollution causing flakes Dec 11, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #104741      +/-   ##
===========================================
- Coverage   80.60%    80.48%   -0.12%     
===========================================
  Files        9356      9351       -5     
  Lines      403999    401700    -2299     
  Branches    25813     25813              
===========================================
- Hits       325638    323305    -2333     
- Misses      77919     77953      +34     
  Partials      442       442              

@rbro112 rbro112 merged commit 7323186 into master Dec 11, 2025
68 checks passed
@rbro112 rbro112 deleted the ryan/fix_test_dual_write_test_pollution_causing_flakes branch December 11, 2025 17:41
@github-actions github-actions bot locked and limited conversation to collaborators Dec 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants