edgedb-cli
edgedb-cli copied to clipboard
`edgedb instance link` asks for the branch name even when the target instance is running a version without branches
The edgedb instance link
command now asks for a branch and defaults to main
, but it does so indiscriminately, even when the instance is pre-v5, does not have branches, and when the default value of main
would not make sense.
Example output:
$ edgedb instance link
[2024-03-29T18:15:22Z WARN edgedb::version_check] Newer version of edgedb tool exists 4.3.0-dev.1120+d5587b7 (current 4.3.0-dev.1117+2dfb53b). To upgrade run `edgedb cli upgrade`
Specify server host [default: localhost]:
> localhost
Specify server port [default: 10915]:
> 10887
Specify database user [default: edgedb]:
> edgedb
Specify branch [default: main]:
> main
…
The instance on localhost:10887 is a 4.5 instance.
Is it possible to use the host and port to discover the version somehow? This would tee up the ideal DX where we could ask the user for a database name with main
as the default for pre-v5 while asking for a branch and defaulting to main
for 5+.
If not, maybe it would make sense to change the prompt to something like this:
Specify branch (or database name for pre-v5 instances): If we need to go this route, we may also want to log out a note or a warning of some kind to say that the default of
main
likely will not work on a pre-v5 database and that they should manually set their database name. Maybe even just do away with a default value altogether to avoid confusion.
- EdgeDB Version: N/A
- EdgeDB CLI Version: 4.3.0-dev.1120+d5587b7
- OS Version: macOS 14.0
Steps to Reproduce:
- Run
edgedb instance link
and observe output