fix: set HTTPRoute Accepted condition as true with mixed invalid and valid rules#7625
Merged
zhaohuabing merged 5 commits intoenvoyproxy:mainfrom Dec 2, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7625 +/- ##
==========================================
+ Coverage 72.33% 72.37% +0.03%
==========================================
Files 232 232
Lines 34143 34209 +66
==========================================
+ Hits 24699 24760 +61
- Misses 7669 7675 +6
+ Partials 1775 1774 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e609358 to
6beebb8
Compare
291ae33 to
c3d5f14
Compare
… rules Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
c3d5f14 to
046ecdf
Compare
arkodg
reviewed
Dec 1, 2025
arkodg
reviewed
Dec 1, 2025
| if len(unacceptedRules) == 0 { | ||
| return fmt.Sprintf("Dropped Rule(s): %s", status.Error2ConditionMsg(err)) | ||
| } | ||
| return fmt.Sprintf("Dropped Rule(s) %v: %s", unacceptedRules, status.Error2ConditionMsg(err)) |
Contributor
There was a problem hiding this comment.
thoughts on skipped vs dropped
Member
Author
There was a problem hiding this comment.
This is required in the Gateway API spec:
- Drop Rule(s): With this approach, implementations will drop the
invalid Route Rule(s) until they are fully valid again. The message
for this condition MUST start with the prefix "Dropped Rule" and
include information about which Rules have been dropped. In this
state, the "Accepted" condition MUST be set to "True" with the latest
generation of the resource.
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
kkk777-7
approved these changes
Dec 2, 2025
Member
|
LGTM, thanks! |
Member
|
/retest |
zirain
approved these changes
Dec 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is the follow-up of #7556.
Currently, the Gateway API translator sets HTTPRoute Accepted condition as false when any of the its rules is invalid. This PR changes the behavior to set Accepted as false only if all rules are invalid, if both valid and invalid rules exist, the Accepted is set to true, and a
PartiallyInvalidcondition is added to the status.The updated behavior aligns with the Gateway API spec.
https://gateway-api.sigs.k8s.io/geps/gep-1364/
RouteConditionPartiallyInvalid:
Fix: #7545