Skip to content

Commit

Permalink
Merge branch 'main' into renovate/libsql-client-0.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln authored Nov 23, 2023
2 parents 919b0aa + e08be2e commit 89e7ccd
Show file tree
Hide file tree
Showing 176 changed files with 5,668 additions and 4,185 deletions.
2 changes: 1 addition & 1 deletion .buildkite/engineer
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fi
# Check if the system has engineer installed, if not, use a local copy.
if ! type "engineer" &> /dev/null; then
# Setup Prisma engine build & test tool (engineer).
curl --fail -sSL "https://prisma-engineer.s3-eu-west-1.amazonaws.com/1.60/latest/$OS/engineer.gz" --output engineer.gz
curl --fail -sSL "https://prisma-engineer.s3-eu-west-1.amazonaws.com/1.65/latest/$OS/engineer.gz" --output engineer.gz
gzip -d engineer.gz
chmod +x engineer

Expand Down
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export QE_LOG_LEVEL=debug # Set it to "trace" to enable query-graph debugging lo
# export FMT_SQL=1 # Uncomment it to enable logging formatted SQL queries

### Uncomment to run driver adapters tests. See query-engine-driver-adapters.yml workflow for how tests run in CI.
# export EXTERNAL_TEST_EXECUTOR="$(pwd)/query-engine/driver-adapters/js/connector-test-kit-executor/script/start_node.sh"
# export EXTERNAL_TEST_EXECUTOR="napi"
# export DRIVER_ADAPTER=pg # Set to pg, neon or planetscale
# export PRISMA_DISABLE_QUAINT_EXECUTORS=1 # Disable quaint executors for driver adapters
# export DRIVER_ADAPTER_URL_OVERRIDE ="postgres://USER:PASSWORD@DATABASExxxx" # Override the database url for the driver adapter tests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Build Engines for Apple Intel
on:
workflow_dispatch:
inputs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Build Engines for Apple Silicon
on:
workflow_dispatch:
inputs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Build Engines for Windows
on:
workflow_dispatch:
inputs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: WASM build
name: Build prisma-schema-wasm
on:
push:
branches:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Benchmark
name: Codspeed Benchmark
on:
push:
branches:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/qe-wasm-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: WASM engine compile check
on:
push:
branches:
- main
pull_request:
paths-ignore:
- '.github/**'
- '!.github/workflows/qe-wasm-check.yml'
- '.buildkite/**'
- '*.md'
- 'LICENSE'
- 'CODEOWNERS'
- 'renovate.json'

jobs:
build:
name: 'Compilation check for query-engine-wasm'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Build wasm query engine
run: ./build.sh
working-directory: ./query-engine/query-engine-wasm
20 changes: 20 additions & 0 deletions .github/workflows/send-main-push-event.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Trigger prisma-engines-builds run
run-name: Trigger prisma-engines-builds run for ${{ github.sha }}

on:
push:
branches:
- main

jobs:
send-commit-hash:
runs-on: ubuntu-22.04
steps:
- run: echo "Sending event for commit $GITHUB_SHA"
- name: Workflow dispatch to prisma/prisma-engines-builds
uses: benc-uk/workflow-dispatch@v1
with:
workflow: .github/workflows/build-engines.yml
repo: prisma/prisma-engines-builds
token: ${{ secrets.BOT_TOKEN_PRISMA_ENGINES_BUILD }}
inputs: '{ "commit": "${{ github.sha }}" }'
2 changes: 1 addition & 1 deletion .github/workflows/send-tag-event.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Send Tag Event
name: Send Tag Event to PDP

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Release binary compilation test'
name: Test release binary compilation
on:
pull_request:
paths-ignore:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Quaint
name: Test Quaint
on:
push:
branches:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Query Engine Black Box
name: Test Query Engine (Black Box)
on:
push:
branches:
Expand All @@ -19,7 +19,7 @@ concurrency:

jobs:
rust-tests:
name: 'Test query-engine as a black-box'
name: 'query-engine as a black-box'

strategy:
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Driver Adapters
name: Test Driver Adapters
on:
push:
branches:
Expand All @@ -19,20 +19,33 @@ concurrency:

jobs:
rust-query-engine-tests:
name: 'Test `${{ matrix.adapter.name }}` on node v${{ matrix.node_version }}'
name: '${{ matrix.adapter.name }} on node v${{ matrix.node_version }}'

