Skip to content

fix(fastly): apply canonical store selectors at deploy - #381

Open
aram356 wants to merge 12 commits into
mainfrom
fix/fastly-environment-store-selectors
Open

aram356 wants to merge 12 commits into
mainfrom
fix/fastly-environment-store-selectors

Conversation

@aram356

@aram356 aram356 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Changes

Crate / File Change
edgezero-adapter / edgezero-cli Add an adapter-neutral typed deploy context and deploy/finalize hooks; custom and built-in deploys share the same lifecycle and fail before activation when required finalization is unavailable.
edgezero-adapter-fastly Read canonical selectors from edgezero_runtime_env, reconcile production selectors after deploy, and use one per-service staging twin linked to the staged draft. Staging also links each selected physical Config, KV, and Secret Store.
GitHub Actions Remove the build-settings payload and service-scoped environment mapping; pass the selected service/environment through the normal deploy interface.
Documentation Document deploy-time selection, production/staging sharing or isolation, provisioning responsibilities, and canonical variable names.
Tests Cover canonical secret selection, same/different staging stores, custom deploy finalization, explicit manifest targeting, FASTLY_SERVICE_ID fallback, optional secrets, and action-script behavior.

Deploys remain serialized per Fastly service. If an operator deletes or mutates a selected resource during a deploy, the provider operation fails clearly; this change does not introduce version-specific selector stores or recovery machinery for concurrent external mutation.

Closes

Closes #380

Test plan

  • cargo test --workspace --all-targets
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets --features "fastly cloudflare spin"
  • WASM builds: wasm32-wasip1 (Fastly) / wasm32-wasip2 (Spin) / wasm32-unknown-unknown (Cloudflare) — verified cargo check -p edgezero-adapter-spin --target wasm32-wasip2 --features spin
  • examples/app-demo workspace: cd examples/app-demo && cargo test --workspace --all-targets
  • Docs build: cd docs && npm run lint && npm run format && npm run build
  • Manual testing via edgezero serve --adapter axum (the pre-rewrite edgezero-cli dev was renamed; see cli-reference)
  • Other: .github/actions/deploy-core/tests/run.sh (263 passed, 0 failed, 4 platform skips); git diff --check

Checklist

  • Changes follow CLAUDE.md conventions
  • No Tokio deps added to core or adapter crates
  • Route params use {id} syntax (not :id)
  • Types imported from edgezero_core (not http crate)
  • Store wiring goes through KvRegistry / ConfigRegistry / SecretRegistry (not the legacy single-handle setters) — see spec §6.6
  • New code has tests
  • No secrets or credentials committed

@aram356 aram356 self-assigned this Sep 16, 2026
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.

Fastly deploy ignores canonical store selectors after #344

1 participant