Repository navigation
store: a conditional write is an overwrite, as the Blob SDK requires - #10
Merged
Merged
Conversation
The gallery's conditional write passed ifMatch beside allowOverwrite: false, which
@vercel/blob refuses before sending anything ("ifMatch and allowOverwrite: false are
contradictory"). finishBuild logs a gallery failure and carries on, so every build since
the versioned gallery shipped drew its city and wrote its meta but never reached the
recent list. The stand-in stores in the tests accepted the combination.
BlobStore now asks for an overwrite whenever it sends ifMatch, and a new test drives the
real SDK with only its HTTP mocked (undici's MockAgent), checking the headers a
conditional, a plain and an overwriting write send, a lost race as StoreConflict, and
stat. Without the fix it fails with the production error.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 13, 2026
azank1
marked this pull request as ready for review
October 13, 2026 13:07
This branch was successfully deployed
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.
Every build since #8 shipped drew its city and wrote its meta, but none reached the recent list on the home page.
Cause. The gallery's conditional write sent
ifMatchbesideallowOverwrite: false.@vercel/blob2.8.0 refuses that combination before sending anything. Production logged it for each finish:finishBuildcatches gallery failures and carries on, sobuild-city.mjsreported "done". The stand-in stores in the tests accepted the combination, so the suite passed.Fix.
BlobStore.putasks for an overwrite whenever it sendsifMatch. A plain write still never overwrites unless asked.Test.
test/store-blob.test.tsdrives the real SDK with only its HTTP mocked (undici'sMockAgent;undiciis now an exact devDependency at the version already installed). It checks:StoreConflictstatfor a present blob and a missing oneWithout the fix, two of the four fail with the production error. Suite: 53 tests, 47 pass, 6 live tests skipped, 0 fail; typecheck clean.
Also confirmed in production while finding this (no change needed). The memory fix from #7 works. Rebuilding vercel replayed vercel/bridge, vercel/eve and vercel/next-evals-oss, the three repos that had failed as "too big" (vercel/bridge in 0.5 s). The city went from 19,089 commits with 3 failures to 21,336 with none. The production log reads
live 940 MB, rss 945 MBat the busiest point.After merge. Rebuild vercel. Then check that
/api/gallerylists it first with 21,336 commits. That proves the versioned read path, where the store keeps theversion=content-type parameter. Then rebuild the other gallery cities.