Skip to content

Instance startup fails when ENCORE_RUNTIME_CONFIG secret version is destroyed during autoscaling #2202

@echarrod

Description

@echarrod

Just to note: this isn't urgent as a redeploy resolved the issue. Wanted to share in case it's helpful for others or indicates something worth investigating on the platform side

Description

When we deployed, instances fail to start because they're trying to fetch a destroyed secret version for ENCORE_RUNTIME_CONFIG.

Error Logs

Starting new instance. Reason: AUTOSCALING - Instance started due to configured scaling factors
Could not fetch secret "projects/ec-prod-apprun-euw1d/secrets/apprun-XXXX-ENCORE_RUNTIME_CONFIG/versions/243" for environment variable "ENCORE_RUNTIME_CONFIG". Instance startup will now abort: Secret Version [...] is in DESTROYED state.
The request failed because the instance could not start successfully.

Expected Behaviour

Autoscaling instances should be able to start successfully and fetch the current valid secret version.

Actual Behaviour

New instances attempt to fetch a destroyed secret version and crash, causing request failures.

Workaround

Redeploying the application (encore deploy --env prod) creates a new secret version and resolves the issue.

Environment

  • Platform: Encore Cloud (GCP Cloud Run)
  • Environment: Production

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions