edgedb / setup-edgedb

A GitHub Action to install EdgeDB and its CLI
MIT License
18 stars 5 forks source link

Potential error in readme #33

Closed rileytomasek closed 1 year ago

rileytomasek commented 2 years ago

I'm not sure if I'm doing something wrong here, but I had to make this change in order to make it work.

nsidnev commented 2 years ago

I'm not sure if there' s anything wrong with the readme. I just tried it in one of my projects and it works successfully.

Here are the action logs from the run with the debug level enabled:

Action logs 2022-06-25T20:47:43.2336860Z ##[debug]Evaluating condition for step: 'Run edgedb/setup-edgedb@v1' 2022-06-25T20:47:43.2338206Z ##[debug]Evaluating: success() 2022-06-25T20:47:43.2338519Z ##[debug]Evaluating success: 2022-06-25T20:47:43.2338889Z ##[debug]=> true 2022-06-25T20:47:43.2339295Z ##[debug]Result: true 2022-06-25T20:47:43.2339924Z ##[debug]Starting: Run edgedb/setup-edgedb@v1 2022-06-25T20:47:43.2354874Z ##[debug]Loading inputs 2022-06-25T20:47:43.2363523Z ##[debug]Loading env 2022-06-25T20:47:43.2367798Z ##[group]Run edgedb/setup-edgedb@v1 2022-06-25T20:47:43.2367991Z with: 2022-06-25T20:47:43.2368247Z server-dsn: edgedb://localhost:5656 2022-06-25T20:47:43.2368504Z instance-name: ci_edgedb_instance 2022-06-25T20:47:43.2368711Z cli-version: stable 2022-06-25T20:47:43.2368916Z server-version: stable 2022-06-25T20:47:43.2369115Z ##[endgroup] 2022-06-25T20:47:43.5680335Z ##[debug]isExplicit: 1.1.2 2022-06-25T20:47:43.5684117Z ##[debug]explicit? true 2022-06-25T20:47:43.5689402Z ##[debug]checking cache: /opt/hostedtoolcache/edgedb-cli/1.1.2/x64 2022-06-25T20:47:43.5695178Z ##[debug]not found 2022-06-25T20:47:43.5703532Z Downloading edgedb-cli 1.1.2+58eb29e - x64 from https://packages.edgedb.com/archive/x86_64-unknown-linux-musl/edgedb-cli-1.1.2+58eb29e 2022-06-25T20:47:43.5726102Z ##[debug]Downloading https://packages.edgedb.com/archive/x86_64-unknown-linux-musl/edgedb-cli-1.1.2+58eb29e 2022-06-25T20:47:43.5729554Z ##[debug]Destination /home/runner/work/_temp/ab811a18-bf6d-4066-9b21-ac51ce231ff9 2022-06-25T20:47:44.6200311Z ##[debug]download complete 2022-06-25T20:47:44.6206559Z ##[debug]Caching tool edgedb-cli 1.1.2 x64 2022-06-25T20:47:44.6209729Z ##[debug]source file: /home/runner/work/_temp/ab811a18-bf6d-4066-9b21-ac51ce231ff9 2022-06-25T20:47:44.6217246Z ##[debug]destination /opt/hostedtoolcache/edgedb-cli/1.1.2/x64 2022-06-25T20:47:44.6231367Z ##[debug]destination file /opt/hostedtoolcache/edgedb-cli/1.1.2/x64/edgedb 2022-06-25T20:47:44.6396163Z ##[debug]finished caching tool 2022-06-25T20:47:44.6403918Z ##[debug]Running edgedb instance link --non-interactive --trust-tls-cert --dsn edgedb://localhost:5656 ci_edgedb_instance 2022-06-25T20:47:44.7989751Z ##[debug]Authenticating to edgedb:// 2022-06-25T20:47:44.7993603Z ##[debug]edgedb 2022-06-25T20:47:44.7996878Z ##[debug]@ 2022-06-25T20:47:44.8000060Z ##[debug]localhost 2022-06-25T20:47:44.8003096Z ##[debug]: 2022-06-25T20:47:44.8006161Z ##[debug]5656 2022-06-25T20:47:44.8009218Z ##[debug]/ 2022-06-25T20:47:44.8012256Z ##[debug]edgedb 2022-06-25T20:47:44.8015908Z ##[debug] 2022-06-25T20:47:59.4806794Z ##[debug]Trusting unknown server certificate: SHA1:16d861c32989086f81f78c6301409d85afe0f9ce 2022-06-25T20:47:59.4812391Z ##[debug]Successfully linked to remote instance. To connect run: 2022-06-25T20:47:59.4812680Z ##[debug] edgedb -I ci_edgedb_ins 2022-06-25T20:47:59.4813413Z ##[debug]tance 2022-06-25T20:47:59.4829260Z ##[debug]Running edgedb project init --non-interactive --link --server-instance ci_edgedb_instance 2022-06-25T20:47:59.4899248Z ##[debug]Found `edgedb.toml` in /home/runner/work/edgedb-elixir/edgedb-elixir 2022-06-25T20:47:59.4899562Z ##[debug]Linking project... 2022-06-25T20:47:59.5468188Z ##[debug]Applying migrations... 2022-06-25T20:48:05.8081141Z ##[debug]Applied m1ud5ykhpyzl7tdyqf6w5nezyy75753dwy2kmeznqedph2ddww6cia (00001.edgeql) 2022-06-25T20:48:05.8941704Z ##[debug]Note: adding first migration disables DDL. More info: https://edgedb.com/p/bare_ddl 2022-06-25T20:48:05.8942033Z ##[debug]Project linked 2022-06-25T20:48:05.8942279Z ##[debug]To connect to ci_edgedb_instance, run `edgedb` 2022-06-25T20:48:05.8979266Z ##[debug]Node Action run completed with exit code 0 2022-06-25T20:48:05.8981509Z ##[debug]Finishing: Run edgedb/setup-edgedb@v1

as you can see, it explicitly links the instance by DSN and then links the project by instance name:

...
##[debug]Running edgedb instance link --non-interactive --trust-tls-cert --dsn edgedb://localhost:5656 ci_edgedb_instance
...
##[debug]Running edgedb project init --non-interactive --link --server-instance ci_edgedb_instance
...

There is also a job for this case that makes sure it works correctly.

Could you share an example where the error occurs? Or maybe a run of the action with logs?