flyctl icon indicating copy to clipboard operation
flyctl copied to clipboard

`flyctl postgres detach` errors with `Error get app: Could not resolve App` although app exists

Open fubhy opened this issue 4 years ago • 4 comments

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

fubhy avatar Mar 02 '22 00:03 fubhy

Hey @fubhy, is this still an issue for you?

redjonzaci avatar Sep 02 '23 13:09 redjonzaci

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.

fubhy avatar Sep 02 '23 20:09 fubhy

I understand. Sorry to hear that, but thanks for response!

redjonzaci avatar Sep 02 '23 20:09 redjonzaci

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.

tomr-fly avatar Jul 24 '26 22:07 tomr-fly