edgedb-cli icon indicating copy to clipboard operation
edgedb-cli copied to clipboard

Can't create instance while offline

Open divan opened this issue 3 years ago • 2 comments

It seems like it's not possible to create a new instance without active internet connection.

edgedb project init --server-instance test --non-interactive --server-version "1.4"
Found `edgedb.toml` in <redacted>
Initializing project...
Checking EdgeDB versions...
edgedb error: failed to fetch JSON at URL: https://packages.edgedb.com/archive/.jsonindexes/x86_64-apple-darwin.json: HTTP error: failed to lookup address information: nodename nor servname provided, or not known

I used to have this issue before, but was able to solve by speicfying server version explicitly in the script (--server-version "1.4" part, though it was different version naming scheme back then). Now it seems to be not working again.

  • EdgeDB Version: 1.4+0b7ba44
  • EdgeDB CLI Version: EdgeDB CLI 1.1.2+0cdbb5f
  • OS Version: MacOS 12.4 (21F79)

Steps to Reproduce:

  1. Disconnect from internet
  2. Run edgedb project init --server-instance test --non-interactive --server-version "1.4"

divan avatar Jun 30 '22 06:06 divan

Yes. Currently, we're always trying to install the latest version.

This should be implemented by adding an --offline option and/or EDGEDB_*_OFFLINE env var. In interactive mode, we may also try and ask if user okay with using the potentially old version once we detect that JSON can't be fetched.

tailhook avatar Jul 01 '22 09:07 tailhook

Thanks. Yes, --offline mode would be great.

My use case is that I have a scaffolding for the apps that use EdgeDB as a database (think like rails new ..., but not rails). While working on it, I often create and drop projects. That includes creating new EdgeDB databases on my working laptop often (like dozens times per day).

Couple of days ago I had to work without an internet, and it was very frustrating not to be able to spin a new database (and the project), because of this JSON downloading attempt. I see no reason why it should be a blocker. Big red error message – fine, but not to block the whole process.

divan avatar Jul 02 '22 16:07 divan