Skip to content

docs: KVStore's 409 and local data file, AppSetting's data file, and RawRoute params locally - #1509

Merged
xyos merged 1 commit into
mainfrom
docs/atomic-writes-local-behaviour
Nov 18, 2026
Merged

xyos merged 1 commit into
mainfrom
docs/atomic-writes-local-behaviour

Conversation

@xyos

@xyos xyos commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A few Building Block docs were silent or inaccurate on behaviour users ask about: which status a failed KVStore condition reaches the client with, what happens when two processes share a store's local data file, how RawRoute fills params locally, and where AppSetting's mock keeps its values.

Issue #, if available: none

Stack: 1 of 5, the bottom PR (base main). The PRs above it document the bb-auth password policy (#1510), add the cdk-blocks docs command (#1511), point the scaffolded docs at it (#1512) and add --output json (#1521). This PR stands alone: it changes no code.

Rebased on main after #1453 (KVStore consolidation), #1498 (findable docs) and #1608 (KVStore docs). DistributedTable is now folded into KVStore, so its README edit is gone. #1498 already documents atomic conditional writes and the dev server's Frontend server unavailable (502), so this PR no longer adds them; it keeps what main still lacks.

Changes

Docs only (bb-kv-store, bb-app-setting, core, patch):

  • KVStore: a failed condition is status 409 in the JSON-RPC error, and HTTP 409 only when the namespace sets httpErrorStatus: true (the error table said "Status 409"). The Local development section says that the mock reads store.json only when it constructs the store, so two processes on one .bb-data folder (two dev servers, or a script beside the dev server) don't see each other's writes and can overwrite them.
  • core: a RawRoute fills params the same way under npm run dev and deployed.
  • AppSetting: its mock keeps values in the shared .bb-data/settings.json, not .bb-data/settings/{fullId}/value.json.

No breaking change.

Validation

Run locally at the stack top (f05527191, on main at 03778d9f6) with Node 22.23.1 (.nvmrc):

The full suites ran on the previous head (b8a78177a, on main at d01c34c96), Node 22.23.1, before this rebase onto nine more main commits; the rebase changed only bb-kv-store/README.md (a conflict with #1608) in this stack's own diff:

  • npm run test:e2e:local: exit 0; 580 tests, 574 pass, 0 fail, 6 skipped.
  • npm test: 13,802 tests, 13,767 pass, 21 fail, 10 skipped. Every failure is a dev-server, signal or file-watcher test in core, hosting or blocks' cli/context.test.js (none in cdk-blocks docs, bb-auth, bb-kv-store or create-blocks-app), and the log has 46 EMFILE errors from fs.watch: this machine's fs.inotify.max_user_instances (128) was used up by other processes. CI runs these suites.

No new tests: the change is documentation only. No sandbox run: nothing here changes deployed behaviour or serialization.

Checklist

  • PR description included
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@changeset-bot

changeset-bot Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d1049fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@aws-blocks/bb-kv-store Patch
@aws-blocks/bb-app-setting Patch
@aws-blocks/core Patch

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

@xyos
xyos added this pull request to stack #1513 November 15, 2026 22:24
@xyos xyos changed the title docs/atomic writes local behaviour docs: atomic conditional writes, local behaviour answers, and the dev server's frontend 502 Nov 15, 2026
@xyos
xyos marked this pull request as ready for review November 16, 2026 14:56
@xyos
xyos requested a review from a team as a code owner November 16, 2026 14:56
…RawRoute params locally

Main now documents atomic conditional writes and the dev server's 502 (#1498), so this keeps what it
still lacks:

- KVStore: a failed condition is status 409 in the JSON-RPC error (HTTP 409 only with httpErrorStatus:
  true); the mock reads store.json only when it constructs the store, so two processes can overwrite.
- AppSetting: the mock's data lives in .bb-data/settings.json.
- core: RawRoute params are the same locally and deployed.

This branch had an error being deployed

1 failed and 1 inactive deployments
agent-bench — d1049fa2 Deployed Nov 18, 2026 by xyos via bench / summary #6112
e2e — d1049fa2 Deployed Nov 18, 2026 by xyos via E2E Teardown Verify #7041
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