Skip to content

Replace mutable Fastly runtime selectors with version-scoped descriptors #380

Description

@aram356

Problem

Fastly has no process environment at runtime. PR #344 compensated with mutable selector entries, service-scoped selector names, and staging selector stores. That model makes the canonical EDGEZERO__STORES__... variables ineffective at deployment boundaries and creates collision, isolation, and publication-order problems across services and versions.

Deployment environments should select runtime values and physical resources without changing application release artifacts or embedding a Fastly service ID in environment-variable names.

Expected behavior

  • One application release has byte-identical CLI, package, edgezero.toml, and fastly.toml artifacts across publishers, production, and staging.
  • The selected deployment environment supplies canonical EDGEZERO__... runtime values. Environment variables do not include a Fastly service ID.
  • Production and staging may select the same or different Config, KV, and Secret Stores.
  • Secret Stores remain optional when the application manifest does not declare one.
  • The generic CLI passes typed, adapter-neutral deployment context. The Fastly adapter owns Fastly resource linking and publication.
  • Fastly uses one physical edgezero_runtime_env Config Store. Each service version reads an immutable descriptor at EDGEZERO__SERVICES__<SERVICE_ID>__VERSIONS__<VERSION>__ENV_V1.
  • The descriptor and exact physical resource links are written and verified before the version is staged or activated.
  • Config push, config diff, and deploy resolve the same Config Store key from the selected environment, applicable manifest defaults, and the target fallback.

Acceptance criteria

  • Remove the service-scoped selector inputs, mutable selector reconciliation, staging selector twins, and EDGEZERO_FASTLY_BUILD_SETTINGS introduced by Support optional typed secret paths and Fastly store mappings #344.
  • Do not migrate or fall back to Support optional typed secret paths and Fastly store mappings #344 selector entries; old entries and staging twins are inert after cutover.
  • Keep one physical edgezero_runtime_env store and scope immutable runtime descriptors by Fastly service and version.
  • Reconcile declared Config, KV, and optional Secret Store links on the draft version before publication, including removal of inherited production links that are not selected for the target.
  • Fail before staging or activation when descriptor writes, readback verification, resource-link reconciliation, or final source checks fail.
  • Preserve unregistered custom adapter commands that do not require the Fastly-managed lifecycle.
  • Keep lifecycle actions provider-specific while the CLI and application release contract remain adapter-independent.
  • Remove managed-action inputs that can select a runtime key independently from deploy.
  • Document the clean-cutover model, environment precedence, production/staging behavior, recovery, and serialization expectations.
  • Cover the runtime descriptor, exact link reconciliation, publication ordering, config resolution, optional secrets, actions, and documentation with tests.

Deploys for a Fastly service must be serialized. Concurrent operator deletion or mutation remains an external provider error; the deployment path should fail clearly without adding recovery machinery for every possible external race.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions