edgedb-cli
edgedb-cli copied to clipboard
Upgrades to 2.0 sometimes fail on Apple Silicon hardware with x86_64 builds
- EdgeDB Version: 1.4 trying to upgrade to 2.0
- OS Version: Monterey (M1)
Steps to Reproduce:
Pic attached of entire issue
Schema:
To just clarity: this project is linked to a remote instance?
The short answer is that the CLI just isn't capable of upgrading remote instances right now. We'll follow up here once we have a proper remote upgrade guide — soon!
for remote instances the upgrade procedure is
- create a new remote instance using EdgeDB 2.0
edgedb dump -I old_instance mydumfileedgedb restore -I new_instance mydumpfile
The original error message seems to suggest the CLi failed to upgrade a local instance and now wrongly thinks it's a remote instance.
@jfeiwell, can you try edgedb instance revert "ag_0528" and try the upgrade again?
So that worked to get the instance running locally. When I try to upgrade this is what I get
Upgrading to a major version 2.0+88c1706 Version 2.0+88c1706 is already installed Dumping the database... edgedb error: ClientConnectionFailedError: cannot establish connection for 30s: Connection refused (os error 61)
Can you successfully create a fresh 2.0 instance?
edgedb error: Project is already initialized.
I can in a new directory if that's helpful, and it says 2.0 already installed
I tried again and got this new error edgedb project upgrade --to-latest Upgrading to a major version 2.0+88c1706 Version 2.0+88c1706 is already installed Dumping the database... edgedb error: Upgrade is already in progress
A new directory. I'm wondering if the 2.0 build is crashing on your machine for some reason.
Also, please do the edgedb instance revert and try the upgrade again with env RUST_LOG=debug and post output if possible.
It works with a new directory.
I run the project upgrade and it makes the instance inactive and gives that in progress error. I run instance start and it's running again but get same error. When I run revert it says edgedb error: cannot find backup directory to revert
@jfeiwell and I diagnosed this via Discord and it appears that Postgres 14 hangs at bootstrap time. Switching to the native arm64 build resolved the issue.
For reference, here's how one can currently upgrade to native Apple Silicon builds:
Step 1: reinstall the CLI: curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
Step 2: remove the previously downloaded x86 build of EdgeDB 2.0 (edgedb server uninstall --version "2.0")
I'll leave this issue open in case others bump into this.
@elprans @tailhook Paul, we should automatically update the CLI to native m1 build.
@elprans @tailhook Paul, we should automatically update the CLI to native m1 build.
The hardest part here is not updating CLI to native m1 build but upgrading server to the native m1 build.
Is postgres' data directory compatible between x86 and m1 build?
@elprans @tailhook Paul, we should automatically update the CLI to native m1 build.
The hardest part here is not updating CLI to native m1 build but upgrading server to the native m1 build.
On the other hand, if CLI is updated before upgrading server it should install new version in arm64 and regular upgrade should work. So probably I was overthinking it a bit.
it should install new version in arm64 and regular upgrade should work
Yes
This should have been fixed.