Can't perform instance upgrade from docker/WSL2
- Gel Version: 6.3+10fd4cc
- Gel CLI Version: 7.1.1+45ade47
- OS Version: Linux version 5.15.133.1-microsoft-standard-WSL2
Steps to Reproduce:
- Run
gel instance upgradewith an instance defined. (gel instance upgrade -I gel)
Output:
❯ gel instance upgrade -I gel
gel error: error reading instance info: "/root/.local/share/edgedb/data/gel/instance_info.json"
Caused by: No such file or directory (os error 2)
Using gel within WSL2 has proved to be difficult in almost every regard since projects aren't supported, but I've found work-arounds for almost every other operation by making calls in the REPL, but I can't find a way to perform an upgrade on an already running instance.
Additional Background:
Projects aren't supported in this environment, but there are several commands which fail if a project file is not located, so I have a gel.toml file with the following contents in my project root.
gel.toml:
[instance]
server-version = "6.1"
[project]
schema-dir = "dbschema"
[[watch]]
files = ["queries/*.edgeql"]
script = "npm run gel:generate"
The necessary connection parameters are already populated in the environment so most calls to gel work fine using the connection parameters without an instance specified, but occasionally a command requires an instance (like this upgrade command), so I linked the remote instance running in the other peer container.
❯ gel instance list
┌────────┬──────┬──────────┬─────────────┬────────┐
│ Kind │ Name │ Location │ Version │ Status │
├────────┼──────┼──────────┼─────────────┼────────┤
│ remote │ gel │ gel:5656 │ 6.3+10fd4cc │ up │
└────────┴──────┴──────────┴─────────────┴────────┘
I'll take a look at this - are you using a custom WSL setup, or relying on the gel CLI to set up a WSL instance for you?
The server container is setup using this feature script: https://github.com/joshuanianji/devcontainer-features/tree/main/src/edgedb-cli
The app container where the gel CLI is running is setup using the Linux install script.
Ah! I understand. OK, I'm currently working on docker DX. I'll see if I can improve the WSL2/Docker DX at the same time.
As a curiosity, have you tested the latest nightly CLI? There is some early docker DX work there that might help, but TBH it's only been tested on Windows. It only uses the docker executable as an interface, so it's possible you may be able to get good results with it.
Appreciate your patience as we work through this. Please feel free to continue to share what your ideal Windows DX would be -- we certainly need some input there.
One challenge I've been finding lately is that Github actions don't play well with WSL in all cases. I'm still learning what the best way to test this might be.