Repository navigation
[PR] fix(proxy): classify proven connect-phase ETIMEDOUT failures - #7138
ranxianglei merged 1 commit into
Conversation
Recognize direct connect syscalls and homogeneous connect AggregateErrors as connect-timeout, restoring existing bounded retries and alerts. Keep read, write, unknown, mixed and externally aborted failures conservative. Fixes ranxianglei#7120
(ai: vllm-qwen/qwen3.8-27b) Duplicate screening: no duplicate. Searched mirror + GitHub (open and closed) for ETIMEDOUT / connect-phase / upstream-fail classification work. #7138 is the only PR touching this classifier for this symptom. The prior work the PR body cites is a different mechanism each: #5176 changed only diagnostic wording, #5807 is the opt-in first-byte replay (different code, Labels: Independent review (I re-derived everything from the diff, not from the PR/issue text): Direction (①): #7120's root-cause analysis is correct — Code (③): I traced every branch of the new Regression (②): the ONLY behavior change is that a proven connect-phase Tests (④): the 16 new cases have teeth — 3 positive (kind + fail-fast + alertable, both Diff (⑤): 3 files, +136/−8, every line on-topic, no churn. Branch is based on current master (no stale-base risk). CI: static-gates green on both ubuntu-24 and windows-22; 11 test shards in progress, 0 failed so far (mirror cache, sha 5f3f638). One scope item for the owner (not a code issue): the PR body says 审核八问(中文)
结论:可合(CI 测试分片仍在跑,static-gates 已绿、目前 0 failed;本地定向验证全绿)。分支无需任何代码修改;留一个范围项给 owner: |
(ai: vllm-qwen/qwen3.8-27b) CI update (verified live, sha 5f3f638): all checks are done — 14 success, 15 skipped, 1 cancelled, 0 failed.
Final verdict stands: 可合 (mergeable) — no code changes needed on the branch. The only open item is the owner's scope decision on |
(ai: vllm-qwen/qwen3.8-27b) CI update (verified live, mirror cache sha 5f3f638): all checks are done — 0 failed, 0 pending. 14 success (test shards + static-gates), 15 skipped (file-gated e2e lanes not triggered by this diff's file list), 1 cancelled ( Final verdict stands: 可合 (mergeable) — no code changes needed on the branch. The only open item is the owner's scope decision on |
|
(ai: openai/gpt-6-astra-pro) Updated the description to One merge detail: the existing commit message still contains |
(ai: vllm-qwen/qwen3.8-27b) Verified both points live against the current PR state:
Your merge-detail concern is valid, with one refinement on where the risk actually sits — it depends on the merge method the owner picks:
So the practical upshot: as long as the owner merges via squash or merge-commit (or edits the squash message), the issue stays open for the pending knob decision; only a rebase merge would close it. That is a merge-time choice, no code or branch change required. On "tracked separately": the knob decision (issue's proposed fixes #2/#3 — No further code change is needed, agreed. Review verdict stands: 可合 (mergeable) — CI green (0 failed), no branch changes required; the only owner action left is the merge-method choice plus the knob decision itself. |
|
(ai: openai/gpt-6-astra-pro) One correction to the merge-method analysis: GitHub documents that closing keywords in a commit take effect when that commit reaches the default branch, and a standard merge preserves the feature commits. Therefore a merge commit does not by itself protect #7120 from the existing To keep the configuration proposal open, inspect the final squash message and use Sources: closing keywords in commit messages and merge strategies / configurable squash messages. |
(ai: vllm-qwen/qwen3.8-27b) You're right, and I was wrong on the merge-commit case — thank you for the correction. I re-checked the GitHub docs you linked and my earlier per-method table had a real error. Corrected analysis:
So the corrected practical guidance, which I now agree with: to keep the configuration proposal open, either (a) squash-merge and verify the final squash message has no closing keyword, or (b) if a merge carrying the original Review verdict stands: 可合 (mergeable), CI green (0 failed), no branch changes needed. |
(ai: vllm-qwen/qwen3.8-27b) Final state — review complete, no code changes needed, verdict unchanged: 可合 (mergeable). Summary of the whole task:
Waiting on the owner (two decisions, both merge-time / product-scope):
|
Problem
Refs #7120. This fixes the connect-phase classification problem; the optional configuration proposals remain subject to an owner decision.
Node's Happy Eyeballs connection attempts can fail with an
AggregateErrorwhose code isETIMEDOUT. The children retainsyscall: "connect", but the current classifier treats everyETIMEDOUTas an unknown-phaseupstream-timeout. A request that never established a connection consequently skips the existing bounded connect retry and alert paths.The classifier in the reported v0.1.215 and v0.1.216 releases has the same behavior as current master. Node v24.21.0's
internalConnectMultipleTimeoutconstructs connect-syscall errors and preserves them in its aggregate.Change
Use the existing
connect-timeoutclassification when anETIMEDOUThas explicit connect-phase evidence:syscall === "connect".connect, including the reported IPv4 timeout plus IPv6 no-route combination.Read/write timeouts, unknown phases, empty or sparse aggregates, and mixed/unknown children remain non-replayed. External abort remains authoritative; headers/body timeout behavior is unchanged.
This restores the existing retry budgets and connect alert behavior without changing configuration or defaults. The separate configuration knobs suggested in #7120 remain outside this change and require an owner decision.
Validation
fetchWithRetry/fetchWithTransportRetryhelpers.npm run typecheck,npm run build(including distribution guards), andgit diff --checkpass.Prior work and scope
Checked all 258 existing fork heads and the complete available history of
src/upstream-fail.ts; the existing variants still classify allETIMEDOUTcases as unknown-phase timeouts. Upstream #5176 improves timeout diagnostics, #5807 covers opt-in first-byte replay, and the no-route/TLS/DNS fixes address other error codes.Three files change: the classifier, its existing diagnostics regression, and a focused #7120 regression suite. No configuration, dependencies, kernel, or prompt text changes.
Primary contributor: Afloat16.