Repository navigation
Add native AWS store providers - #414
ChristianPavilonis wants to merge 31 commits into
Conversation
5dc18fe to
63892b0
Compare
The startup failure tests in native_aws_startup.rs reserve a loopback
port by binding and dropping a listener, pass it to the host, wait for
the host to exit and then assert that nothing answers on that port.
Once the host has exited the check can only reach another test's
fixture that was given the released port, and with the accepted streams
blocking again it did so in 2 of 25 macOS runs ("startup failure must
happen before listener acceptance").
Hosts that must fail now start through ChildHost::spawn_failing, which
keeps the reservation bound, but not listening, until the host is
dropped, so nothing can answer the check. assert_no_listener also
asserts that the host never reported a failed bind on the held port.
This follows the reservation change PR #519 makes in
production_hosting.rs (09b09d9, prk-Jr). The successful startup test
keeps releasing its reservation so the host can bind it.
|
For the identity integration branch (#495), I pushed
|
explicit_production_initializer_uses_owned_options_and_prepared_stores read /state from the address it reserved before spawning. CI saw another test's server answer there; after a respawn the live host's address is server.addr().
|
For the identity integration branch (#495), I pushed |
The generated initializer wrote PROOF_ENTERED with std::fs::write, which creates the file before writing the resolved secret. App::ready reads the marker as soon as the path exists, so it could read it empty and fail "nested secret must resolve before readiness marker" (left "", right "secret-A"), as CI saw on PR #514. The secret had already resolved; only the marker was observed half written. The initializer now writes a staged file beside the marker and renames it into place, so the marker appears with its content.
|
For the identity integration branch (#495), I pushed |
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Thread replies for the native AWS store review. The PR follow-up comment covers the summary-only points and local verification.
|
Review follow-up: f1f18b8a on top of A few points from the review summaries that don't have their own thread:
Local Linux checks passed: 90 AWS provider tests, 429 default and 430 AWS-enabled Axum library tests, six AWS startup tests, 261 CLI tests serially, both generated loopback proofs, the independent pinned-image emulator suite, and all 16 Node admin/runner tests. Scoped all-feature/all-target Clippy, the SDK isolation check, settings-only Wasm, the all-feature Axum demo build, formatting, docs, and workflow lint passed. No macOS rerun or real AWS calls. Hosted checks for this commit are separate from these local results. |
prk-Jr
left a comment
There was a problem hiding this comment.
PR Review
Summary
Follow-up review at f1f18b8a. Commit f1f18b8a fixes every blocking finding from my earlier review at 3733482f, and I checked each one in the code rather than relying on the thread replies. One new blocker stops this from being approved: the branch no longer merges with its base. issue-397-diagnostics-proxy-trust-spec has moved to 3f6d0da6, and git merge-tree --write-tree reports content conflicts in six files. Because the PR is conflicting, GitHub Actions has not run on this head at all, so none of the new CI steps added here have run in hosted CI.
😃 Praise
- The fixes come with regressions that would catch a revert. As a mutation check, I narrowed
validate_tableback toACTIVE-only, andpreparation_describes_and_accepts_supported_active_and_updating_tablesfailed. - The
run_appandrun_app_with_preflightlocator refusal never reads the locator's value. The test checks that the sentinel path does not appear inDebugoutput. - The new strict-only secret alias check (
validate_local_secret_namespace) is a good answer to the aliasing question. It keeps today's development behaviour, rejects the ambiguous case where startup is strict, and still allows one local ID next to AWS-bound or supplied IDs. - The new CI step uses
run_test_nonzero.shwith named sentinels, so a test that is filtered or cfg'd out fails the step instead of passing with zero tests run.
Prior findings status (my review at 3733482f)
- ✅
run_appignoredEDGEZERO__STORE_BINDINGS_FILE.capture_dev_environmentnow rejects the locator (dev_server.rs:1089), and the demo and the guide userun_generated_app. - ✅ AWS fixtures failed on macOS (
WouldBlock). Every non-blocking accept site now restores blocking mode (dynamodb_tests.rs:150,secrets_manager.rs:462, and the sharedblocking_accept.rshelpers). Locally on macOS,cargo test -p edgezero-store-aws --all-features --libpassed 3 of 3 runs (90/90 each), and--test native_aws_startuppassed 3 of 3 runs. - ✅
UPDATINGtable status was rejected. It is now accepted (dynamodb_kv.rs:672), and the mutation check above confirms the test covers it. - ✅ SDK connectors accumulated under tight limits. The connect timeout is now constant (
dynamodb_kv.rs:616-620), andconnector_timeout_is_stable_while_request_budgets_shrinkcovers it. - ✅ Docs contradicted the code.
single_store_kinds, the missingaws-dynamodb, and the draft and process wording are gone.[limits.aws]is documented atnative-aws-stores.md:204. The Config and Secret Store sections are back, and the absolute-root requirement is stated. - ✅ No CI job ran the axum lib tests with an
aws-*feature. Theaws-stores,aws-dynamodb --libstep now has sentinels. I ran the exact command locally: exit 0, 429 passed. It has not run in hosted CI, as explained below. - ✅ ❓ Local secret IDs shared env variables. Answered and enforced for strict startup and explicit bindings validation (
native_bindings.rs:557,native_stores.rs:285). - ✅ ❓ Container pulls in the required CLI job. Moved to the separate advisory
native-aws-emulatorjob. - ✅ Guide's
config pushcommand could not reach the guard. It now uses the typed<your-app>-cliform. - ✅ Non-blocking items: the trimmed secret name length (now measured with
store_name), the compiled-out AppConfig provider reported as a missing token (token capture is now gated on the feature, and the error names it), the timeout ordering rule and theaws-storeswording (both documented), and the CLI reference flags (added). On fixed trusted bounds for env-selected files, I accept the explanation and the docs; this remains a possible follow-up.
Findings
Blocking
-
🔧 The branch conflicts with its base, so this head has had no hosted CI. Running
git merge-tree --write-tree <base 3f6d0da6> <head f1f18b8a>(merge basec317517c) gives content conflicts in:crates/edgezero-adapter-axum/src/dev_server.rs(10 hunks, including two large runtime/test hunks)run_options.rsservice.rstests/fixtures/production_host.rs(3 hunks)CHANGELOG.mdexamples/app-demo/Cargo.lock
They come from the base's later proxy trust, diagnostics, buffered-JSON and production-hosting review fixes (
48097ab1,64447b46,d37a57b8). The resolution is not mechanical. For example, inrun_options.rsthe env-setting classifier has to keep both this PR's["store_bindings_file"] => STORE_BINDINGS_FILEarm and the base'snative_request_settingfallback (TRUSTED_PROXY_CIDRS,FORWARDING_HEADER_FAMILY,LOGGING__REQUEST_RECORDS). If either is dropped, those settings are misclassified, or the locator is no longer recognised by the runners that now refuse it.Because the PR is
CONFLICTING, GitHub created nopull_requestruns forf1f18b8a: zero check runs on the commit. The last green run is from 2026-11-26, at an earlier head. So the new CI steps (the axumaws-*lib step, the generated native AWS and DynamoDB steps, and the advisory emulator job) have not run on hosted CI.Fix: merge or rebase onto the current
issue-397-diagnostics-proxy-trust-spec, resolve the conflicts so both sides' settings and startup ordering survive, and let the full workflow run green on the new head. I'll re-review the resolution diff.
Non-blocking
- 📝
config validate --adapter <x>without--store-bindingsnow enters bindings-only mode and errors (for--adapter fastly, "supported only for--adapter axum"). This is documented incli-reference.mdand--adapteris new onvalidate, so nothing breaks. It is noted only in case someone expects--adapterto scope ordinary validation, as it does on other subcommands.
CI Status
- Hosted (GitHub Actions) at
f1f18b8a: no runs. The PR is conflicting with its base, sopull_requestworkflows were not triggered. Combined status:pending, 0 contexts. - Local, macOS, at
f1f18b8a, toolchain 1.98.1:cargo fmt --all -- --check: PASScargo clippy -p edgezero-store-aws -p edgezero-adapter-axum -p edgezero-cli --all-targets --all-features -- -D warnings: PASScargo test -p edgezero-store-aws --all-features --lib: PASS 3/3 runs (90 passed each)cargo test -p edgezero-adapter-axum --features aws-stores,aws-dynamodb,test-utils --lib: PASS (430 passed)cargo test -p edgezero-adapter-axum --features aws-stores,test-utils --test native_aws_startup: PASS 3/3 runs (6 passed each)cargo test -p edgezero-adapter-axum --lib(default features): PASS (428 passed)cargo test -p edgezero-cli --lib: PASS (261 passed)- The new CI sentinel step (
run_test_nonzero.sh … --features aws-stores,aws-dynamodb --lib): exit 0
- Not run:
- the full workspace suite
- the WASM checks
- the ignored generated-build proofs
- the Docker emulator suite
- anything against real AWS
- Not re-read line by line in this pass: the lockfiles and the
docs/superpowersplan and spec files. Unchanged production code that I already reviewed at3733482fwas not re-read either; this pass focused on the3733482f..f1f18b8adelta and the touched production paths.
| } | ||
| if !matches!( | ||
| table.table_status(), | ||
| Some(TableStatus::Active | TableStatus::Updating) |
There was a problem hiding this comment.
😃 Using the typed TableStatus enum here is cleaner than the old string compare, and the regression really guards this line: narrowing it back to Some(TableStatus::Active) makes preparation_describes_and_accepts_supported_active_and_updating_tables fail.
| } | ||
| } | ||
|
|
||
| fn timeout_policy(limits: DynamoDbKvLimits, budget: Duration) -> TimeoutConfig { |
There was a problem hiding this comment.
😃 Holding the connect timeout constant while the attempt and operation timeouts still shrink with the budget fixes the connector cache growth without loosening any deadline. The comment explains why, which will stop someone "optimising" it back later.
| let Some(key) = os_key.to_str() else { | ||
| continue; | ||
| }; | ||
| if is_store_bindings_locator_key(key) { |
There was a problem hiding this comment.
😃 Failing closed here before any store opens, without ever reading the locator's value, is the right shape. 📝 When you resolve the base conflict, keep this check: dev_server.rs has 10 conflict hunks against the current base, and this one sits in the same capture_dev_environment loop the base also changed.
Current review readiness
Ready for review. Required current-head CI passed at
c66f93f118141a2ed7469a8ab96b12902f3854e6: test run 42924131967.Minimal fixes originate in #414 and are merged upward:
Deadline; non-timeouts remainUnavailable. The previously failing hosted timeout test and all 78 provider cases now pass without assertion, retry or duration changes.aws-types =1.6.0andaws-smithy-runtime-api =1.19.0. This prevents the schema mismatch and preserves the explicit older behavior version instead of switching retry policy or suppressing deprecations. A fresh consumer passes with compiler and Clippy warnings denied throughout.Local final-top Axum checks pass 488 unit, 28 contract, six AWS startup, four celld startup and 36 hosting cases. Final-top workspace strict Clippy and formatting pass. The prior stable checkpoint passed all six mandatory commands; unchanged inputs retain their receipts, while fresh current-head CI checks the combined state. The current ready state supersedes historical draft-only prerequisites below; unexecuted deployment acceptance is not claimed complete. An additional Fastly WASM runtime job was still running at transition and is not counted as passed. No TS work or deployment qualification is a review prerequisite. Integration #462 remains draft; reviewers
aram356,prk-Jranddhruv8shremain requested. Stack465 and PR bases are unchanged; #453 is excluded.Current review-stack checkpoint
Publication head:
c66f93f118141a2ed7469a8ab96b12902f3854e6. This cleanup preserves the existing feature unit and PR identity. The additional change is the completed generated-native build correction: image-only code now follows the scaffold's existing Fastly-example selection, with no request-policy change. Its focused generator/native proof is retained; fresh per-branch hosted checks are not assumed green.Review order: #275 → #406 → #407 → #409 → #414 → #422 → #439 → #454. Draft integration checkpoint: #462. New SDK/group/codec/phase development and unrelated TS work are not prerequisites or additions to this PR. Earlier notes below retain their original tested revisions and limits; they are not a whole-tree pass for this new head.
Earlier implementation and proof notes
RC refresh checkpoint, 2026-11-10
Current head:
48761e3e528eae0481e9f6e2eb30c0002f00d239.Only the AWS provider delta is replayed onto the updated hosting/diagnostic stack. Duplicate historical foundation/hosting commits are omitted. Explicit production options and initializer startup have a TCP no-ambient-merge regression. Ordinary test PR coverage remains unfiltered; an old donor filter was removed again.
Feature proof passes 417 Axum unit, 5 AWS startup, 33 hosting, 74 AWS provider, 256 CLI unit and 15 Node runner cases, scoped strict Clippy and SDK-isolation checks. Parent namespace/CI composition reruns pass all 5 AWS startup, 33 hosting and 35 Node CI cases. All five tracked locked fetches pass.
Generated native consumer/DynamoDB and pinned disposable-service runtime proofs are still pending integration execution. Bounded retained SDK values are not an RSS cap; timeout cancellation does not prove blocking credential work stopped. AWS clients intentionally retain their normal credential chain, separate from explicit hosting-source selection. No cloud acceptance is claimed.
Draft pending fresh hosted checks and the combined RC audit. Two unchanged native default-parallel deadline misses remain recorded and unclassified; serial passes and untouched-foundation parallel passes do not clear them. No timing bound was relaxed. No deployment, main merge, security-alert dismissal or review-thread resolution occurred. Historical design/review context follows.
Summary
Sendsetup futures.Design and boundaries
This adds native store providers, not a new HTTP runtime.
edgezero-store-awsimplements the existing core store traits and does not depend on Axum. Axum owns provider selection and startup composition; core owns portable handles, per-ID registries and typed configuration resolution.The portable
edgezero.tomldeclares logical store IDs and defaults. AWS resource references belong in a separate versioned native bindings document, selected through an absolute file path inEDGEZERO__STORE_BINDINGS_FILEor through explicitAxumRunOptions. Applications can also supply ready handles or non-Senddeferred setup, without a plugin registry.Each declared ID selects one supplied, explicitly bound or implicit local source. Supplied/file collisions and undeclared IDs are rejected. The runner validates all sources before opening runner-owned local stores or polling deferred setup.
CONFIG_DIR/DATA_DIRare required only for remaining local bindings. An unavailable selected provider fails startup; it never falls back to local data.ConfigStorereadsSecretStorereadsKvStoreoperationsflowchart TD Bindings[Bindings and supplied inputs] --> Validate[Validate sources and compiled providers] Validate --> Prepare[Assemble app and prepare stores in the native runtime] Prepare --> Registries[Complete per-ID registries] Registries --> Initialize[Run app-owned initializer when supplied] Initialize --> Serve[Bind listener and serve requests]One shared AWS preparation session owns startup budgets, client reuse and snapshot deduplication. The initializer receives the same registries used by requests. The application chooses its required config keys, schemas, secret checks and retained startup state; the framework does not infer those requirements or promise an atomic revision across remote resources.
AWS features are default-off and native-only. Existing entrypoints retain their local defaults; newly generated entrypoints select strict startup only when the bindings-file locator is present. Trusted Server adoption is separate work, and this does not claim a source-compatible upgrade from older EdgeZero versions across the #275/#406 prerequisites.
Stack and scope
Existing draft stack member based on
docs/outbound-http-spec/ #275 atea66eff045512cccc60646d6ec339e83ff44fed7, with the compatible #406 production lifecycle bridge. Neither prerequisite PR was rewritten or merged. The user approved adding DynamoDB on this same branch/PR and committing/pushing it after checks.Real AWS/IAM/capacity/deployment/image acceptance remains explicitly excluded. No real AWS service calls, infrastructure changes, image pulls or deployments were performed. SDK fixtures use dummy credentials, isolated or bypassed profile discovery, and literal-loopback endpoints.
DynamoDB KV
dynamodb-kvprovider / generatedaws-dynamodbfeature; existingaws-storesremains AppConfig Agent + Secrets Manager only.[kv.<id>]binding with explicit region/table/physical namespace, no credential or endpoint fields. Normal operator-owned SDK credential/endpoint policy remains supported.pk/sktable; bounded DescribeTable preflight, exact table-name/schema checking, no provisioning or local fallback. All-remote KV needs noDATA_DIR.DynamoDB is live storage, not a retained startup snapshot. The existing default 8 MiB retained-payload cap is per shared config/secret preparation session, not process/RSS or live database contents. Config/secrets still adopt remote changes only on restart; no live config/secret refresh or mutation is added.
Bindings validation remains structural-only / provider availability unknown. No offline Cargo resolver or guessed availability verdict is shipped. Custom shell actions remain untouched.
Verification
Original snapshot phase: all 24 post-rebase gates passed at its recorded source checkpoint; historical evidence remains in the original spec/plan and
/tmp/native-store-integration/final-checks/. This does not claim those old results prove the later DynamoDB edits.DynamoDB extension: 20 code gates plus docs lint/full-format/build passed, against an archived exact staged source tree independent of eight pre-existing dirty files. SHA-256 input manifests matched; later publication-record edits are Markdown-only.
aws-storesmembership, Cloudflare/Fastly/Spin WASM checks.Unavailable, one attempt and the retained/removed row. SDK model Debug disclosure is directly asserted.Senddeferred source validation without polling/opening another local store; existing generic native staging atomicity/drop tests preserved.edgezero serveinvocation; shared argument/action selection has unit/source proof, generated build and startup are executed.An inherited Secrets timeout test transiently returned
Unavailableinstead ofDeadlineunder the combined parallel run. It passed alone, then all 74 provider tests passed serially. The initial failure log is retained; no production/unrelated test was changed to hide it.Commands/fingerprints:
/tmp/dynamodb-baseline/final-checks.sh,/tmp/dynamodb-baseline/final/,snapshot-{before,after}.sha256; checked source tree2fa76fb26377cf41203c255f924d988d6b657002. Final read-only provider review found no confirmed defects and is separate from executed checks.Closes
Closes #410
Checklist
Sendsetup preservedFixture lifetime follow-up
Commit
e9181716975c068cd6894e046eec1ee3e194ad69keeps the loopback endpoint alive until its SDK child completes. A local reproduction of the hosted timeout failure identified a genuine ConnectionRefused after the one-response worker dropped its listener while the SDK still owned retries. The deterministic endpoint-lifetime regression fails before this fix. All 79 AWS tests, strict all-feature/all-target AWS Clippy, and 30 repetitions of the original timeout test pass afterward. This changes only the test fixture. Production timeout limits, retry policy and typed error classification are unchanged. Current-head hosted qualification is running; no release tag is claimed.Owned follow-up review checkpoint
4adeb228ebcc0839f5306e16be6ea9b963e97f36. Source tree224f1f81634a5871a05b569939b13a4f02606b0dis byte-identical to previous head3733482f6bedcaecb162b1e927209f3800f8b388.