Repository navigation
testproxy: forward upstream failures instead of retrying them - #8172
Conversation
Co-authored-by: Isaac <no-reply@databricks.com>
✅ Integration test reportCommit: df324a7
Top 3 slowest tests (at least 2 minutes):
|
There was a problem hiding this comment.
Automated review at c569ea3. Each finding was verified against the code.
No blocking issues found. 5 non-blocking comment(s) below.
This PR stops the test proxy from retrying, so 429/503/504, connection failures and cut-short bodies reach the CLI, and the recorder treats status 0 as transient. The retriable-status path looks right. The connection-failure paths sort errors in ways that don't match what happens on HTTP/2 cloud runs. A stream reset before headers turns into a TCP reset, which the CLI's SDK retries blindly, and body failures mid-read on HTTP/2 aren't detected at all. A few smaller points cover the fake 200 status, the dropped upstream error, and the hijack fallbacks.
…t bodies Errors other than connection failures, such as an HTTP/2 stream error before headers, now reach the client as a 500 with their text, as they do without the proxy. Before, the client got a connection reset and the SDK retried a create that recovery would have looked up. A body that upstream cuts short is truncated for the client with the upstream status, and both branches log the upstream error. Co-authored-by: Isaac <no-reply@databricks.com>
|
Re the review comment on the proxy's |
Changes
The acceptance test proxy (
libs/testproxy) no longer retries. It forwards what upstream answered, failures included:The request recorder treats a response it never got (status 0) as transient, so the CLI's retry is dropped from
out.requests.txtas it already is for 5xx.Why
The proxy forwards through an SDK
ApiClient, which retries 429, 503, some 504s and connection errors itself. Those failures never reached the CLI under test, so aProxy = truetest or a cloud recording run could not show whether the CLI handles them. This came up in #8133, where an injected fault hidden by the proxy would count as a pass.The SDK retries some connection errors by message no matter what
ErrorRetriablereturns, so the proxy's transport replaces their message. Go'snet/httpstill repeats an idempotent request that fails on a reused connection, as it does without the proxy.Tests
New unit tests in
libs/testproxy: retriable statuses, a connection reset and a truncated body each reach the client after exactly one upstream call.acceptance/selftestpasses locally. Not run on cloud.🤖 AI agent (opus5.5, isaac_claude)
This pull request and its description were written by Isaac.