Close WAL gap in CheckpointScope::All to prevent clone failures after WAL cleanup #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| # Make sure CI fails on all warnings, including Clippy lints | |
| env: | |
| RUSTFLAGS: "-Dwarnings" | |
| permissions: | |
| # Required for PR comments | |
| pull-requests: write | |
| # Required for storing benchmark results | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: cargo install cargo-hack | |
| run: cargo +stable install cargo-hack --locked | |
| - name: cargo check | |
| run: cargo hack check --each-feature --no-dev-deps --workspace | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: cargo install cargo-hack | |
| run: cargo +stable install cargo-hack --locked | |
| - name: cargo clippy | |
| run: | | |
| cargo hack clippy --each-feature --no-dev-deps --workspace && | |
| cargo hack clippy --workspace --tests | |
| style: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: cargo fmt | |
| run: cargo fmt -- --check | |
| typos: | |
| runs-on: ubuntu-latest | |
| name: typos | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check spelling | |
| uses: crate-ci/typos@v1 | |
| with: | |
| files: | | |
| rfcs | |
| website | |
| flatbuffers: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Allow script to fetch base ref/commits if needed | |
| fetch-depth: 0 | |
| # Install specific version of flatc (24.3.25) | |
| # NOTE: when changing the flatc version adapt slatedb/src/generated/README.md | |
| - name: Install flatc | |
| run: | | |
| wget https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.g++-13.zip | |
| unzip Linux.flatc.binary.g++-13.zip | |
| sudo mv flatc /usr/local/bin/ | |
| # Check schema evolution rules against the base revision | |
| - name: Check FlatBuffers evolution | |
| run: bash scripts/check_flatbuffers_evolution.sh | |
| # Check for differences | |
| - name: Generate and validate files | |
| run: | | |
| flatc -o tmp/generated --rust --gen-all schemas/root.fbs | |
| # Validate only files produced by root.fbs in this step. | |
| # The checked-in generated folder may also contain outputs from other schemas | |
| # (e.g., manifest_generated.rs) and docs (README.md). Those are unrelated to | |
| # this invocation of flatc and would show up as "extra files" in a recursive | |
| # dir-to-dir diff even when root.fbs outputs match. Exclude them to avoid | |
| # false positives. | |
| if ! diff -r -x 'README.md' -x 'manifest_generated.rs' slatedb/src/generated tmp/generated; then | |
| echo "Generated files do not match!" | |
| exit 1 | |
| fi | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: nextest@0.9.98 | |
| - name: Install gdb | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gdb | |
| - name: Run Tests | |
| run: cargo nextest run --workspace --all-features --profile ci | |
| - name: Run Doc Tests | |
| run: cargo test --doc --all-features | |
| - name: Run DST Tests | |
| run: cargo nextest run -p slatedb-dst --all-features --profile dst | |
| env: | |
| RUSTFLAGS: "--cfg dst --cfg tokio_unstable" | |
| tests-cross: | |
| name: tests (cross) | |
| needs: tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: nextest@0.9.98 | |
| - name: Run Tests | |
| run: cargo nextest run --workspace --all-features --profile ci-cross | |
| - name: Run Doc Tests | |
| run: cargo test --doc --all-features | |
| bindings-python: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Create Python virtualenv | |
| working-directory: ./bindings/python | |
| run: python -m venv .venv | |
| - name: Install Python packaging dependencies | |
| working-directory: ./bindings/python | |
| run: | | |
| source .venv/bin/activate | |
| pip install --upgrade pip | |
| pip install maturin "uniffi-bindgen==0.31.0" ruff | |
| - name: Build editable package with test deps | |
| working-directory: ./bindings/python | |
| run: | | |
| source .venv/bin/activate | |
| maturin develop --extras test | |
| - name: Run Ruff linter | |
| working-directory: ./bindings/python | |
| run: | | |
| source .venv/bin/activate | |
| ruff check . --output-format=github | |
| - name: Run pytest | |
| working-directory: ./bindings/python | |
| run: | | |
| source .venv/bin/activate | |
| pytest | |
| bindings-go: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: ./bindings/go/go.mod | |
| - name: Install build dependencies for CGO | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential pkg-config | |
| - name: Install uniffi-bindgen-go | |
| run: cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.7.0+v0.31.0 | |
| - name: Generate Go bindings | |
| run: ./scripts/generate-go-uniffi.sh | |
| - name: Check generated Go bindings | |
| run: git diff --exit-code -- bindings/go | |
| - name: Run Go tests (bindings/go) | |
| working-directory: ./bindings/go | |
| env: | |
| CGO_ENABLED: '1' | |
| CGO_LDFLAGS: "-L${{ github.workspace }}/target/debug" | |
| LD_LIBRARY_PATH: "${{ github.workspace }}/target/debug:${LD_LIBRARY_PATH}" | |
| run: go test ./... | |
| bindings-java: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Set up Java 22 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '22' | |
| - name: Install uniffi-bindgen-java | |
| env: | |
| # uniffi-bindgen-java has some warnings that we don't want to fail the build, so we | |
| # override RUSTFLAGS here to avoid the -Dwarnings from the global env. | |
| RUSTFLAGS: "" | |
| run: cargo install uniffi-bindgen-java --git https://github.com/IronCoreLabs/uniffi-bindgen-java.git --tag 0.4.1 | |
| - name: Run Java tests (bindings/java) | |
| run: ./bindings/java/gradlew -p bindings/java :slatedb-uniffi:check | |
| - name: Ensure Java generation does not modify tracked files | |
| run: git diff --exit-code -- bindings/java | |
| bindings-node: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Set up Node 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Install Node package dependencies | |
| run: npm --prefix bindings/node ci | |
| - name: Install uniffi-bindgen-node-js | |
| env: | |
| RUSTFLAGS: "" | |
| run: cargo install uniffi-bindgen-node-js --version 0.0.7 | |
| - name: Build Node package (bindings/node) | |
| run: npm --prefix bindings/node run build | |
| - name: Run Node tests (bindings/node) | |
| working-directory: ./bindings/node | |
| run: node --test | |
| - name: Verify tracked Node package files are unchanged | |
| run: git diff --exit-code -- bindings/node | |
| - name: Pack Node package | |
| working-directory: ./bindings/node | |
| run: | | |
| mkdir -p /tmp/slatedb-node-pack | |
| npm pack --pack-destination /tmp/slatedb-node-pack | |
| - name: Verify packed Node artifact layout | |
| run: | | |
| TARBALL="$(find /tmp/slatedb-node-pack -maxdepth 1 -name '*.tgz' | head -n 1)" | |
| test -n "${TARBALL}" | |
| tar -tf "${TARBALL}" | grep -Fx 'package/index.js' | |
| tar -tf "${TARBALL}" | grep -Fx 'package/index.d.ts' | |
| tar -tf "${TARBALL}" | grep -Fx 'package/slatedb.js' | |
| tar -tf "${TARBALL}" | grep -Fx 'package/slatedb.d.ts' | |
| tar -tf "${TARBALL}" | grep -Fx 'package/slatedb-ffi.js' | |
| tar -tf "${TARBALL}" | grep -Fx 'package/slatedb-ffi.d.ts' | |
| tar -tf "${TARBALL}" | grep -Fx 'package/runtime/ffi-types.js' | |
| tar -tf "${TARBALL}" | grep -Fx 'package/prebuilds/linux-x64-gnu/libslatedb_uniffi.so' | |
| microbenchmarks: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run benchmark | |
| run: cargo bench -- --output-format bencher | tee output.txt | |
| - name: Download nightly benchmark data | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ./microbenchmarks-cache | |
| key: ${{ runner.os }}-microbenchmarks | |
| - name: Update benchmark result | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| name: cargo bench | |
| tool: 'cargo' | |
| output-file-path: output.txt | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| external-data-json-path: ./microbenchmarks-cache/benchmark-data.json | |
| comment-on-alert: true | |
| summary-always: true | |
| max-items-in-chart: 30 | |
| test_website: | |
| runs-on: ubuntu-latest | |
| needs: tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get changed files | |
| id: changed-website-files | |
| uses: tj-actions/changed-files@6cb76d07bee4c9772c6882c06c37837bf82a04d3 # v46 | |
| with: | |
| files: website/** | |
| - name: Build website | |
| shell: bash | |
| if: steps.changed-website-files.outputs.any_changed == 'true' | |
| working-directory: ./website | |
| run: | | |
| npm install | |
| npm run build |