Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4737451
devtools: add per-file test durations for shard balancing
LeeroyHannigan Oct 30, 2026
3648e28
ci: build each release binary once per feature set
LeeroyHannigan Oct 30, 2026
a4fb235
devtools: add test-shards to split pytest suites by file
LeeroyHannigan Oct 30, 2026
07253c2
devtools: run one shard of each pytest suite with run-tests --shard
LeeroyHannigan Oct 30, 2026
be58f0e
devtools: return the shard command through SHARD_CMD
LeeroyHannigan Oct 30, 2026
0f11b75
ci: run the long pytest jobs as three shards and check them
LeeroyHannigan Oct 30, 2026
98629a7
ci: run the PostgreSQL storage-level tests in their own job
LeeroyHannigan Oct 30, 2026
b7fbcb7
ci: pass the shard through EXTENDDB_TEST_SHARD
LeeroyHannigan Oct 30, 2026
4df7f81
ci: escape list fields, quiet shard collection, overwrite artifacts
LeeroyHannigan Oct 30, 2026
4a45a51
ci: save Rust caches only from pushes to main in the new jobs
LeeroyHannigan Oct 30, 2026
2f45515
Merge main into ci/fast-checks
LeeroyHannigan Nov 6, 2026
87cc396
ci: run cassandra-pytest as five shards and check them
LeeroyHannigan Nov 6, 2026
65ede4f
ci: cache the v0.1.14 build in cassandra-catalog-checks
LeeroyHannigan Nov 6, 2026
f7d8142
ci: give test_query_start_key_index.py its own Cassandra weight
LeeroyHannigan Nov 6, 2026
315d084
ci: let each leg upload the regenerated schema
LeeroyHannigan Nov 6, 2026
eaef2f1
ci: key the v0.1.14 cache on the build's features and the runner arch
LeeroyHannigan Nov 6, 2026
8f8103b
ci: save the v0.1.14 cache only from pushes to main
LeeroyHannigan Nov 6, 2026
e196b29
Merge main into ci/fast-checks
LeeroyHannigan Nov 7, 2026
64faf03
ci: save cassandra-catalog-checks' Rust cache only from pushes to main
LeeroyHannigan Nov 7, 2026
696c28b
ci: save cassandra-two-nodes' Rust cache only from pushes to main
LeeroyHannigan Nov 7, 2026
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
140 changes: 118 additions & 22 deletions .github/workflows/integration-cassandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,44 @@ jobs:
env:
EXTENDDB_TEST_CASSANDRA: required

# One release build shared by the jobs that test it; see integration.yml.
build-cassandra:
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 40
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
with:
toolchain: stable
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
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
# Five shards by test file, each with its own Cassandra node;
# cassandra-integration checks that together they collected every test
# of the whole suite.
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4, 5]
env:
EXTENDDB_TEST_SHARD: ${{ matrix.shard }}/5
services:
cassandra:
image: cassandra:4.1
Expand All @@ -143,14 +178,6 @@ jobs:
--health-start-period 60s
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
with:
toolchain: stable
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
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 @@ -173,18 +200,34 @@ 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
env:
# run-cassandra-tests initializes the server without [backup.store],
# and Cassandra takes the in-catalog create with one.
EXTENDDB_TEST_BACKUP_STORE: none
run: devtools/run-cassandra-tests -- --pytest --comprehensive --parallel

# cassandra-integration checks these lists.
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: shards-cassandra-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

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 @@ -232,8 +275,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
env:
# run-cassandra-tests initializes the server without [backup.store]:
Expand Down Expand Up @@ -262,6 +310,11 @@ jobs:
cassandra-catalog-checks:
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 60
needs: build-cassandra
env:
# The cargo features of the v0.1.14 build, read by its cache key
# and its build command.
V0114_FEATURES: cassandra
services:
cassandra:
image: cassandra:4.1
Expand All @@ -279,10 +332,26 @@ jobs:
--health-start-period 60s
steps:
- uses: actions/checkout@v6
# A tag does not change, so the v0.1.14 binary is cached by the tag,
# the cargo features and the runner's OS and architecture. Every run
# restores it, and only a push to main saves it, as for the Rust
# caches, so no pull request run writes the entry. On a hit the job
# skips that build and the Rust toolchain and cache steps, which only
# that build uses.
- name: Restore the v0.1.14 release (cassandra backend)
id: cache-v0-1-14
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ runner.temp }}/target-v0.1.14/release/extenddb
key: extenddb-v0.1.14-no-default-features-${{ env.V0114_FEATURES }}-${{ runner.os }}-${{ runner.arch }}
- uses: dtolnay/rust-toolchain@stable
if: steps.cache-v0-1-14.outputs.cache-hit != 'true'
- uses: Swatinem/rust-cache@v2
if: steps.cache-v0-1-14.outputs.cache-hit != 'true'
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 @@ -305,8 +374,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

# A fresh install's schema against the committed file. On a difference
# the job fails with the diff and uploads the regenerated file to commit.
Expand Down Expand Up @@ -339,15 +413,25 @@ jobs:
${{ job.services.cassandra.id }} 127.0.0.1:9042 18454

# No released image carries the Cassandra backend, so the job builds
# the last 0.1.x release from its tag.
# the last 0.1.x release from its tag, on a cache miss only.
- name: Build the v0.1.14 release (cassandra backend)
if: steps.cache-v0-1-14.outputs.cache-hit != 'true'
run: |
git fetch --depth 1 origin tag v0.1.14
git worktree add "$RUNNER_TEMP/extenddb-v0.1.14" v0.1.14
cargo build --release --no-default-features --features cassandra \
cargo build --release --no-default-features --features "$V0114_FEATURES" \
--manifest-path "$RUNNER_TEMP/extenddb-v0.1.14/Cargo.toml" \
--target-dir "$RUNNER_TEMP/target-v0.1.14"

- name: Save the v0.1.14 release (cassandra backend)
if: >-
github.event_name == 'push' && github.ref == 'refs/heads/main' &&
steps.cache-v0-1-14.outputs.cache-hit != 'true'
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ runner.temp }}/target-v0.1.14/release/extenddb
key: extenddb-v0.1.14-no-default-features-${{ env.V0114_FEATURES }}-${{ runner.os }}-${{ runner.arch }}

- name: Check the last 0.1.x release against migrated catalogs
run: >-
devtools/check-cassandra-older-binary ./target/release/extenddb
Expand All @@ -366,6 +450,8 @@ jobs:
- 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: Start a two-node cluster
run: |
docker network create cassandra-two-nodes
Expand Down Expand Up @@ -415,6 +501,7 @@ jobs:
cassandra-authorizer:
runs-on: extenddb_ubuntu-2404_4-core
timeout-minutes: 45
needs: build-cassandra
services:
cassandra:
image: cassandra:4.1
Expand All @@ -432,10 +519,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
- name: Configure Cassandra authentication and CassandraAuthorizer
run: |
docker exec ${{ job.services.cassandra.id }} sed -i \
Expand All @@ -459,8 +542,12 @@ 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: Check init, migrate, serve and CreateAccount under CassandraAuthorizer
run: >-
devtools/check-cassandra-authorizer ./target/release/extenddb
Expand Down Expand Up @@ -489,3 +576,12 @@ jobs:
[ "${{ needs.cassandra-authorizer.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@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: shards-cassandra-pytest-*
path: shards/cassandra-pytest
- name: Check the shards ran every test
run: python3 devtools/test-shards check shards/cassandra-pytest
Loading
Loading