strategy:
fail-fast: false
matrix:
adapter:
- name: 'pg'
setup_task: 'dev-pg-postgres13'
- name: 'neon:ws'
setup_task: 'dev-neon-ws-postgres13'
- name: 'libsql'
setup_task: 'dev-libsql-sqlite'
- name: 'planetscale'
setup_task: 'dev-planetscale-vitess8'
- name: '@prisma/adapter-planetscale'
setup_task: 'dev-planetscale-js'
- name: '@prisma/adapter-pg (napi)'
setup_task: 'dev-pg-js'
- name: '@prisma/adapter-neon (ws) (napi)'
setup_task: 'dev-neon-js'
- name: '@prisma/adapter-libsql (Turso) (napi)'
setup_task: 'dev-libsql-js'
# TODO: uncomment when WASM engine is functional
# - name: '@prisma/adapter-planetscale'
# setup_task: 'dev-planetscale-wasm'
# needs_wasm_pack: true
# - name: '@prisma/adapter-pg (wasm)'
# setup_task: 'dev-pg-wasm'
# needs_wasm_pack: true
# - name: '@prisma/adapter-neon (ws) (wasm)'
# setup_task: 'dev-neon-wasm'
# needs_wasm_pack: true
# - name: '@prisma/adapter-libsql (Turso) (wasm)'
# setup_task: 'dev-libsql-wasm'
# needs_wasm_pack: true
node_version: ['18']
env:
LOG_LEVEL: 'info' # Set to "debug" to trace the query engine and node process running the driver adapter
Expand Down Expand Up @@ -87,9 +100,13 @@ jobs:
echo "DRIVER_ADAPTERS_BRANCH=$branch" >> "$GITHUB_ENV"
fi
- run: make ${{ matrix.adapter.setup_task }}

- uses: dtolnay/rust-toolchain@stable

- name: 'Install wasm-pack'
if: ${{ matrix.adapter.needs_wasm_pack }}
run: cargo install wasm-pack

- run: make ${{ matrix.adapter.setup_task }}

- name: 'Run tests'
run: cargo test --package query-engine-tests -- --test-threads=1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Query Engine
name: Test Query Engine
on:
push:
branches:
Expand All @@ -19,16 +19,12 @@ concurrency:

jobs:
rust-query-engine-tests:
name: 'Test ${{ matrix.database.name }} (${{ matrix.engine_protocol }}) on Linux'
name: '${{ matrix.database.name }} (${{ matrix.engine_protocol }}) on Linux'

strategy:
fail-fast: false
matrix:
database:
- name: 'vitess_5_7'
single_threaded: true
connector: 'vitess'
version: '5.7'
- name: 'vitess_8_0'
single_threaded: true
connector: 'vitess'
Expand All @@ -41,6 +37,10 @@ jobs:
single_threaded: false
connector: 'sqlserver'
version: '2022'
- name: 'sqlite'
single_threaded: false
connector: 'sqlite'
version: '3'
- name: 'mongodb_4_2'
single_threaded: true
connector: 'mongodb'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Schema Engine
name: Test Schema Engine
on:
push:
branches:
Expand All @@ -22,7 +22,7 @@ concurrency:

jobs:
test-mongodb-schema-connector:
name: 'Test ${{ matrix.database.name }} on Linux'
name: '${{ matrix.database.name }} on Linux'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
TEST_DATABASE_URL: ${{ matrix.database.url }}

test-linux:
name: 'Test ${{ matrix.database.name }} on Linux'
name: '${{ matrix.database.name }} on Linux'

strategy:
fail-fast: false
Expand Down Expand Up @@ -94,11 +94,6 @@ jobs:
url: 'postgresql://prisma@localhost:26257'
- name: sqlite
url: sqlite
- name: vitess_5_7
url: 'mysql://root:prisma@localhost:33577/test'
shadow_database_url: 'mysql://root:prisma@localhost:33578/shadow'
is_vitess: true
single_threaded: true
- name: vitess_8_0
url: 'mysql://root:prisma@localhost:33807/test'
shadow_database_url: 'mysql://root:prisma@localhost:33808/shadow'
Expand Down Expand Up @@ -212,7 +207,7 @@ jobs:

runs-on: ${{ matrix.os }}

name: 'Test ${{ matrix.db.name }} on Windows'
name: '${{ matrix.db.name }} on Windows'

steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests
name: Test Unit tests
on:
push:
branches:
Expand Down
2 changes: 0 additions & 2 deletions .test_database_urls/vitess_5_7

This file was deleted.

2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @prisma/team-orm-rust
* @prisma/ORM-Rust
Loading

0 comments on commit 89e7ccd

Please sign in to comment.