tidaldb/docker/stress/Dockerfile
jx12n 580142df49 feat(m12): election-divergence-fix + soak-eval streak + release tooling
Durable `leader_acked` frontier in `ShardReplica` tracks the highest seqno
acked under `ack=leader` (journal-only, un-replicated); `decide_join` now
quarantines on THIS node's own frontier rather than comparing stream numbers
across stream boundaries — eliminates false-quarantine churn on rolling
restarts. `SHUTDOWN_HANDOFF_WAIT` (3s) drains the leader's tail to quorum
before step-down so the next leader inherits a clean prefix. New
`load_leader_acked`/`persist_leader_acked` helpers; `cluster_reseed.rs` gains
the divergence-fix regression suite; `replication_ops.rs` threads the signal.

Soak-eval: `tidal_stress::soak_eval` + `soak-eval` binary implement the
30-night streak (ledger.tsv × restarts.tsv → streak.tsv); monitor and nightly
CronJob k8s YAMLs updated; phase-9 doc clarifies the dual-stream streak
definition (ledger PASS AND zero pod restarts in window). `run-reliability.sh`
gates the election-divergence suite before any k8s push.

Release tooling: `docker/release/` multi-stage Dockerfile + DR image;
`scripts/build-release.sh` single repeatable cross-compile+buildx path.
2026-06-18 13:08:53 -06:00

42 lines
1.8 KiB
Docker

# tidal-stress load generator image.
#
# Build context is this repository's root (the workspace Cargo.toml / Cargo.lock
# and every member manifest live there). Build from the repo root:
#
# docker build -f docker/stress/Dockerfile -t tidaldb:stress .
#
# tidal-stress is a pure-Rust HTTP client (tokio + reqwest/rustls): it depends on
# NONE of the engine crates, so this build never compiles tidal/tidal-net/usearch
# and needs no protoc/g++. Pin the builder to bookworm so its glibc matches the
# runtime; trixie's vectorized-math libmvec is handled by the trixie runtime below.
FROM rust:1.91-bookworm AS builder
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /app
# Copy the full (already-pruned by .dockerignore) workspace and build only the
# load generator. The unified workspace requires every member manifest present to
# resolve metadata, so copy the whole context rather than a fragile subset.
COPY . .
RUN cargo build -p tidal-stress --release --locked
FROM debian:trixie-slim
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /srv
# ca-certificates only matters if a target is https:// (in-cluster targets are
# plaintext http://); kept for completeness. No libstdc++ (no C++ in this crate).
RUN useradd --system --home /srv stress && \
apt-get update && apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/tidal-stress /usr/local/bin/tidal-stress
# soak-eval: the 30-night streak evaluator (built from the same crate; see
# tidal-stress/src/bin/soak-eval.rs). The soak monitor's evaluator container runs
# it to join ledger.tsv + restarts.tsv into the honest streak verdict.
COPY --from=builder /app/target/release/soak-eval /usr/local/bin/soak-eval
USER stress
# ENTRYPOINT is the bare binary so the Job supplies the full ramp/mix/target argv.
ENTRYPOINT ["tidal-stress"]