Skip to content

fix(acceptance): poll current content after writes to tolerate CDN invalidation lag - #1690

Merged
TylerHillery merged 3 commits into
masterfrom
tyler/fix/versioning-acceptance-cdn-flake
Nov 10, 2026
Merged

TylerHillery merged 3 commits into
masterfrom
tyler/fix/versioning-acceptance-cdn-flake

Conversation

@TylerHillery

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Some versioning acceptance tests read an object's current content, write to it, then read it again right away. The CDN caches GET /object/authenticated/... and invalidates it asynchronously, so the second read can return the old body. This flaked in staging ap-southeast-1: https://github.com/supabase/storage-acceptance-runner/actions/runs/42855634166

What is the new behavior?

Those re-reads now poll for the expected content (1s interval, up to 15s) so the CDN cache has time to be invalidated.

Additional context

N/A

@TylerHillery
TylerHillery requested a review from a team as a code owner November 10, 2026 17:22
Copilot AI balanced review requested due to automatic review settings November 10, 2026 17:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues block approval of the object-versioning acceptance-test polling changes.

No open issues 🎉

What changed in this PR

This PR reduces flakiness in object-versioning acceptance tests by allowing time for asynchronous CDN cache invalidation after writes.

Changes:

  • Adds a helper that polls current content every second for up to 15 seconds, tolerating stale bodies and cached HTTP 400 responses.
  • Replaces six immediate content assertions with polling assertions.
File Description
acceptance/​specs/​rest-object-versioning.test.ts Adds bounded polling and applies it to current-content checks after writes.

Review effort: Balanced

@TylerHillery
TylerHillery force-pushed the tyler/fix/versioning-acceptance-cdn-flake branch from 327ad50 to 07c36f7 Compare November 10, 2026 17:25

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

@coveralls

coveralls commented Nov 10, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 42901688966

Coverage remained the same at 87.601%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16060
Covered Lines: 14511
Line Coverage: 90.35%
Relevant Branches: 10192
Covered Branches: 8486
Branch Coverage: 83.26%
Branches in Coverage %: Yes
Coverage Strength: 1353.73 hits per line

💛 - Coveralls

@TylerHillery
TylerHillery force-pushed the tyler/fix/versioning-acceptance-cdn-flake branch from 89aa623 to 4ca9f80 Compare November 10, 2026 21:05
@TylerHillery
TylerHillery merged commit 9f7b3a5 into master Nov 10, 2026
37 checks passed
@TylerHillery
TylerHillery deleted the tyler/fix/versioning-acceptance-cdn-flake branch November 10, 2026 21:14
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.

4 participants