refactor errors and xds for BackendTrafficPolicy and SecurityPolicy#2926
refactor errors and xds for BackendTrafficPolicy and SecurityPolicy#2926shawnh2 wants to merge 10 commits intoenvoyproxy:mainfrom
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.
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 |
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:
translateXXXPolicyForRouteandtranslateXXXPolicyForGatewayfor BTP and SP, this PR extract the common part of these two methods into one shared methodxds.gointo 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