Skip to content

Deployment State Caching should be disabled by default in CI #19736

Description

@fowl2

Describe the bug

In CI there are 3 scenarios:

  1. Ephemeral runner/s
    State caching is wasted IO here, it will be deleted with the runner.

  2. Persistent runners
    Each runner gets its own cache. Each deployment might run on a different runner getting either no cache or a stale cache.

  3. Persistent runner (singular) or explict state handling.
    Once you've run into the this the first time and find the docs you might use your CI provider's caching action to save/load the state between pipeline runs. The recommendation is to key a hash of the app host's (full) path, CI runners paths often include things like a build/run number, so this is likely to miss.

Additionally, the docs make it sound like the caching is only used for collecting user input interactively - but I definedly ran into problems running in CI (where there is no input) with stale state - so it'd be great if the docs could be clearer about what's actually in the state and what happens if it's missing or stale.

Expected Behavior

Deployment works reliably out of the box in CI, without unexpectedly relying on state.

Anything else?

I feel like the safest option would be requiring an opt in to deployment state caching when CI is detected, or even when !interactive.

Future work might be to allow for the state to be stored in/with each environment, eg. in an Azure Storage account or ARM metadata.

Activity

  1. added
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Aug 27, 2026
  2. joperezr commented on Aug 27, 2026

    @joperezr
    Member
    🤖 Aspire triage pass — 2026-08-27 05:21 UTC

    Area: area-deployment
    Kind: feature-request (+ docs)
    Repro: none — describes three CI runner scenarios narratively (lines 3–11 of the issue body); no minimal repro project
    Affected version(s): not specified by reporter
    Severity: S3 — edge scenario (deployment in CI with state caching) with a workaround available (CI cache action / explicit state handling)

    Urgency: ⚪ backlog — no milestone
    Reason: feature request + docs clarification (opt-in state caching when CI / non-interactive is detected); not a regression and not S1/S2, so it stays in the backlog

    Suggested owner(s): Mitch Denny (@mitchdenny), backup David Fowler (@davidfowl)
    Evidence:

    Confidence: high
    Needs human?: no

  3. fowl2 commented on Aug 27, 2026

    @fowl2
    Author

    I hope that CI deployment isn't an edge case!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-deploymentneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownerstriage:bot-seenAspire triage bot has seen this issue

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions