Fix flaky test_versioned_route integration test - #600
Merged
Merged
Conversation
…r run
test_versioned_route uploaded to a fixed shared path (/test.txt) with the
default add write mode. When two workflow runs hit the shared test account
concurrently (e.g. ci.yml's Integration job and coverage.yml's
IntegrationCoverage job on the same event, or the nightly coverage cron
overlapping the automated spec-update PR), the second upload failed with
WriteConflictError('file'), blocking auto-merge non-deterministically.
- Scope every path under a per-process namespace (/Test/<timestamp>-<uuid>)
so concurrent runs never collide.
- Upload with WriteMode.overwrite so a leftover file from an aborted run
cannot cause a spurious conflict.
- Convert pytest_setup into a yield fixture that deletes the run's namespace
on teardown, so the shared account stops accumulating cruft.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #600 +/- ##
=======================================
Coverage 65.31% 65.31%
=======================================
Files 36 36
Lines 67969 67969
Branches 4904 4904
=======================================
Hits 44397 44397
Misses 23320 23320
Partials 252 252
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
max-parallel: 1 was added (4d2e420) to avoid race conditions in the integration tests against the shared account. Those races were the fixed shared paths, now scoped per pytest process, so the matrix jobs no longer collide and can run concurrently.
AndreyVMarkelov
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


test_versioned_routeuploaded to a fixed shared path/test.txtwith the defaultaddwrite mode. Since the integration suite runs from two workflows (ci.yml+coverage.yml, incl. a nightly cron) against one shared test account, concurrent runs collided →WriteConflictError('file'), non-deterministically blocking auto-merge on the spec-update PRs.Fix:
/Test/<timestamp>-<uuid>so concurrent runs can't collide.WriteMode.overwriteso leftover files can't cause a conflict.pytest_setupayieldfixture that cleans up the run's namespace on teardown.max-parallel: 1from the Integration matrix — it was added (4d2e420) solely to avoid these path races, which are now fixed at the source, so the matrix jobs can run concurrently again.