Skip to content

Warn about fly.toml mismatch after fly scale vm/memory#4749

Open
aezell wants to merge 2 commits intomasterfrom
alex/config_warning
Open

Warn about fly.toml mismatch after fly scale vm/memory#4749
aezell wants to merge 2 commits intomasterfrom
alex/config_warning

Conversation

@aezell
Copy link
Contributor

@aezell aezell commented Feb 27, 2026

Summary

  • After a successful fly scale vm or fly scale memory, checks the local fly.toml for a [[vm]] section with conflicting size or memory settings
  • Prints a warning to stderr that the next fly deploy will override the scale changes
  • No warning when: fly.toml is missing, has no [[vm]] section, or values already match
image

Test plan

  • go build ./... passes
  • go test ./internal/command/scale/ -v — all tests pass (7 new + existing)
  • Manual: run fly scale memory 512 -a <app> in a directory with a fly.toml that has [[vm]] with different memory → warning appears
  • Manual: run same command in a directory with no fly.toml → no warning
  • Manual: run same command in a directory with fly.toml but no [[vm]] section → no warning
  • Manual: scale to values matching fly.toml → no warning

After a successful `fly scale vm` or `fly scale memory`, check the local
fly.toml for a [[vm]] section with conflicting size or memory settings.
If found, print a warning that the next `fly deploy` will override the
changes. No warning when fly.toml is missing, has no [[vm]] section, or
matches the scaled values.
Pull WarningIcon() out of the Yellow() wrapper to match the existing
pattern in certificates/root.go. Run go fmt to fix struct field
alignment in config_warning_test.go.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant