Repository navigation
fix(conformance): write the report from a cleanup, not the test body (#859) - #862
Merged
Merged
Conversation
…859) gateway-api v1.6.2 deleted the `running = false` block at the tail of ConformanceTestSuite.Run() and replaced it with a t.Cleanup registered inside Run. Report() is unchanged and still refuses while that flag is set. So calling Report() from the test body right after Run() returns -- which is what this runner did -- now fails deterministically with "can't generate report: the test suite is currently running", whatever the per-test outcomes were, and no report artifact is produced. That is the whole of the nightly mesh-http/gateway-http failure since 2026-09-13, when #751 bumped GATEWAY_API_VERSION v1.6.1 -> v1.6.2: gateway-http has zero failing subtests and still reports --- FAIL. Register the report write as a cleanup BEFORE Run. Cleanups are LIFO, so ours lands after the suite's own: `running` is clear, and -- a second, latent bug -- every parallel subtest has actually finished, which the old call site never waited for. Record failures with Errorf rather than require, since a FailNow inside a cleanup would skip the suite's base-resource teardown. Verified by copying the runner into a [email protected] checkout, as CI does, and running `go vet -tags conformance`. Fixes #859 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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.
Fixes #859.
What broke
mesh-httpandgateway-httphave failed every nightly run since 2026-09-13. The conformance tests pass —gateway-httphas zero failing subtests — and the job still reports--- FAIL, with no report artifact (No files were found with the provided path: .../gateway-http-report.yaml):Why
a2d72e1(#751) bumpedGATEWAY_API_VERSION: v1.6.1 → v1.6.2. Upstream v1.6.2 deleted this from the tail ofConformanceTestSuite.Run():and replaced it with a cleanup registered inside
Run:Report()is unchanged and still refuses whilerunningis set. Our runner calledReport()from the test body immediately afterRun()returned, so on ≥ v1.6.2 it fails 100% of the time.The fix
Register the report write as a
t.CleanupbeforecSuite.Run. Cleanups run LIFO, so ours fires after the suite's own (registered later, insideRun):runningis already clear.This also closes a second, latent bug the old call site had:
Runreturns before its parallel subtests finish (the run log shows=== CONT …lines after the report error), so even without the flag the report was being rendered mid-flight. A cleanup on the parent test is guaranteed to run after every parallel subtest completes.writeReportnow records failures witht.Errorfinstead ofrequire, because aFailNowinside a cleanup would skip the suite's remaining cleanups (its base-resource teardown).Validation
Copied the runner into a
[email protected]checkout exactly as the workflow does and rango vet -tags conformance .— clean. The end-to-end proof is the nightly job (orworkflow_dispatch).Independent of #861 / #860, which fixes the
udsjob's unrelated breakage. Both are needed for a green nightly.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr