Skip to content
Draft
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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ jobs:
key: ${{ runner.os }}-${{ runner.arch }}-sdk-tests-v2-lines-${{ steps.toolchain.outputs.cachekey }}-${{ steps.dependencies.outputs.key }}
- run: cargo fmt --all --check
- run: cargo test --locked --all-targets --all-features
- name: Check explicit Rust 1.86 compatibility without default features
if: ${{ matrix.rust == '1.86.0' }}
run: cargo check --locked --no-default-features --features msrv-1-86
- name: Check modern native host dependency composition
if: ${{ matrix.rust == 'stable' }}
run: scripts/ci/check-native-composition.sh
- name: Qualify ready-age metrics against the published native Server
if: ${{ matrix.rust == '1.86.0' }}
run: python3 scripts/ci/qualify-worker-metrics.py
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

- The default `msrv-1-86` feature retains the existing compiler-compatibility
dependency pin. Modern hosts can disable it to compose the SDK with native
Server's newer official Avro dependency. Rust 1.86 consumers that disable
default features must explicitly enable `msrv-1-86`; an unpinned fresh graph
can require a newer compiler.

- Service activity contexts expose negotiated, immutable acknowledged-heartbeat
checkpoint details and a typed acknowledgement time. Unsupported claims stay
unavailable, separately from a supported claim with no checkpoint. Heartbeat
Expand Down
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ name = "durable_workflow"
path = "src/lib.rs"

[features]
default = []
default = ["msrv-1-86"]
# Keep the legacy compiler dependency pin for default SDK builds. A host
# already using a newer Rust toolchain may disable default features to
# compose with libraries that require a newer builder macro.
msrv-1-86 = ["dep:bon"]
telemetry = ["dep:opentelemetry", "dep:opentelemetry_sdk"]
metrics-prometheus = ["dep:prometheus"]

Expand All @@ -120,7 +124,7 @@ tracing = { version = "0.1", default-features = false, features = ["std"] }
apache-avro = { version = "0.21", default-features = false }
base64 = "0.22"
# Keep apache-avro's dependency resolution compatible with the Rust 1.86 MSRV.
bon = { version = "=3.8.1", default-features = false }
bon = { version = "=3.8.1", default-features = false, optional = true }
chrono = { version = "0.4", default-features = false, features = ["alloc"] }
futures-util = "0.3"
# Keep reqwest's IDNA dependency resolution compatible with the Rust 1.86 MSRV.
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,16 @@ negotiation remain required for individual features.

## Development

Default builds enable `msrv-1-86`, which keeps the builder-macro dependency pin
needed by fresh Rust 1.86 consumers. If you disable default features and still
require Rust 1.86, explicitly enable `msrv-1-86`.

A host on a newer compiler can omit that feature to compose the SDK with the
native Server library and its newer official Avro dependency. Without the pin,
fresh dependency resolution can require a newer compiler. The native composition
check uses Rust 1.88 or later; this opt-out does not change SDK runtime APIs or
protocol negotiation.

```sh
cargo fmt --all --check
cargo test --locked --all-targets --all-features
Expand Down
3 changes: 2 additions & 1 deletion scripts/ci/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# CI support

These scripts support four public repository checks:
These scripts support public repository checks:

- replay and codec regression-corpus validation;
- Apache Avro interoperability and performance checks;
- publishable crate and fresh-consumer verification;
- compiler compatibility and native host dependency composition;
- API documentation, analytics, navigation, and base-URL checks.

The release workflow uses the crates.io publishing scripts after an immutable
Expand Down
26 changes: 26 additions & 0 deletions scripts/ci/check-native-composition.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail

composition_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"
composition_manifest="$composition_root/tests/native-composition/Cargo.toml"
composition_log="$(mktemp)"
trap 'rm -f -- "$composition_log"' EXIT

# The modern host opts out; Cargo must compile both official Avro versions.
cargo check --manifest-path "$composition_manifest"

# Re-enabling the legacy compiler pin must retain the real resolver refusal.
if cargo metadata --format-version 1 --manifest-path "$composition_manifest" \
--features durable-workflow/msrv-1-86 >"$composition_log" 2>&1; then
printf 'native composition unexpectedly accepted the incompatible MSRV pin\n' >&2
exit 1
fi
python3 -I -S -B - "$composition_log" <<'PY'
import pathlib
import sys

error = pathlib.Path(sys.argv[1]).read_text()
if not all(value in error for value in ("bon", "3.8.1", "3.9.1")):
raise SystemExit("native composition failed without the expected bon constraint conflict")
print("modern composition builds; the explicit MSRV pin retains its resolver refusal")
PY
2 changes: 2 additions & 0 deletions tests/native-composition/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/Cargo.lock
/target/
12 changes: 12 additions & 0 deletions tests/native-composition/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "durable-workflow-native-composition-check"
version = "0.0.0"
edition = "2021"
rust-version = "1.88"
publish = false

[workspace]

[dependencies]
durable-workflow = { path = "../..", default-features = false }
apache-avro = { version = "=0.22.0", default-features = false }
4 changes: 4 additions & 0 deletions tests/native-composition/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
let _client = durable_workflow::Client::builder("http://127.0.0.1:8080");
let _schema = apache_avro::Schema::parse_str("\"null\"").unwrap();
}
Loading