Skip to content

fix(conformance): write the report from a cleanup, not the test body (#859) - #862

Merged
bpalermo merged 2 commits into
mainfrom
fix/859-conformance-report
Sep 20, 2026
Merged

bpalermo merged 2 commits into
mainfrom
fix/859-conformance-report

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Fixes #859.

What broke

mesh-http and gateway-http have failed every nightly run since 2026-09-13. The conformance tests pass — gateway-http has 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):

Error: Received unexpected error:
       can't generate report: the test suite is currently running

Why

a2d72e1 (#751) bumped GATEWAY_API_VERSION: v1.6.1 → v1.6.2. Upstream v1.6.2 deleted this from the tail of ConformanceTestSuite.Run():

	// now that the tests have completed, mark the test suite as not running
	suite.lock.Lock()
	suite.running = false
	suite.results = results
	suite.lock.Unlock()

and replaced it with a cleanup registered inside Run:

	t.Cleanup(func() {
		suite.lock.Lock()
		suite.running = false
		suite.lock.Unlock()
	})

Report() is unchanged and still refuses while running is set. Our runner called Report() from the test body immediately after Run() returned, so on ≥ v1.6.2 it fails 100% of the time.

The fix

Register the report write as a t.Cleanup before cSuite.Run. Cleanups run LIFO, so ours fires after the suite's own (registered later, inside Run): running is already clear.

This also closes a second, latent bug the old call site had: Run returns 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.

writeReport now records failures with t.Errorf instead of require, because a FailNow inside 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 ran go vet -tags conformance . — clean. The end-to-end proof is the nightly job (or workflow_dispatch).

Independent of #861 / #860, which fixes the uds job's unrelated breakage. Both are needed for a green nightly.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

bpalermo and others added 2 commits September 20, 2026 11:38
…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
@bpalermo
bpalermo merged commit a57bddc into main Sep 20, 2026
22 checks passed
@bpalermo
bpalermo deleted the fix/859-conformance-report branch September 20, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nightly e2e: mesh-http/gateway-http fail on report generation since the Gateway API v1.6.2 bump (suite.Report() now refuses inside the test body)

1 participant