Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Cherry picks for 6.2 #8420

Merged
merged 9 commits into from
Mar 1, 2025
14 changes: 13 additions & 1 deletion .github/scripts/patches/create-databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
for name in [
'json', 'functions', 'expressions', 'casts', 'policies', 'vector',
'scope', 'httpextauth',
'scope', 'httpextauth', 'extai'
]:
db.execute(f'create database {name};')

Expand Down Expand Up @@ -80,6 +80,18 @@
''')
db2.close()

# For the extai database, create the proper extensions, so
# that patching of the auth extension in place can get tested.
db2 = edgedb.create_client(
host='localhost', port=10000, tls_security='insecure',
database='extai'
)
db2.execute(f'''
create extension pgvector;
create extension ai;
''')
db2.close()

finally:
proc.terminate()
proc.wait()
7 changes: 4 additions & 3 deletions .github/scripts/patches/test-downgrade.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Test downgrading a database after an upgrade

import edgedb

import json
import os
import subprocess
import json
import sys

version = os.getenv('EDGEDB_VERSION')
cmd = [
f'edgedb-server-{version}/bin/edgedb-server', '-D' 'test-dir',
sys.argv[1], '-D' 'test-dir',
'--testmode', '--security', 'insecure_dev_mode', '--port', '10000',
]
proc = subprocess.Popen(cmd)
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows.src/tests-patches.tpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ jobs:
# has timeouts.
edb server --bootstrap-only --data-dir test-dir
# Should we run *all* the tests?
edb test -j2 -v --data-dir test-dir tests/test_edgeql_json.py tests/test_edgeql_casts.py tests/test_edgeql_functions.py tests/test_edgeql_expressions.py tests/test_edgeql_policies.py tests/test_edgeql_vector.py tests/test_edgeql_scope.py tests/test_http_ext_auth.py
edb test -j2 -v --data-dir test-dir tests/test_edgeql_json.py tests/test_edgeql_casts.py tests/test_edgeql_functions.py tests/test_edgeql_expressions.py tests/test_edgeql_policies.py tests/test_edgeql_vector.py tests/test_edgeql_scope.py tests/test_http_ext_auth.py tests/test_ext_ai.py

- name: Test downgrading a database after an upgrade
if: ${{ !contains(matrix.edgedb-version, '-rc') && !contains(matrix.edgedb-version, '-beta') }}
env:
EDGEDB_VERSION: ${{ matrix.edgedb-version }}
run: python3 .github/scripts/patches/test-downgrade.py
run: python3 .github/scripts/patches/test-downgrade.py ${{ matrix.edgedb-basename }}-${{ matrix.edgedb-version }}/bin/edgedb-server

workflow-notifications:
if: failure() && github.event_name != 'pull_request'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows.src/tests.inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
CACHE_HIT: ${{ steps.cli-cache.outputs.cache-hit }}
run: |
if [[ "$CACHE_HIT" == "true" ]]; then
cp -v build/cli/bin/edgedb edb/cli/edgedb
cp -v build/cli/bin/gel edb/cli/gel
else
python setup.py -v build_cli
fi
Expand Down Expand Up @@ -423,7 +423,7 @@
- name: Validate cached binaries
run: |
# Validate EdgeDB CLI
./build/cli/bin/edgedb --version || exit 1
./build/cli/bin/gel --version || exit 1

# Validate Stolon
./build/stolon/bin/stolon-sentinel --version || exit 1
Expand All @@ -436,8 +436,8 @@

- name: Restore cache into the source tree
run: |
cp -v build/cli/bin/edgedb edb/cli/edgedb
cp -v build/cli/bin/edgedb edb/cli/gel
cp -v build/cli/bin/gel edb/cli/edgedb
cp -v build/cli/bin/gel edb/cli/gel
rsync -av ./build/rust_extensions/edb/ ./edb/
rsync -av ./build/extensions/edb/ ./edb/
rsync -av ./build/lib/edb/ ./edb/
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests-ha.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .github/workflows/tests-inplace.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions .github/workflows/tests-managed-pg.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions .github/workflows/tests-patches.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .github/workflows/tests-pg-versions.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/tests-pool.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .github/workflows/tests-reflection.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading