Skip to content

fix: add unsupported status condition for filters within BackendRef#2620

Merged
arkodg merged 8 commits intoenvoyproxy:mainfrom
cnvergence:httproute-unsupported-filters
Feb 27, 2024
Merged

fix: add unsupported status condition for filters within BackendRef#2620
arkodg merged 8 commits intoenvoyproxy:mainfrom
cnvergence:httproute-unsupported-filters

Conversation

@cnvergence
Copy link
Copy Markdown
Member

@cnvergence cnvergence commented Feb 15, 2024

What type of PR is this?

  • highlight unsupported BackendRef filters using a status condition
  • introduce BackendRefContext in translator

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.08%. Comparing base (72fadb7) to head (d59e52e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2620      +/-   ##
==========================================
+ Coverage   63.00%   63.08%   +0.07%     
==========================================
  Files         122      122              
  Lines       19770    19811      +41     
==========================================
+ Hits        12457    12498      +41     
  Misses       6506     6506              
  Partials      807      807              

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

@cnvergence
Copy link
Copy Markdown
Member Author

/retest

@cnvergence cnvergence marked this pull request as ready for review February 15, 2024 14:18
@cnvergence cnvergence requested a review from a team as a code owner February 15, 2024 14:18
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.

should we continue, we have been failing fast and early in other places

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.

we could, let's fail fast then on this

Copy link
Copy Markdown
Contributor

@arkodg arkodg Feb 16, 2024

Choose a reason for hiding this comment

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

rethinking again, this code should live inside validateBackendRef which gets called here

if !t.validateBackendRef(&backendRef, parentRef, route, resources, backendNamespace, routeType) {

which automatically converts the weight into a invalidWeight ensuring that a percentage of traffic gets 503'd

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.

looks good, but the field Filters is within gwapiv1.HTTPBackendRef or gwapiv1a1.GRPCBackendRef.
we process BackendRef based on gwapiv1.BackendRef

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.

we've had to do something similar for xRoutes, so we created RouteContext

type RouteContext interface {

may need something similar here

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 we want to extend it, then sure
thanks for explaining

@cnvergence cnvergence assigned cnvergence and unassigned cnvergence Feb 15, 2024
@cnvergence
Copy link
Copy Markdown
Member Author

/retest

@cnvergence cnvergence force-pushed the httproute-unsupported-filters branch from fae5f06 to 063d326 Compare February 16, 2024 14:15
@cnvergence cnvergence force-pushed the httproute-unsupported-filters branch from 063d326 to 6a64316 Compare February 23, 2024 19:36
@cnvergence cnvergence force-pushed the httproute-unsupported-filters branch from 5dfa61a to c76954d Compare February 26, 2024 10:03
@cnvergence
Copy link
Copy Markdown
Member Author

/retest

arkodg
arkodg previously approved these changes Feb 26, 2024
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 for incorporating the feedback

@arkodg arkodg requested review from a team February 26, 2024 21:58
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
@cnvergence
Copy link
Copy Markdown
Member Author

sure, found the context in #1252

@shawnh2
Copy link
Copy Markdown
Contributor

shawnh2 commented Feb 27, 2024

/retest

@zirain
Copy link
Copy Markdown
Member

zirain commented Feb 27, 2024

/retest

1 similar comment
@cnvergence
Copy link
Copy Markdown
Member Author

/retest

@arkodg arkodg merged commit a64c94b into envoyproxy:main Feb 27, 2024
@cnvergence cnvergence deleted the httproute-unsupported-filters branch February 27, 2024 17:12
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