Skip to content

skip invalid listener first#8577

Draft
zirain wants to merge 1 commit intoenvoyproxy:mainfrom
zirain:skip-invalid-listener
Draft

skip invalid listener first#8577
zirain wants to merge 1 commit intoenvoyproxy:mainfrom
zirain:skip-invalid-listener

Conversation

@zirain
Copy link
Member

@zirain zirain commented Mar 23, 2026

this's a follow up for #8361

Invalid earlier listeners can still win conflict resolution and block later valid listeners from being programmed. In listener.go (line 42) the new conflict passes run before the per-listener validation steps at listener.go (line 98) and listener.go (line 107). Then validate.go (line 710) and validate.go (line 781) use a first-wins policy without checking whether that earlier listener later becomes invalid. Reproduced locally with an invalid first HTTP listener (allowedRoutes.namespaces.from=Selector without a selector) followed by a valid TCP listener on the same port: the first listener ended up Programmed=False for Invalid, the second was forced to Accepted=False/Programmed=False for ProtocolConflict, and the IR had zero listeners on that port. So a malformed earlier listener can black-hole a later valid listener. The same ordering bug exists in the hostname-conflict path as well.

Signed-off-by: zirain <zirain2009@gmail.com>
@netlify
Copy link

netlify bot commented Mar 23, 2026

Deploy Preview for cerulean-figolla-1f9435 canceled.

Name Link
🔨 Latest commit 45bd0eb
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/69c12be02221ed0008c843b2

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 91.17647% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.30%. Comparing base (ef8f744) to head (45bd0eb).

Files with missing lines Patch % Lines
internal/gatewayapi/validate.go 84.21% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8577      +/-   ##
==========================================
- Coverage   74.33%   74.30%   -0.04%     
==========================================
  Files         242      242              
  Lines       37793    37812      +19     
==========================================
+ Hits        28094    28096       +2     
- Misses       7751     7762      +11     
- Partials     1948     1954       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant