Skip to content

Fix flaky test_versioned_route integration test - #600

Merged
cguldner merged 4 commits into
mainfrom
fix-flaky-versioned-route-integration-test
Sep 30, 2026
Merged

cguldner merged 4 commits into
mainfrom
fix-flaky-versioned-route-integration-test

Conversation

@cguldner

@cguldner cguldner commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

test_versioned_route uploaded to a fixed shared path /test.txt with the default add write 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:

  1. Scope all paths under a per-run namespace /Test/<timestamp>-<uuid> so concurrent runs can't collide.
  2. Upload with WriteMode.overwrite so leftover files can't cause a conflict.
  3. Make pytest_setup a yield fixture that cleans up the run's namespace on teardown.
  4. Remove max-parallel: 1 from 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.

…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

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.31%. Comparing base (4f28257) to head (a986124).

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           
Flag Coverage Δ
integration 64.34% <ø> (ø)
unit 65.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

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.
@cguldner
cguldner merged commit 5dc5f95 into main Sep 30, 2026
35 checks passed
@cguldner
cguldner deleted the fix-flaky-versioned-route-integration-test branch September 30, 2026 15:32
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