Warn after fly secrets push when staged secrets are not live on running machines - #20
Merged
Merged
Conversation
…ng machines In a real deployment an operator ran qm secrets push, then restarted the Fly machines expecting the new secrets to apply. Fly staged secrets are only applied by a deploy or machine update, not a restart, so the auth service ran without SMTP credentials until a full qm up. The existing staging output did not make this failure mode obvious. flySecretsPush now checks each app that received staged secrets and, when any of them has running machines, ends with an explicit warning that the staged secrets are not live and that qm up (not a machine restart) applies them. Fresh installs with no machines see no warning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In a real deployment, an operator ran
qm secrets pushand then restarted the Fly machines expecting the new secrets to take effect. On Fly,secrets set --stageonly stages values — they are applied by the next deploy/machine update, not byflyctl machine restart. The result was the auth service running with no SMTP credentials at all until a fullqm upwas run. The command's existing output mentioned staging, but not strongly or actionably enough to prevent the mistake.What
flySecretsPushnow tracks every app that received staged secrets and checks each for running machines (fly status --json). If any have machines, the command ends with an explicit warning:staged secrets are NOT live yet on <apps>: running machines keep their old valuesrun \qm up` to apply them — a plain machine restart does not`Tests
clisuite (node --test test/fly-sandbox.test.ts): 33/33 pass.npm run typecheckandeslintclean.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.