Skip to content

Commit ef1c25d

Browse files
authored
Gel 5 -> 6 (#3399)
2 parents 9d94078 + 86522ac commit ef1c25d

File tree

15 files changed

+58
-42
lines changed

15 files changed

+58
-42
lines changed

.github/actions/gel-setup/action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,18 @@ description: 'Setup Gel server, migrate schema, generate TS files'
33
runs:
44
using: composite
55
steps:
6-
- name: Setup Gel
6+
- name: Install Gel CLI
77
uses: geldata/setup-gel@v1
8+
with:
9+
server-version: none
10+
11+
- name: Initialize Gel Project
12+
shell: bash
13+
run: gel project init --no-migrations --non-interactive
14+
15+
- name: Migrate Gel Schema
16+
shell: bash
17+
run: gel migrate --single-transaction
818

919
- name: Generate Gel TS files
1020
shell: bash

.github/workflows/gel.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@ jobs:
1010
- name: Node Setup & Yarn Install
1111
uses: ./.github/actions/setup
1212

13-
- uses: geldata/setup-gel@v1
14-
15-
- name: Generate Gel TS files
16-
shell: bash
17-
run: yarn gel:gen
13+
- name: Gel Setup
14+
uses: ./.github/actions/gel-setup
1815

1916
- name: Inject Access Policies
2017
run: yarn console gel ap inject
2118

2219
- name: Schema Migrations In Sync
23-
run: edgedb migration status
20+
run: gel migration status
2421
if: github.event.pull_request.draft == false
2522

2623
- name: Validate seed scripts are error free

.idea/runConfigurations/edgedb_ap_inject.xml renamed to .idea/runConfigurations/gel_ap_inject.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/edgedb_gen.xml renamed to .idea/runConfigurations/gel_gen.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/edgedb_seed.xml renamed to .idea/runConfigurations/gel_seed.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/edgedb_watch.xml renamed to .idea/runConfigurations/gel_watch.xml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG NODE_VERSION=20
22
ARG NODE_IMAGE=public.ecr.aws/docker/library/node:${NODE_VERSION}-slim
3-
ARG GEL_IMAGE=ghcr.io/geldata/gel:5
3+
ARG GEL_IMAGE=ghcr.io/geldata/gel:6
44

55
FROM ${NODE_IMAGE} AS base-runtime
66

@@ -63,11 +63,11 @@ WORKDIR /source
6363

6464
ENV NODE_ENV=development \
6565
# Ignore creds during this build process
66-
EDGEDB_SERVER_SECURITY=insecure_dev_mode \
66+
GEL_SERVER_SECURITY=insecure_dev_mode \
6767
# Don't start/host the db server, just bootstrap & quit.
68-
EDGEDB_SERVER_BOOTSTRAP_ONLY=1 \
69-
# Temporary until upstream stale default of "edgedb" is resolved
70-
EDGEDB_SERVER_DATABASE=main \
68+
GEL_SERVER_BOOTSTRAP_ONLY=1 \
69+
# No need to print temporary generated cert, just clutters log
70+
GEL_DOCKER_SHOW_GENERATED_CERT=never \
7171
# Don't flood log with cache debug messages
7272
VERBOSE_YARN_LOG=discard
7373

@@ -84,16 +84,19 @@ COPY . .
8484
RUN <<EOF
8585
set -e
8686

87-
chown -R edgedb:edgedb /dbschema src
87+
chown -R gel:gel /dbschema src
88+
89+
# Run the migrations in a single transaction, so we don't hit a CLI timeout
90+
sed -i 's|schema-dir=/dbschema|schema-dir=/dbschema --single-transaction|' /usr/local/bin/docker-entrypoint-funcs.sh
8891

8992
# Hook `yarn gel:gen` into gel bootstrap.
9093
# This allows it to be ran in parallel to the db server running without a daemon
91-
mkdir -p /edgedb-bootstrap-late.d
92-
printf "#!/usr/bin/env bash\ncd /source \nyarn gel:gen" > /edgedb-bootstrap-late.d/01-generate-js.sh
93-
chmod +x /edgedb-bootstrap-late.d/01-generate-js.sh
94+
mkdir -p /gel-bootstrap-late.d
95+
printf "#!/usr/bin/env bash\ncd /source \nyarn gel:gen\n" > /gel-bootstrap-late.d/01-generate-js.sh
96+
chmod +x /gel-bootstrap-late.d/01-generate-js.sh
9497

9598
# Bootstrap the db to apply migrations and then generate the TS/JS from that.
96-
/usr/local/bin/docker-entrypoint.sh edgedb-server
99+
/usr/local/bin/docker-entrypoint.sh server
97100
EOF
98101
# endregion
99102

dbschema/seeds/018.ceremonies.edgeql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ with
3131
)
3232
),
3333
modified := (select ceremonies filter .modifiedAt = datetime_of_statement())
34-
select { `Modified Ceremony: ` := modified.id }
34+
select { `Modified Ceremonies` := modified.id }
3535
filter count(modified) > 0;

edgedb.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

gel.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[instance]
2+
server-version = "=6.3"

0 commit comments

Comments
 (0)