Repository navigation
feat(mint): capture closed-vocabulary server 5xx diagnostics - #1666
Merged
Merged
Conversation
Add runner-local server 5xx diagnostic capture for MinIO mint runs so intermittent server errors (such as aws-sdk-java-v2 putObject 500s in #1083) can be attributed without carrying raw log text, request identifiers, host paths, or secrets off the runner. - crates/fs: add process-wide set_storage_error_observer hook reporting only static #[track_caller] source locations, and make require_directory missing-error construction lazy so healthy operations never trigger storage_error(). - compat/sut: wire ServerErrorObserver into build_service (logging unexpected 5xx excluding 501 NotImplemented with closed-vocabulary method/operation/status/code/deadline plus server-minted request_id) and register record_fs_storage_error in logging::install() with host-prefix stripping. - ci/mint: redact GATEWAY_SUT_LOG in place and pass --sut-log to report.py judge; extract only closed-vocabulary 5xx summaries into report.json (server_errors) and summary.md (### Server 5xx diagnostics when non-empty), exiting 3 if an explicit --sut-log is missing. - tests & guards: add unit, integration, Mint runner/report probes, and guard mutation coverage.
13 of 14 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds runner-local server-side
5xxdiagnostic capture for MinIO mint runs so intermittent server errors (such asaws-sdk-java-v2S3Client.putObject versions:S3Exception/500/-tracked in #1083) can be attributed directly from uploaded aggregate reports without carrying raw log text, request identifiers, host paths, or secrets off the runner.Context & Audit of #1083
e2e-mint.ymlartifacts:42753626778(2026-11-10,371d91b2— the same SHA as passing run41576096189):aws-sdk-java-v25 PASS / 1 FAIL(S3Client.putObject versions:S3Exception/500/-).44014781136(2026-11-17,c93c7940):aws-sdk-java-v25 PASS / 1 FAIL(S3Client.putObject versions:S3Exception/500/-).45324020308(2026-11-24,c0291e66) passed (7 PASS / 0 FAIL); noe2e-mint.ymlrun has executed yet on the recent fixes.crates/fsandcrates/serverhave since been hardened onmainvia chore(fuzz,fs,rdma,ci): close fuzz, fs cancellation, and toolchain gaps #1659 (225fefc1: atomic stagedCreateBucket,flush().awaitbefore rename,.tmp-*filtering, RAII staging guards), feat(fs): coordinate shared-root version mutations and null recovery #1660 (7ee712e3: shared-rootRootVersionLock), fix(server,gateway): harden server TLS, shutdown, H2, panics, and CORS #1645 (1f576425), fix(gateway,http,server,xml): harden auth, streaming, drain, TLS & XML #1638 (29f1a59b), and fix(server,scripts): linger after H2 GOAWAY and flush guard logs #1664 (9702596d).crates/fshad 239 silentstorage_error()call sites,compat/sutinstalled noObserver, andci/mint/run.shdid not passcompat-sut.logtoci/mint/report.py).Changes
crates/fs: Add process-wideset_storage_error_observer(fn(&'static core::panic::Location<'static>)) -> booland#[track_caller] storage_error()/storage_error_with(...), and changerequire_directoryto accept a lazyimpl FnOnce() -> HandlerErrorso healthy CRUD operations never invokestorage_error(). Add unit tests (src/storage_error_tests.rs) and a self-exec isolated child-process integration test (tests/crud/storage_error_observer.rs, keepingcrates/fsat 1 linked test target).compat/sut: WireServerErrorObserverintobuild_service(recording unexpectedstatus >= 500 && status != 501with closed-vocabularymethod[nine standard methods +OTHER],operation,status,code,deadline, and server-mintedrequest_id; never logging identities, headers, keys, or paths) and registerrecord_fs_storage_errorinlogging::install()with host-prefix stripping (normalize_fs_location).rustfs_profile_testsposture golden remains byte-identical.ci/mint: RedactGATEWAY_SUT_LOGin place and pass--sut-log "$GATEWAY_SUT_LOG"toci/mint/report.py judgewhen present;extract_server_errorsextracts only the three strict closed-vocabularyERRORgrammars (compat_sut_server_error,compat_sut_fs_storage_error,gateway_extension_panicked500), dropsrequest_id, deduplicates preserving order with(xN)capped at 50, writesserver_errorstoreport.jsonand### Server 5xx diagnosticstosummary.mdonly when non-empty, and exits3if an explicit--sut-logis missing or unreadable.ci/mint/baseline.txtis unchanged.scripts/check_mint_report.sh(117 -> 122), unit & runner tests inscripts/test_mint_report_execution.pyandscripts/test_mint_local_image.py, and 3 guard mutations inscripts/test_guard_scripts.sh.Refs #1083
Why #1083 stays open: No
e2e-mint.ymlrun has executed yet on post-#1659 / post-merge commits. Keeping #1083 open preserves honest measurement; ifaws-sdk-java-v2S3Client.putObject500recurs on a subsequent run, the newserver_errorsentries inreport.json/summary.mdwill pinpoint the exactmethod/operation/status/codeandcrates/fs/src/<file>:<line>or contained panic.Mutation Proofs
Every new assertion was mutated, confirmed red, and restored byte-identically:
M1_drop_track_caller: removed#[track_caller]oncrates/fs/src/lib.rs::storage_error_with->storage_error_tests::a_storage_error_with_reports_its_call_sitefailed (rc=101).M2_eager_storage_error: eagerly constructedstorage_error()inrequire_bucket-> isolated self-execstorage_error_observer::set_storage_error_observer_installs_once_and_fires_only_on_failurefailed (healthy operations must not notify storage_error observer,rc=101).M3_log_501_not_implemented: droppedstatus == 501exclusion incompat/sut/src/logging.rs::emit_server_error->n_healthy_4xx_and_501_answers_emit_no_server_error_eventfailed (rc=101).M4_detach_observer_from_build_service: removed.observer(crate::logging::ServerErrorObserver)incompat/sut/src/service.rs->a_backend_500_through_build_service_is_observed_without_secretsfailed (rc=101).M5_leak_host_prefix: returned unstripped path incompat/sut/src/logging.rs::normalize_fs_location->n_normalize_fs_location_strips_host_prefix_and_rejects_foreign_pathsfailed (rc=101).M6_drop_sut_log_flag_in_run_sh: removed--sut-logforwarding inci/mint/run.sh->test_mint_local_image.py::test_sut_log_is_redacted_and_summarized_when_presentfailed (rc=1).M7a_drop_server_errors_in_report_py: hardcodedserver_errors = []inci/mint/report.py->scripts/check_mint_report.shfailed (rc=1).M7b_leak_sut_log_text_in_report_py: passed unmatched SUT log lines throughextract_server_errors->scripts/check_mint_report.shfailed (must not appear in the output,rc=1).M7c_ignore_missing_sut_log_in_report_py: returned[]on missing--sut-loginstead of raisingEXIT_ENVIRONMENT->scripts/check_mint_report.shfailed (rc=1).Verification
cargo fmt --all --check: passcargo clippy --workspace --all-targets -- -D warnings: pass (28.98s)cargo test --workspace: pass across all crates (0failures;rustfs-gateway-fs137 lib + 519 crud,rustfs-gateway-compat-sut472 bin + 7 binary includingrustfs_profile_tests,rustfs-gateway-conformance1168 lib + 140 integration + 1list_allocations)cargo xtask verify --crate rustfs-gateway-compat-sut: pass (prebuild 31.55s,loop 13.59s <= 30s)cargo xtask verify --crate rustfs-gateway-fs: prebuild30.29s(12crates); loop hit the 30s deadline on macOS APFS fsync across pre-existing 517tests/crud.rscases while directcargo test -p rustfs-gateway-fspassed all 656 tests (lib 4.12s,tests/crud.rs ~32son macOS APFS; reported honestly rather than counted as a pass)RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps: pass (41.56s)python3 -m unittest scripts/test_mint_report_execution.py scripts/test_mint_local_image.py: 43/43 pass (28.09s)145/145, includingcheck_test_target_coverage.sh,check_protected_files.sh,check_mint_report.sh122 probes,check_mint_baseline.sh,check_sut_launcher.sh,check_secret_hygiene.sh),bash -n scripts/test_guard_scripts.sh,shellcheck -x -P scripts ci/mint/run.sh scripts/check_mint_report.sh: all pass.No CI jobs were added; PR gate wall-clock budget impact is neutral.
Role Verdicts