Skip to content

Commit 3357913

Browse files
authored
Merge pull request #492 from ModernRelay/codex/rustfs-ci-harness-stabilization
ci: stabilize configured RustFS integration
2 parents 4419cb7 + 40b9a79 commit 3357913

3 files changed

Lines changed: 55 additions & 9 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -474,15 +474,25 @@ jobs:
474474
475475
- name: Create RustFS test bucket
476476
run: |
477-
for _ in $(seq 1 30); do
477+
set -euo pipefail
478+
rustfs_ready=false
479+
for attempt in $(seq 1 30); do
478480
if aws --endpoint-url "${AWS_ENDPOINT_URL_S3}" s3api list-buckets >/dev/null 2>&1; then
481+
rustfs_ready=true
479482
break
480483
fi
484+
echo "RustFS readiness check ${attempt}/30 failed; retrying"
481485
sleep 2
482486
done
487+
488+
if [ "$rustfs_ready" != true ]; then
489+
echo "::error::RustFS did not become ready after 30 attempts"
490+
exit 1
491+
fi
492+
483493
aws --endpoint-url "${AWS_ENDPOINT_URL_S3}" \
484494
s3api create-bucket \
485-
--bucket "${OMNIGRAPH_S3_TEST_BUCKET}" >/dev/null 2>&1 || true
495+
--bucket "${OMNIGRAPH_S3_TEST_BUCKET}"
486496
487497
# Compile and execute the selected default targets in one Cargo resolve.
488498
# A superset prebuild followed by narrower commands would still rebuild
@@ -502,7 +512,7 @@ jobs:
502512
--test s3 \
503513
--test s3_cluster \
504514
--test system_local \
505-
-- --nocapture 2>&1 | tee "$test_log"
515+
-- --nocapture --test-threads=1 2>&1 | tee "$test_log"
506516
507517
if grep -Eiq \
508518
"SKIP public_physical_ref_token_rejects_s3_same_version_aba|skipping s3 " \
@@ -553,6 +563,30 @@ jobs:
553563
echo "$output" | grep -Eq "test result: ok\. [1-9][0-9]* passed" \
554564
|| { echo "::error::filter 's3_' matched no tests — vacuous pass"; exit 1; }
555565
556-
- name: Dump RustFS logs on failure
566+
- name: Dump RustFS diagnostics on failure
557567
if: failure()
558-
run: docker logs rustfs
568+
run: |
569+
set +e
570+
echo "::group::docker inspect rustfs"
571+
# Limit inspection to runtime state: full inspect output includes the
572+
# container environment and would disclose the test credentials.
573+
docker inspect --format 'State={{json .State}} Image={{.Image}}' rustfs
574+
echo "::endgroup::"
575+
576+
echo "::group::docker logs rustfs"
577+
docker logs rustfs
578+
echo "::endgroup::"
579+
580+
diagnostics_dir=$(mktemp -d "${RUNNER_TEMP}/rustfs-logs.XXXXXX")
581+
echo "::group::RustFS /logs"
582+
if docker cp rustfs:/logs "$diagnostics_dir"; then
583+
find "$diagnostics_dir" -type f -exec sh -c '
584+
for log_file do
585+
echo "===== ${log_file} ====="
586+
tail -n 2000 "$log_file"
587+
done
588+
' sh {} +
589+
else
590+
echo "Unable to copy /logs from the RustFS container"
591+
fi
592+
echo "::endgroup::"

‎docs/dev/ci.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818
fails if that exact test skips or if a broad filter matches another cell.
1919
- **AWS feature build job**: `cargo build/test -p omnigraph-server --features aws` on ubuntu-latest.
2020
- **Windows binary build job**: `cargo build --release --locked -p omnigraph-cli -p omnigraph-server` on windows-latest with smoke checks for `omnigraph.exe version`, `omnigraph-server.exe --help`, and PowerShell installer syntax.
21-
- **RustFS S3 integration**: starts RustFS and runs the configured bucket-gated engine/server/cluster/CLI correctness suites, including ordinary recovery failpoints. Cost/benchmark instruments remain on demand and are not promoted into correctness CI.
21+
- **RustFS S3 integration**: starts RustFS, requires a successful readiness
22+
probe and bucket creation, and runs the configured bucket-gated
23+
engine/server/cluster/CLI correctness suites, including ordinary recovery
24+
failpoints. The default shard serializes only the outer libtest scenarios
25+
(`--test-threads=1`); their internal Tokio work remains concurrent. Failures
26+
capture `docker inspect`, container stdout/stderr, and RustFS's service logs
27+
from `/logs`. Cost/benchmark instruments remain on demand and are not
28+
promoted into correctness CI.
2229
- **release-edge.yml**: on every push to main, retags `edge`, builds Linux x86_64 / Linux arm64 / macOS arm64 archives and Windows x86_64 zip + sha256, publishes a rolling prerelease, then smoke-tests the Windows PowerShell installer against `edge`. The macOS arm64 matrix entry uses Rust's large code model because the release binary's text exceeds the architecture's +/-128 MiB direct-branch range; other platforms keep the workspace release profile unchanged.
2330
- **release.yml**: on `v*` tags, builds the Linux x86_64 / Linux arm64 / macOS arm64 archives and Windows x86_64 zip release matrix, updates the Homebrew tap (`scripts/update-homebrew-formula.sh`) by pushing the regenerated formula to `ModernRelay/homebrew-tap`, and smoke-tests the Windows PowerShell installer against the tag. It carries the same macOS-only large-code-model setting as the edge workflow so tagged and rolling artifacts cannot diverge at this linker boundary.
2431
- **package.yml**: manual ECR image build; emits two image tags per commit (`<sha>`, `<sha>-aws`) via CodeBuild.

‎docs/dev/testing.md‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,14 @@ CI runs these S3-backed **correctness** tests against a containerized RustFS
110110
server (`.github/workflows/ci.yml` → `rustfs_integration` job) in two
111111
feature-graph shards. The default shard selects its five test binaries in one
112112
Cargo invocation so dependency features and large test links compile once,
113-
then checks the captured log for every required S3 cell and explicit skip. The
114-
failpoints shard runs the `s3_`-prefixed feature-gated cells in one
115-
invocation. These remain the focused local equivalents:
113+
then runs the outer libtest harness with `--test-threads=1` and checks the
114+
captured log for every required S3 cell and explicit skip. This serializes only
115+
the top-level scenarios sharing one RustFS container; each scenario keeps its
116+
ordinary internal Tokio concurrency. RustFS readiness and bucket creation are
117+
hard gates. A failed shard records container state, stdout/stderr, and the
118+
service files under `/logs`. The failpoints shard runs the `s3_`-prefixed
119+
feature-gated cells in one invocation. These remain the focused local
120+
equivalents:
116121

117122
- `cargo test -p omnigraph-engine --test s3_storage` (lifecycle/branching, allowed external-S3 copy with 2 inputs/1 HEAD/1 GET and post-source-deletion ownership, plus the e_tag-present CSR topology cache-key reuse test — the path local FS can't reach since its e_tag is `None`)
118123
- `cargo test -p omnigraph-engine --test lance_surface_guards public_physical_ref_token_rejects_s3_same_version_aba -- --exact` (RFC-024's public current-HEAD witness across unchanged reopen plus main/named same-version ABA; the workflow additionally rejects a zero-test/vacuous match)

0 commit comments

Comments
 (0)