data plane: retry failed TCP and UDP listener binds #1720
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 205 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.319
Real PR Conversation Timeline
1 comments
"Review active on #1720"
general
weight: 0.35
justinsb
Retry failed TCP and UDP listener binds in the data plane with exponential backoff until the port binds, the config no longer needs it, or the proxy closes.
Changes
pkg/proxy:- Retry failed TCP and UDP listener binds with a shared
retryPortBindhelper using a stoppabletime.Timerand exponential backoff from 50ms up to 30s, logging each failed attempt as an error.- Read the latest backends and limits (
tcpMaxConnections,udpIdleTimeout,udpMaxSessions) underProxy.muwhen a retried bind succeeds rather than capturing values from the initial failure.- Cancel active retry loops when the config removes the port or when
Proxy.Closeruns.- Notify
SetOnListenerBoundafter releasingProxy.muwhen a retried listener binds.pkg/gari:- Track pending revisions waiting for unbound TCP or UDP listeners so
/_gari/appliedkeeps listing the previous revision until all required ports bind, then promotes the pending revision without a config change.- Validate listener filter options before mutating proxy or revision state so a later config that fails to apply does not discard an earlier pending revision.
- TCP and UDP bind retry recovery, config/limit updates while retry is pending, and stopping retries on
Closeand port removal (pkg/proxy/tcp_test.go,pkg/proxy/udp_test.go).- Data-plane end-to-end tests verifying
/_gari/appliedlists the new revision once a blocked TCP or UDP port is freed, and verifying a later config failing to apply (missing client cert or invalid CIDR) preserves an earlier pending revision (pkg/gari/gari_test.go).Fixes #1279