Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
655d956
define the cross-language conformance contract
bgentry Oct 4, 2026
ae5e22e
add the Go reference conformance adapter
bgentry Oct 4, 2026
6ec81b5
add the PostgreSQL conformance harness
bgentry Oct 4, 2026
5c27d07
check worker runtime behavior across engines
bgentry Oct 4, 2026
130b9c9
check clients that know different job kinds
bgentry Oct 4, 2026
18131a5
check notifications and cancellation across engines
bgentry Oct 4, 2026
dd79397
check leadership and process failures across engines
bgentry Oct 4, 2026
1fdd281
check simulated YugabyteDB clients
bgentry Oct 4, 2026
ab271f3
add maintenance and leadership conformance
bgentry Oct 4, 2026
d3c4569
add PostgreSQL resilience conformance
bgentry Oct 4, 2026
ac76e82
add performance and soak conformance gates
bgentry Oct 4, 2026
439a510
add SQLite storage conformance
bgentry Oct 4, 2026
288866e
add SQLite runtime conformance
bgentry Oct 4, 2026
4bf285a
add an insert-only conformance profile
bgentry Oct 4, 2026
298b253
add multi-engine conformance tiers
bgentry Oct 4, 2026
2cf60e2
expose default retry delay bounds
bgentry Oct 4, 2026
9165e02
derive conformance goldens and a feature inventory from Go
bgentry Oct 4, 2026
96c7b6c
document the conformance suite
bgentry Oct 4, 2026
65764d9
add the Rust migration crate
bgentry Oct 4, 2026
d240bc8
add the Rust JobArgs derive macro
bgentry Oct 4, 2026
55db863
add River's Rust client
bgentry Oct 4, 2026
8b67091
test the JobArgs derive against riverqueue
bgentry Oct 4, 2026
076d637
test Rust storage on PostgreSQL and SQLite
bgentry Oct 4, 2026
3a9e8e0
test the Rust client runtime
bgentry Oct 4, 2026
2b412eb
test Rust clients through database faults
bgentry Oct 4, 2026
cd61635
test Rust extension points
bgentry Oct 4, 2026
9ab4a26
add Rust examples
bgentry Oct 4, 2026
d3e3774
add Rust test helpers
bgentry Oct 4, 2026
a4d862d
add the riverqueue command
bgentry Oct 4, 2026
ea87ea5
run the Rust client as a conformance candidate
bgentry Oct 4, 2026
e1674d8
run the Rust crates and conformance in CI
bgentry Oct 4, 2026
f3182fc
keep Rust and workflow dependencies updated
bgentry Oct 4, 2026
016b0ee
document the Rust workspace
bgentry Oct 4, 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
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@

version: 2
updates:
- package-ecosystem: "cargo"
directory: "/rust"
cooldown:
default-days: 7
groups:
rust-dependencies:
update-types:
- "minor"
- "patch"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "gomod"
directories:
- "**/*"
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,23 @@ jobs:
- name: Run lint
run: make lint

conformance_artifacts:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version: "1.27"

# Fails when a Go feature, migration, or protocol value changes
# without its conformance fixture, Rust mirror, or feature inventory
# classification being updated.
- name: Verify conformance fixtures, feature inventory, and Rust migrations
run: make verify/conformance verify/feature-inventory verify/rust-migrations

migration_and_sqlc_verify:
runs-on: ubuntu-latest
timeout-minutes: 2
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/release-candidate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release candidate

# Manual gate before releasing the Rust crates: blocking performance gates and
# a one-hour soak for Go with Rust on every supported PostgreSQL version.

on:
workflow_dispatch:
inputs:
soak-duration:
default: 1h
description: Soak duration per job
required: true
type: string

permissions:
contents: read

env:
# Keep the cross-run cache small; Cargo still reuses compiled dependencies.
CARGO_INCREMENTAL: "0"

jobs:
release-candidate:
runs-on: ubuntu-latest
timeout-minutes: 240
strategy:
fail-fast: false
matrix:
postgres-version: [14, 15, 16, 17, 18]
env:
RIVER_CONFORMANCE_DATABASE_URL: postgres://postgres:postgres@localhost:5432/river_release_candidate?sslmode=disable
RIVER_CONFORMANCE_REQUIRED: "1"

services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 2s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.27"
- uses: dtolnay/rust-toolchain@stable
- name: Create test database
run: PGPASSWORD=postgres createdb -h localhost -U postgres river_release_candidate
- name: Go and Rust release performance
env:
RIVER_CONFORMANCE_PERFORMANCE: "1"
run: make test/conformance/performance
- name: Go and Rust soak
env:
RIVER_CONFORMANCE_SOAK_DURATION: ${{ inputs.soak-duration }}
# Keeps the soak's `go test` backstop inside this job's timeout. A
# soak that can't finish within it fails at startup.
CONFORMANCE_SOAK_TIMEOUT: 3h
run: make test/conformance/soak
67 changes: 67 additions & 0 deletions .github/workflows/rust-soak.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Rust scheduled soak

on:
schedule:
- cron: "17 3 * * 0"
workflow_dispatch:
inputs:
duration:
default: 6h
description: Mixed Go/Rust soak duration
required: true
type: string

permissions:
contents: read

env:
# Keep the cross-run cache small; Cargo still reuses compiled dependencies.
CARGO_INCREMENTAL: "0"

