edgedb-cli
edgedb-cli copied to clipboard
instance_info.json not created on command "edgedb instance link"
- EdgeDB Version: on Mac: 2.16; Docker: v2 (latest on 2nd June 2023)
- EdgeDB CLI Version: 3.1.1
- OS Version: MacOS 13.0 (ARM64)
Steps to Reproduce:
- docker-compose.yml with suggested minimal config in the documentation:
https://www.edgedb.com/docs/guides/deployment/docker
version: "3" services: edgedb: image: edgedb/edgedb environment: EDGEDB_SERVER_SECURITY: insecure_dev_mode volumes: - "./dbschema:/dbschema" ports: - "5656:5656"
2. docker-compose up -d
3. in Mac Terminal: edgedb instance link my_instance -H localhost -P 5656 -u edgedb -d edgedb --tls-security insecure
4. in Mac Terminal: edgedb instance stop -I my_instance -> yields following error: "edgedb error: error reading instance info: "/Users/user/Library/Application Support/edgedb/data/my_instance/instance_info.json": No such file or directory (os error 2)"
5. Check for existence of "/Users/user/Library/Application Support/edgedb/data/my_instance/instance_info.json" and it's parent directory.
Hello there and thank you for this great project! When I deploy an edgedb Docker container (checked it - it works and takes connections) and try to establish a connection to it, the CLI seemingly creates an instance without error. The command "edgedb instance list" shows it in it's content and the command "edgedb -I my_instance" does indeed lead to the edgedb prompt. However, tasks concerning starting and stopping the instance do not work, because the needed config .json-file is not created (path: "/Users/user/Library/Application Support/edgedb/data/my_instance/instance_info.json").
Thanks in advance!
You cannot start/stop linked instances, as there is no generic way to do that. You should use docker commands for start/stop if you have started the server using docker.
I have to admit that our error reporting is a bit ugly here because it reveals internal details (and helps in the situations where user accidentally deleted something), but is not very helpful when the operation wasn't intended to work. This can be fixed.