Repository navigation
fix(bb-file-bucket): return 404 for missing version downloads - #960
Merged
xyos merged 2 commits intoNov 4, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 2d2cb36 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
2 tasks done
xyos
approved these changes
Nov 4, 2026
xyos
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Explicit-versionId downloads now resolve only from that version, matching get().
harsh62
added a commit
that referenced
this pull request
Nov 4, 2026
Brings in the blocks CLI (#1203), CLI-calling templates (#1207), AuthBasic sign-in metrics (#1296), docs corrections (#1288), the native export type-name rule (#1134), the consolidated Data block bb-database (#774), CI checkout of the PR merge commit (#1291) and smaller fixes (#960, #1292, #1294). Conflict resolutions: - packages/bb-auth-basic, bb-auth-cognito/DESIGN.md, bb-auth-oidc: kept deleted. #1288's cookie correction already holds in Auth's DESIGN.md; #1203's `cdk-blocks secret` wording has no Auth counterpart (Auth's README uses `npm run secret`). #1296's metrics are not ported here (see the follow-up and the pending-changes note). - Changesets naming deleted packages: auth-basic-signin-metrics and bb-auth-oidc-cdk-blocks-secret removed and folded into auth-replaced-blocks-pending-changes.md; docs-correct-infra-guidance drops bb-auth-cognito. - templates/auth-cognito: not re-added (its e2e test is git rm'd). templates/auth/aws-blocks/scripts/*: deleted, as #1207 deleted them from every template; auth's package.json, README and gitignore auto-merged onto the cdk-blocks scripts. - templates/default and react e2e tests: kept this branch's Auth sign-up-with-code flow and its per-run username, plus main's package.json port lookup and graceful server shutdown. - create-blocks-app cli.test.ts: main's per-template tables name `auth`, not `auth-cognito`. - package.json workspaces: bb-database added, old auth packages stay removed, bb-auth kept. packages/blocks/package.json: main's cdk-blocks bin, tsx dependency and cli tests, plus this branch's test files. package-lock.json regenerated with `npm install --package-lock-only`, keeping main's @aws/dsql-lint 0.2.20. - docs/DECISIONS.md: both sides kept. main's D-021 (export type names) keeps its number; the auth decision becomes D-022, and every link to it is updated. D-008's reference keeps the bb-auth path, without the PR numbers #1288 removed. - native fixture 27 dart/client.dart: regenerated with regenerate-all.sh; the drift is #1134's APILink plus this branch's positional params. - bb-database README quick start: Auth from @aws-blocks/bb-auth instead of AuthBasic.
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.
Problem
A local FileBucket download URL with an explicit
versionIdsilently serves the current file when the requested version is missing but a current file still exists. For example, after an older version is permanently deleted,bucket.get(path, { versionId })returnsnull, but fetching the URL previously issued for that version returns HTTP 200 with the newer version's content.The dev file-server only switches away from the current file when the requested version exists. If it does not exist, the request falls through to the current file instead of returning 404. This fallback is still present on current main.
Issue #, if available: None.
Changes
versionIddirectly to that version's body and metadata. A missing version reaches the existing 404 response instead of falling back to current content.versionId, including their content types.@aws-blocks/bb-file-bucketand@aws-blocks/blocks.The AWS runtime, public library API, token validation, and mock storage format are unchanged. Merged PR #693 reconciles the current object's stored copies after version deletion; this PR independently fixes HTTP requests that explicitly select a version. It does not add historical delete-marker support.
Validation
bucket.get()returningnull, and that current downloads still return the correct content and Content-Type with and without an explicit current version ID.npm run buildnpm run lintandnpm run lint:depsnpm test -w @aws-blocks/bb-file-bucketnpm testacross all workspaces, with serial test-file execution and all four generate-client fixture cases run in separate processes; none excludednpm run test:e2e:local, including comprehensive E2E, vendorize, IAM-boundary synth, and background-suite regression testsgit diff --check upstream/mainChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.