superfly / flyctl

Command line tools for fly.io services
https://fly.io
Apache License 2.0
1.42k stars 240 forks source link

Fly machine status errors out when you use a machine name instead of id #951

Open shortdiv opened 2 years ago

shortdiv commented 2 years ago

Running a machine name instead of id gives you "error can't retrieve machine"

I think it could be nice to either: a. Identify that the id being passed in is a name and not an id and tell the user that it has to be an id OR b. Allow a machine to be queried by name OR ID

I personally prefer b. since it offers a nice ux, and provides multiple paths of retrieving a machine but a. would be a good for the interim

mrkurt commented 2 years ago

b sounds nicest to, but requires a round trip to GraphQL. We decode IDs to figure out which flyd instance to route status lookups.

I haven't looked closely at Docker but it would definitely be nice to use a machine name instead of an ID everywhere. The GraphQL hack is necessary now, but @jeromegn's Corrosion stuff might give us a nice way to let flaps/flyd know about all machines by app ID and name.

redjonzaci commented 1 year ago

Still needed?