-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor errors and xds for BackendTrafficPolicy and SecurityPolicy #2926
Conversation
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2926 +/- ##
==========================================
- Coverage 64.60% 64.37% -0.23%
==========================================
Files 122 122
Lines 21147 21161 +14
==========================================
- Hits 13662 13623 -39
- Misses 6637 6707 +70
+ Partials 848 831 -17 ☔ View full report in Codecov by Sentry. |
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
@@ -926,20 +858,23 @@ func (t *Translator) buildCircuitBreaker(policy *egv1a1.BackendTrafficPolicy) (* | |||
|
|||
func (t *Translator) buildTimeout(policy *egv1a1.BackendTrafficPolicy, r *ir.HTTPRoute) (*ir.Timeout, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part is reverted from https://github.com/envoyproxy/gateway/pull/2846/files#diff-ce86bc9474dbc964bb6180e6a110b708dd85081193dca54a2fa7cda70d742247L930, since BTP has supported dealing with multi-errors now
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
/retest |
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR contains many files, It would be easier to review if you could list the changes in the description.
Sure thing |
Thank you for tidying up the code! This PR is in a good direction, however, I found it a bit difficult for me to review when going through it line by line. Would you mind splitting this PR into three as the following?
|
Of course, thanks for reviewing this, I will split it up to serval PRs |
What type of PR is this?
What this PR does / why we need it:
translateXXXPolicyForRoute
andtranslateXXXPolicyForGateway
for BTP and SP, this PR extract the common part of these two methods into one shared methodxds.go
into a struct, so we can performAny()
andValidate()
, make the code structure more cleanperr.WrapWithMessage()
for SP and BTP, providing more context about errorsWhich issue(s) this PR fixes:
Fixes #2894
Fixes #2954