Skip to content

Conversation

@zhaohuabing
Copy link
Member

@zhaohuabing zhaohuabing commented Nov 26, 2025

Currently, EG drops route rules with invalid filters, which results in 404 response when matching requests arrive. This PR changes the behavior to generate routes with a direct 500 response for those rules instead.

The new behavior aligns with the the Gateway API GET https://gateway-api.sigs.k8s.io/geps/gep-1364/

The GEP 1364 only mentions the case of InvalidKind custom filter, but other types of invalid filters should be treated in a similar way.

HTTPRoute with one Custom supported filter added that is not supported by the implementation. Our spec is currently unclear on what happens in this case, but custom HTTP Filters require the use of the ExtensionRef filter type, and the setting of the ExtensionRef field to the name, group, version, and kind of a custom resource that describes the filter. If that custom resource is not supported, it seems reasonable to say that this should be a reference failure, and be treated like other reference failures (Accepted will be set to true, ResolvedRefs to false with a InvalidKind Reason, and traffic that would have matched the filter should receive a 500 error.)

fix: #7604
release note: yes

@zhaohuabing zhaohuabing requested a review from a team as a code owner November 26, 2025 02:58
@zhaohuabing zhaohuabing marked this pull request as draft November 26, 2025 02:59
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 54.83871% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.30%. Comparing base (4784e5a) to head (7a3ae0a).

Files with missing lines Patch % Lines
internal/gatewayapi/route.go 54.83% 14 Missing ⚠️

❌ Your patch check has failed because the patch coverage (54.83%) is below the target coverage (60.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7605      +/-   ##
==========================================
+ Coverage   72.27%   72.30%   +0.02%     
==========================================
  Files         232      232              
  Lines       34109    34138      +29     
==========================================
+ Hits        24653    24683      +30     
- Misses       7680     7682       +2     
+ Partials     1776     1773       -3     

☔ 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 26, 2025 03:46
@zhaohuabing zhaohuabing requested a review from arkodg November 27, 2025 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant