Implement crash-safe streaming worker runtime

This commit is contained in:
ms2k 2026-07-17 18:51:44 +09:00
commit cdeef3cc1a

View file

@ -285,6 +285,35 @@ COPY crates crates
COPY --from=kind-worker-api-verified /tmp/remora-api-tests.tar.zst /tests/remora-api-tests.tar.zst
CMD ["bash", "-ec", "test -s /run/remora-fixture/profile.env && test -n \"$DATABASE_URL\" && test -n \"$REMORA_COORDINATION_URL\" && export REMORA_WORKER_API_REQUIRE=1 && cargo-nextest nextest run --archive-file /tests/remora-api-tests.tar.zst --workspace-remap /workspace --test-threads=1 --no-fail-fast"]
FROM rust-tools AS kind-worker-build
WORKDIR /workspace
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
COPY .config .config
COPY contracts contracts
COPY crates crates
COPY docs/api docs/api
RUN cargo nextest archive \
--package remora-worker \
--build-jobs 4 \
--locked \
--archive-file /tmp/remora-worker-tests.tar.zst
FROM kind-worker-build AS kind-worker-verified
RUN cargo clippy \
--package remora-worker \
--all-targets \
--all-features \
--locked \
-- -D warnings \
&& cargo test --package remora-worker --doc --locked
FROM rust-tools AS kind-worker-runner
WORKDIR /workspace
COPY Cargo.toml ./
COPY crates crates
COPY --from=kind-worker-verified /tmp/remora-worker-tests.tar.zst /tests/remora-worker-tests.tar.zst
CMD ["bash", "-ec", "test -s /run/remora-fixture/profile.env && test -n \"$DATABASE_URL\" && test -n \"$REMORA_COORDINATION_URL\" && test -n \"$REMORA_TARGET_ENDPOINT\" && test -n \"$REMORA_VAULT_ADDR\" && case $REMORA_COORDINATION_PROVIDER in redis|dragonfly) ;; *) exit 1 ;; esac && case $REMORA_TARGET_PROVIDER in garage|versitygw) ;; *) exit 1 ;; esac && export REMORA_WORKER_REQUIRE=1 && cargo-nextest nextest run --archive-file /tests/remora-worker-tests.tar.zst --workspace-remap /workspace --test-threads=1 --no-fail-fast"]
FROM rust-tools AS kind-http-source-build
WORKDIR /workspace
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./