Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 38 additions & 10 deletions .github/workflows/integration-cassandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,33 @@ jobs:
env:
EXTENDDB_TEST_CASSANDRA: required

# One release build shared by the pytest and rust jobs; see integration.yml.
build-cassandra:
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 40
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
# Only pushes to main save, so other runs restore main's cache.
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build release (cassandra backend)
run: cargo build --release --no-default-features --features cassandra
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: extenddb-cassandra
path: target/release/extenddb
if-no-files-found: error
retention-days: 1
# A re-run of a failed job uploads the same name again.
overwrite: true

cassandra-pytest:
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 45
needs: build-cassandra
services:
cassandra:
image: cassandra:4.1
Expand All @@ -119,12 +143,6 @@ jobs:
--health-start-period 60s
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
# Only pushes to main save, so other runs restore main's cache.
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Configure Cassandra authentication
run: |
docker exec ${{ job.services.cassandra.id }} sed -i \
Expand All @@ -147,14 +165,19 @@ jobs:
python-version: "3.11"
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Build release (cassandra backend)
run: cargo build --release --no-default-features --features cassandra
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: extenddb-cassandra
path: target/release
# Artifacts do not keep file modes.
- run: chmod +x target/release/extenddb
- name: Run Cassandra pytest suite
run: devtools/run-cassandra-tests -- --pytest --comprehensive --parallel

cassandra-rust:
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 45
needs: build-cassandra
services:
cassandra:
image: cassandra:4.1
Expand Down Expand Up @@ -200,8 +223,13 @@ jobs:
python-version: "3.11"
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Build release (cassandra backend)
run: cargo build --release --no-default-features --features cassandra
# After the cache restore, so a cached target/ cannot replace it.
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: extenddb-cassandra
path: target/release
# Artifacts do not keep file modes.
- run: chmod +x target/release/extenddb
- name: Run Cassandra rust integration suite
run: devtools/run-cassandra-tests -- --rust-integration

Expand Down
72 changes: 64 additions & 8 deletions .github/workflows/integration-mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
mongodb-pytest:
# Dedicated ExtendDB runner group (Ubuntu 24.04, 4 vCPU / 16 GB, capped at
# 20 concurrent). ubuntu-latest is an Amazon-wide shared pool where our jobs
# waited 10-90 minutes to start (2026-09-29/30); see integration.yml.
# One release build shared by the pytest and rust jobs; see integration.yml.
build-mongodb:
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 40
steps:
Expand All @@ -43,16 +41,59 @@ jobs:
cache-on-failure: true
# Only pushes to main save, so other runs restore main's cache.
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build release (mongodb backend)
run: cargo build --release --no-default-features --features mongodb-test-hooks
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: extenddb-mongodb
path: target/release/extenddb
if-no-files-found: error
retention-days: 1
# A re-run of a failed job uploads the same name again.
overwrite: true

mongodb-pytest:
# Dedicated ExtendDB runner group (Ubuntu 24.04, 4 vCPU / 16 GB, capped at
# 20 concurrent). ubuntu-latest is an Amazon-wide shared pool where our jobs
# waited 10-90 minutes to start (2026-09-29/30); see integration.yml.
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 40
needs: build-mongodb
# Three shards by test file; mongodb-integration checks that together
# they collected every test of the whole suite.
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3]
env:
EXTENDDB_TEST_SHARD: ${{ matrix.shard }}/3
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Build release (mongodb backend)
run: cargo build --release --no-default-features --features mongodb-test-hooks
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: extenddb-mongodb
path: target/release
# Artifacts do not keep file modes.
- run: chmod +x target/release/extenddb
- name: Run MongoDB pytest suite
run: devtools/run-mongodb-tests -- --pytest --comprehensive --parallel

# mongodb-integration checks these lists.
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: shards-mongodb-pytest-${{ matrix.shard }}
path: discussions/shards/
if-no-files-found: warn
retention-days: 1
# A re-run of a failed job uploads the same name again.
overwrite: true

# SnapshotEngine consistency check against a disposable replica set. The
# tests build their own per-test scratch databases (snap<uuid>_cat and
# _data) and drop them; they run in this job because it is the one that
Expand Down Expand Up @@ -107,6 +148,7 @@ jobs:
mongodb-rust:
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 40
needs: build-mongodb
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -120,8 +162,13 @@ jobs:
python-version: "3.11"
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Build release (mongodb backend)
run: cargo build --release --no-default-features --features mongodb-test-hooks
# After the cache restore, so a cached target/ cannot replace it.
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: extenddb-mongodb
path: target/release
# Artifacts do not keep file modes.
- run: chmod +x target/release/extenddb
- name: Run MongoDB rust integration suite
run: devtools/run-mongodb-tests -- --rust --rust-integration

Expand Down Expand Up @@ -152,3 +199,12 @@ jobs:
[ "${{ needs.mongodb-snapshot.result }}" != "success" ]; then
exit 1
fi
# Fails unless the shards together collected every test of the whole
# suite exactly once, so a bad split cannot pass.
- uses: actions/checkout@v6
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: shards-mongodb-pytest-*
path: shards/mongodb-pytest
- name: Check the shards ran every test
run: python3 devtools/test-shards check shards/mongodb-pytest
Loading
Loading