jobs:
soak:
runs-on: ubuntu-latest
timeout-minutes: 390
strategy:
fail-fast: false
matrix:
postgres-version: [14, 15, 16, 17, 18]
env:
RIVER_CONFORMANCE_DATABASE_URL: postgres://postgres:postgres@localhost:5432/river_rust_soak?sslmode=disable
RIVER_CONFORMANCE_REQUIRED: "1"
RIVER_CONFORMANCE_SOAK_DURATION: ${{ inputs.duration || '6h' }}

services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 2s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.27"
- uses: dtolnay/rust-toolchain@stable
id: rust
- name: Cache Rust dependencies and build artifacts
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
rust/target
key: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-${{ hashFiles('rust/**/Cargo.toml', 'rust/Cargo.lock') }}
restore-keys: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-
- name: Create test database
run: PGPASSWORD=postgres createdb -h localhost -U postgres river_rust_soak
- name: Mixed soak
run: make test/conformance/soak
191 changes: 191 additions & 0 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
name: Rust

on:
push:
branches:
- master
pull_request:

permissions:
contents: read

env:
# Keep the cross-run cache small; Cargo still reuses compiled dependencies.
CARGO_INCREMENTAL: "0"

jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
id: rust
with:
components: clippy,rustfmt
- name: Cache Rust dependencies and build artifacts
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
rust/target
key: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-${{ hashFiles('rust/**/Cargo.toml', 'rust/Cargo.lock') }}
restore-keys: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny@0.20.2
- uses: taiki-e/install-action@v2
with:
tool: cargo-semver-checks@0.49.0

- name: Lint, including PostgreSQL-only and SQLite-only builds
run: make lint/rust

- name: Documentation and examples
run: make doc/rust

- name: Dependency and license policy
run: make check/rust/dependencies

- name: Package archives
run: make check/rust/package

# Compare with the latest published Rust release tag, which the full
# checkout above includes. Before the first release there is no
# baseline and the step reports that instead of failing.
- name: Public API compatibility
run: make check/rust/semver

# docs.rs builds with a nightly toolchain and `--cfg docsrs`, which
# enables the crates' `doc_cfg` feature badges. Last, since installing
# nightly makes it the default toolchain for later steps.
- uses: dtolnay/rust-toolchain@nightly
- name: Documentation as docs.rs builds it
run: make doc/rust/docsrs

msrv:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
rust-version: ["1.95", "1.96", "1.97"]

steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@master
id: rust
with:
toolchain: ${{ matrix.rust-version }}
- name: Cache Rust dependencies and build artifacts
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
rust/target
key: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-${{ hashFiles('rust/**/Cargo.toml', 'rust/Cargo.lock') }}
restore-keys: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-
- name: Check every target and feature
run: cargo check --manifest-path rust/Cargo.toml --workspace --all-targets --all-features --locked
- name: Unit, doc, and SQLite tests
run: make test/rust/sqlite

sqlite-conformance:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
RIVER_CONFORMANCE_REQUIRED: "1"

steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.27"
- uses: dtolnay/rust-toolchain@stable
id: rust
- name: Cache Rust dependencies and build artifacts
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
rust/target
key: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-${{ hashFiles('rust/**/Cargo.toml', 'rust/Cargo.lock') }}
restore-keys: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-
- name: SQLite storage and runtime conformance
run: make test/conformance/sqlite

postgres-conformance:
runs-on: ubuntu-latest
# Builds plus the Rust suite (~10m), mixed conformance (~5m), the
# ten-minute soak (up to its 20m backstop), and the advisory performance
# tier (~10m on PostgreSQL 18) need more than 45 minutes on a slow runner.
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
postgres-version: [14, 15, 16, 17, 18]
env:
RIVER_CONFORMANCE_DATABASE_URL: postgres://postgres:postgres@localhost:5432/river_rust_test?sslmode=disable
RIVER_CONFORMANCE_REQUIRED: "1"
RIVER_CONFORMANCE_SOAK_DURATION: 10m
# Keeps the soak's `go test` backstop inside this job's timeout.
CONFORMANCE_SOAK_TIMEOUT: 20m
RIVER_RUST_DATABASE_URL: postgres://postgres:postgres@localhost:5432/river_rust_test?sslmode=disable

services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 2s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.27"
- uses: dtolnay/rust-toolchain@stable
id: rust
- name: Cache Rust dependencies and build artifacts
uses: actions/cache@v5
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
rust/target
key: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-${{ hashFiles('rust/**/Cargo.toml', 'rust/Cargo.lock') }}
restore-keys: rust-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.job }}-${{ steps.rust.outputs.cachekey }}-
- name: Create test database
run: PGPASSWORD=postgres createdb -h localhost -U postgres river_rust_test
- name: Rust unit, SQLite, and PostgreSQL tests
run: make test/rust
- name: Mixed correctness and chaos
run: make test/conformance
- name: Insert-only profile
run: make test/conformance/insert-only
- name: Ten-minute mixed soak
run: make test/conformance/soak
# Shared runners are too noisy to gate every pull request on timing.
# This run reports regressions; the release candidate workflow gates.
- name: Release performance (advisory)
if: matrix.postgres-version == 18
continue-on-error: true
env:
RIVER_CONFORMANCE_PERFORMANCE: "1"
run: make test/conformance/performance
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/river
/riverdriver/riverdrivertest/example_libsql_test.libsql
/sqlite/
/rust/**/target/
Loading
Loading