Repository navigation
Conversation
…am connection GrpcJsonTranscoderIntegrationTest occasionally times out in waitForHttpConnection() in CI (tsan and release) and has never been reproduced on RBE, including CPU-starved and whole-binary repeat runs. Record the downstream response and the non-zero cluster/http stats when this happens so the next CI failure shows whether the request was answered locally, sent on a stale pooled connection, or never left Envoy. Signed-off-by: Ryan Northey <[email protected]>
|
@derekargueta, following up on #49303. Your failing run turned out to be call 3 of Instead of guessing, this PR makes the next CI failure diagnose itself:
If you see it fail again before we do, the dump will be in the test log. (bot assisted) |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the integration-test diagnostics change.
No open issues 🎉
What changed in this PR
Adds failure diagnostics to Envoy’s gRPC JSON transcoder integration tests to help investigate intermittent missing upstream connections without changing production behavior.
Changes:
- Records the downstream response status and body, reset reason, or absence of a completed response.
- Dumps non-zero
cluster_0and HTTP counters, pluscluster_0gauges. - Runs diagnostics when the upstream connection wait fails, preserving the existing assertion.
| File | Description |
|---|---|
| test/extensions/filters/http/grpc_json_transcoder/grpc_json_transcoder_integration_test.cc | Adds and invokes diagnostics for upstream connection wait failures. |
Review effort: Balanced
| testing::AssertionResult connected = | ||
| fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_); | ||
| if (!connected) { | ||
| dumpMissingUpstreamConnection(*response); | ||
| } | ||
| ASSERT_TRUE(connected); |
There was a problem hiding this comment.
I think rather than dumpMissingUpstreamConnection doing ADD_FAILURE() at the end and then this weirdness, you could just do...
| testing::AssertionResult connected = | |
| fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_); | |
| if (!connected) { | |
| dumpMissingUpstreamConnection(*response); | |
| } | |
| ASSERT_TRUE(connected); | |
| ASSERT_TRUE( | |
| fake_upstreams_[0]->waitForHttpConnection(*dispatcher_, fake_upstream_connection_)) << dumpMissingUpstreamConnection(*response); |
here, and have dumpMissingUpstreamConnection return the string.
There was a problem hiding this comment.
Thanks, done in 7da9cce: dumpMissingUpstreamConnection now returns the string, and the ASSERT_TRUE streams it (gtest only evaluates the stream when the assertion fails).
(bot assisted)
`dumpMissingUpstreamConnection` returns the dump, which is streamed into the `ASSERT_TRUE` (and so only built when it fails), rather than adding its own failure before the assertion. Signed-off-by: Ryan Northey <[email protected]>
|
/retest (I flaked during your deflake so you can deflake while you deflake: https://github.com/envoyproxy/envoy/actions/runs/43914182683/job/133463916675) |
|
closing - the flake was wai - we now have the evidence |
Commit Message: test: dump diagnostics when transcoder integration test misses upstream connection
Additional Description:
GrpcJsonTranscoderIntegrationTestoccasionally times out inwaitForHttpConnection()attestTranscoding()in CI, under both tsan and release builds, and it has never been reproduced. Recent examples:ServerStreamingGet/IPv4(release, job),QueryParams/IPv6andRejectUnknownQueryParam/IPv4(tsan).In each case the full timeout ran out without Envoy opening an upstream connection, and nothing arrived late, so this is not a slow-CI flake. Attempts to reproduce it on RBE all passed:
CI logs have no trace, so the mechanism can't be identified from them. On this failure the test now records the downstream response and the non-zero
cluster_0/httpstats. That separates three cases: a request sent on a stale pooled connection (as #49303 proposed), an upstream connect failure, and a request that never left Envoy.Risk Level: Low (test only)
Testing: CI
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A