`flyctl postgres detach` errors with `Error get app: Could not resolve App` although app exists
Describe the bug
Any calls to flyctl postgres detach --postgres-app <MY POSTGRESS> --app <MY APP> fail with Error get app: Could not resolve App although the app (explicitly specified in the --app option) exists. A follow-up call to flyctl apps destroy "$app" --yes succeeds (I'm trying to set up staging deployment and tear down automation).
Note: The fly.toml located in the directory in which I'm running these commands is pointing at a different app. Hence why I'm manually setting the --app option (my-app in fly.toml, my-app-staging-pr-12345 in CI).
- Operating system: Ubuntu 20.04
fly version:flyctl v0.0.301 linux/amd64 Commit: 632a44b BuildDate: 2022-02-25T14:52:44Z
app = "<MY APP NAME>"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[metrics]
port = 9091
path = "/metrics"
[experimental]
allowed_public_ports = []
auto_rollback = true
private_network = true
[[services]]
http_checks = []
internal_port = 4000
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 500
soft_limit = 200
type = "connections"
[[services.ports]]
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
** Command output: **
Error get app: Could not resolve App
Hey @fubhy, is this still an issue for you?
Hard to tell after 1.5 years. We have migrated off of fly.io due to other issues so I don't really have a means to test this now.
I understand. Sorry to hear that, but thanks for response!
Thanks for reporting this! postgres detach now uses the explicit --app value before the app in fly.toml, so I’m going to close this as fixed. Please reopen if fly postgres detach <postgres-app> --app <app> still fails on the latest flyctl.