Skip to content

fix attachedRoutes#8187

Merged
zirain merged 3 commits intoenvoyproxy:mainfrom
zirain:attachedRoutes
Feb 28, 2026
Merged

fix attachedRoutes#8187
zirain merged 3 commits intoenvoyproxy:mainfrom
zirain:attachedRoutes

Conversation

@zirain
Copy link
Copy Markdown
Member

@zirain zirain commented Feb 5, 2026

xref: #8244
Find this during test TLSRoute conformance test TLSRouteInvalidNoMatchingListenerHostname.

The issue is that, if a route is invalid(e.g. hostname no matching), attachedRoutes shouldn't be increased.

@zirain zirain requested a review from a team as a code owner February 5, 2026 07:23
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 5, 2026

Deploy Preview for cerulean-figolla-1f9435 canceled.

Name Link
🔨 Latest commit 6196aa9
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/699fb75b0c12bb0008eb3aa1

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.84%. Comparing base (ce1efb6) to head (6196aa9).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8187      +/-   ##
==========================================
- Coverage   73.85%   73.84%   -0.02%     
==========================================
  Files         242      242              
  Lines       37044    37050       +6     
==========================================
  Hits        27358    27358              
- Misses       7753     7759       +6     
  Partials     1933     1933              

☔ 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.

@arkodg arkodg added this to the v1.8.0-rc.1 Release milestone Feb 8, 2026
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>

var hasHostnameIntersection bool
// need to check hostname intersection if there are listeners
hasHostnameIntersection := len(parentRef.listeners) == 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this help, computeHosts resets this anyways

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there're any listeners, the logic is same as before.
this's used to avoid hasHostnameIntersection to false when there's no valid listener.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its already defaulting to false since its a bool

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but when there's no valid listener, we want true to avoid incorrect hostname intersection check.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack thanks

@zirain zirain merged commit 7835ebd into envoyproxy:main Feb 28, 2026
98 of 105 checks passed
@zirain zirain deleted the attachedRoutes branch February 28, 2026 04:31
antonio-mazzini pushed a commit to antonio-mazzini/gateway that referenced this pull request Mar 5, 2026
* commit testdata

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

* update

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

* fix gen

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

---------

Signed-off-by: zirain <zirain2009@gmail.com>
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.

4 participants