Skip to content

propr deploy fly: secrets added after the first deploy never reach the app container (explicit per-container secrets list) #3887

Done

Description

@integry

Problem

propr deploy fly renders a multi-container Machine config (redis + app). The app container gets an explicit list of Fly secrets: containerSecrets(...) in packages/cli/src/commands/deploy/flyMachineConfig.ts, which covers only the secrets set during that deploy. A secret added later with fly secrets set NAME=… -a <app> is stored on the app and shows as Deployed, but it is never passed into the app container. Fly maps only the listed names into a container's environment.

Seen live on a test instance (Sprites runtime). After fly secrets set SPRITES_TOKEN=…, the node process had no SPRITES_TOKEN. The Agents page showed "Agent runtime unavailable: Set PROPR_SPRITES_TOKEN to run agents on Sprites", and the interactive agent login failed with "Could not start the login on Sprites: Set PROPR_SPRITES_TOKEN …". Adding {"env_var":"SPRITES_TOKEN","name":"SPRITES_TOKEN"} to the app container's secrets and redeploying fixed it.

The setup docs tell users to add credentials such as SPRITES_TOKEN, PROPR_FLY_API_TOKEN and the OAuth App secrets, so they'll hit this whenever they add one after the first deploy. Nothing tells them why it's missing.

Wanted

  1. Every app secret reaches the app container. Either list every secret the app has at deploy and re-render time, or (simpler and robust) stop using a per-container secrets allowlist for the app container, if Fly's multi-container config passes all app secrets to a container without one. Keep redis without secrets.
  2. Re-running propr deploy fly (or a propr deploy fly --refresh-config) picks up secrets added since the first deploy, with fly secrets list as the source of names (never values).
  3. Docs: in docs/docs/tutorials/setup-fly.md, wherever we tell users to add a secret later, say how it takes effect.
  4. Readiness message: if SPRITES_TOKEN or PROPR_SPRITES_TOKEN is listed in fly secrets list but absent from the process environment, there's no cheap way for the app to tell. So at least make the Sprites and Fly Machines "unavailable" messages mention both accepted names (SPRITES_TOKEN or PROPR_SPRITES_TOKEN) and that the variable must reach the app container.

Acceptance

  • A unit test on the rendered config. After a deploy with an extra pre-existing app secret (simulated fly secrets list), the app container receives it.
  • A live check: deploy, fly secrets set SPRITES_TOKEN=…, re-run the documented step, and the Agents page reports the Sprites runtime ready.

Activity

  1. propr-dev commented on Nov 29, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-6.2-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-6.2-sol
    • Branch: 3887/gpt-6.2-sol-propr-deploy-fly-secrets--20261129-1526-ouh
    • Base Branch: 3758-epic-runtime-abstraction-sc0
    • Worktree: issue-3887-20261129-1526-gpt-6.2-sol-ouh

    🔍 Track Task Execution

  2. integry commented on Dec 1, 2026

    @integry
    OwnerAuthor

    Done in #3888, which merged into the runtime epic; the epic merged into main with #3774 and ships in 0.9.4.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions