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

edb.errors.InternalServerError: type "edgedbpub.1a725d82-d54d-11ec-aec3-cb1196c5cfb2_domain" does not exist

Open rdlaitila opened this issue 1 year ago • 0 comments

  • EdgeDB Version: 1.4+0b7ba44
  • EdgeDB CLI Version: 4.0.2+da2788e
  • OS Version: MacOS 14.2.1

Recent versions of EdgeDB CLI are unable to manage early versions of EdgeDB on an old project we are revisiting:

Steps to Reproduce:

We have a short CI script we use to spin up the correct EdgeDB instance for our project, apply migrations, and run golang based tests:

#!/usr/bin/env bash
set -ex
TEST_UUID=$(uuidgen | sed 's|-||g')
EDGEDB_INSTANCE="project_test_${TEST_UUID:20}"
edgedb instance create --start-conf manual --version 1.4 "$EDGEDB_INSTANCE"
edgedb instance start "$EDGEDB_INSTANCE"
edgedb project init --link --non-interactive --server-instance "$EDGEDB_INSTANCE"
go test -v ./tests/...
edgedb project unlink
edgedb instance destroy --force "$EDGEDB_INSTANCE"
exit 0

When running this script via CI or locally, we get:

% ./test-ci.sh                                            
++ uuidgen
++ sed 's|-||g'
+ TEST_UUID=A99CEC9B4BBD489B976ED65C4E33D435
+ EDGEDB_INSTANCE=project_test_D65C4E33D435
+ edgedb instance create --start-conf manual --version 1.4 project_test_D65C4E33D435
The option `--start-conf` is deprecated. Use `edgedb instance start/stop` to control the instance.
Version 1.4+0b7ba44 is already downloaded
Initializing EdgeDB instance...
[edgedb] CRITICAL 84425 2024-01-22T13:45:49.801 postgres: the database system is starting up
Instance project_test_D65C4E33D435 is up and running.
To connect to the instance run:
  edgedb -I project_test_D65C4E33D435
+ edgedb instance start project_test_D65C4E33D435
Specifying instance name as positional argument is deprecated. Use `-I project_test_D65C4E33D435` instead.
+ edgedb project init --link --non-interactive --server-instance project_test_D65C4E33D435
Found `edgedb.toml` in /path/to/project
Linking project...
Applying migrations...
edgedb error: InternalServerError: type "edgedbpub.1a725d82-d54d-11ec-aec3-cb1196c5cfb2_domain" does not exist
  Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md
  Server traceback:
      edb.errors.InternalServerError: type "edgedbpub.1a725d82-d54d-11ec-aec3-cb1196c5cfb2_domain" does not exist
% edgedb --version
EdgeDB CLI 4.0.2+da2788e

If I rework our CI image to use the CLI included with edgedb/edgedb:1.4 I experience no issues.

Note: We do hope to upgrade the server side but hoping to keep compatibility for the local development experience and older projects / experiments.

Thanks!

rdlaitila avatar Jan 22 '24 18:01 rdlaitila