Skip to content

fix: propagate the HTTPFilter translation errors to the outer layer#7556

Merged
zhaohuabing merged 6 commits intoenvoyproxy:mainfrom
zhaohuabing:filter-status-error
Nov 26, 2025
Merged

fix: propagate the HTTPFilter translation errors to the outer layer#7556
zhaohuabing merged 6 commits intoenvoyproxy:mainfrom
zhaohuabing:filter-status-error

Conversation

@zhaohuabing
Copy link
Copy Markdown
Member

@zhaohuabing zhaohuabing commented Nov 19, 2025

This PR propagates the HTTPFilter translation errors to the out layer, so they can be handled with other route translation errors together in the processHTTPRouteParentRefs method.

This PR doesn't fix #7545, but it will allow us to associate an HTTPFilter translation error with a specific HTTPRule. This is a prerequisite for resolving #7545, where we need to set the Accepted status as true for mixed valid and invalid rules and generate the xDS for valid rules.

@zhaohuabing zhaohuabing requested a review from a team as a code owner November 19, 2025 06:13
@zhaohuabing zhaohuabing marked this pull request as draft November 19, 2025 06:14
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.26%. Comparing base (1d1093c) to head (be51f25).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/gatewayapi/filters.go 76.41% 47 Missing and 3 partials ⚠️
internal/gatewayapi/route.go 50.00% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7556      +/-   ##
==========================================
- Coverage   72.33%   72.26%   -0.08%     
==========================================
  Files         232      232              
  Lines       34114    34103      -11     
==========================================
- Hits        24676    24644      -32     
- Misses       7668     7682      +14     
- Partials     1770     1777       +7     

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

@zhaohuabing zhaohuabing marked this pull request as ready for review November 19, 2025 07:34
@zhaohuabing zhaohuabing requested a review from arkodg November 19, 2025 07:39
@zhaohuabing zhaohuabing changed the title Propagate the HTTPFilter translation errors to the outer layer fix: propagate the HTTPFilter translation errors to the outer layer Nov 19, 2025
@zhaohuabing
Copy link
Copy Markdown
Member Author

zhaohuabing commented Nov 19, 2025

I just found another issue while working on this PR: currently, the ir routes are not generated for HTTPRoute Rules with invalid HTTPFilters. If any rules have invalid filters, the user requests will get 404 not found.

We should generate a 500 directResponse for these rules, like what we did with failed backendRefs. Let's handle this in a separate PR.

@arkodg arkodg added this to the v1.7.0-rc.1 Release milestone Nov 20, 2025
@zhaohuabing zhaohuabing requested a review from arkodg November 20, 2025 04:11
status: "False"
message: Route is accepted
reason: Accepted
status: "True"
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.

Accepted should be True for unresolved filters.

@zhaohuabing zhaohuabing requested a review from lboynton November 24, 2025 00:52
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
@zhaohuabing zhaohuabing requested a review from kkk777-7 November 24, 2025 07:54
@kkk777-7
Copy link
Copy Markdown
Member

LGTM, thanks!

type: Accepted
- lastTransitionTime: null
message: 'Unable to translate HTTPRouteFilter: default/direct-response-value-ref-not-found'
message: 'Unable to translate HTTPRouteFilter: default/direct-response-value-ref-not-found.'
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.

not related to this PR, but we should consider updating reason from BackendNotFound to something better for this case in the future

Copy link
Copy Markdown
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks

@zhaohuabing zhaohuabing merged commit 0623ca5 into envoyproxy:main Nov 26, 2025
52 of 55 checks passed
@zhaohuabing zhaohuabing deleted the filter-status-error branch November 26, 2025 02:36
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.

All HTTPRoute rules return 404 when referenced HTTPRouteFilter in one rule does not exist

4 participants