Skip to content

The latest-state copy of a record is slimmed too #2238

The latest-state copy of a record is slimmed too

The latest-state copy of a record is slimmed too #2238

Workflow file for this run

name: Rust CI
# Compile the Rust workspace. `cargo check --all-targets` is the fast gate that
# runs on every Rust-touching push; the heavier release build + single-threaded
# release test suite (a few high-cardinality tests are O(n^2) and far too slow
# unoptimized) runs on pull requests and once nightly -- NOT on every push. That
# keeps Actions minutes down on a high-churn main while PRs still get full CI.
on:
push:
branches: [main, rust-main]
# Push only runs the fast `check` job (below); skip even that on
# doc/tool/website-only commits.
paths:
- 'crates/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust-ci.yml'
pull_request:
# No `branches:` filter here, deliberately. This key filters on the BASE branch, and a
# stacked pull request is based on the branch below it, not on main -- so this job did not
# run on one at all. Worse, when the branch below it merged, GitHub retargeted the pull
# request to main and did NOT re-run anything: the stale checks from the feature-branch
# days stayed green and the pull request merged reporting success from a job that had
# never seen it. Running on every pull request costs a few Actions minutes and is the only
# way the gate covers the changes that actually reach main.
schedule:
- cron: '0 7 * * *' # nightly full build + test on the default branch
workflow_dispatch:
# Cancel superseded runs on the same ref so rapid pushes to a busy branch do not
# each re-run CI -- only the newest commit's run survives.
concurrency:
group: rust-ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: cargo check (fast, on push)
# On push we only spend the fast compile gate; PRs / nightly run the full
# build+test job below instead.
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system build dependencies
# librocksdb-sys (via matrixcache's rocksdb-ssd feature) runs bindgen and
# needs libclang; building RocksDB itself needs cmake.
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang libclang-dev cmake
- name: Install Rust toolchain
run: rustup toolchain install 1.88.0 --profile minimal --no-self-update && rustup default 1.88.0
- name: Cache cargo registry and target
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-${{ runner.os }}-
- name: cargo check (all targets)
run: cargo check -p temporalstore-rust --all-targets
build-and-test:
name: cargo check / build / test
# Runs on pull requests, the nightly schedule, and manual dispatch -- NOT on
# push, so post-merge pushes to a busy main do not each pay the ~45-min run.
if: github.event_name != 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system build dependencies
# librocksdb-sys (via matrixcache's rocksdb-ssd feature) runs bindgen and
# needs libclang; building RocksDB itself needs cmake.
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang libclang-dev cmake
- name: Install Rust toolchain
run: rustup toolchain install 1.88.0 --profile minimal --no-self-update && rustup default 1.88.0
- name: Cache cargo registry and target
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-${{ runner.os }}-
- name: cargo check (all targets)
run: cargo check -p temporalstore-rust --all-targets
- name: cargo build (release service binaries)
run: cargo build --release -p temporalstore-rust --bin matrixark_rust_metaserver --bin matrixark_rust_datanode
# The compile gates above are what enforce this workflow. The suite is run
# for visibility but is NOT yet a required gate: the tree carries a small
# number of known, pre-existing baseline failures. Flip continue-on-error
# off once the baseline is fully green.
- name: cargo test (lib + integration, single-threaded, release)
timeout-minutes: 45
continue-on-error: true
run: cargo test --release -p temporalstore-rust --lib --tests -- --test-threads=1
# Bin unit tests are not covered by --lib/--tests, so a failing test in a
# service binary can sit on main unnoticed. Run the proxy bin's suite as a
# hard gate. Deliberately NOT --bins: some bin test harnesses run servers
# that never exit, which would hang the job.
- name: cargo test (matrixark_rust_proxy bin, single-threaded, release)
timeout-minutes: 20
run: cargo test --release -p temporalstore-rust --bin matrixark_rust_proxy -- --test-threads=1