-
Notifications
You must be signed in to change notification settings - Fork 285
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: error processing for xPolicy #3302
Conversation
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
/retest |
@@ -1015,20 +1016,23 @@ func (t *Translator) buildCircuitBreaker(policy *egv1a1.BackendTrafficPolicy) (* | |||
|
|||
func (t *Translator) buildTimeout(policy *egv1a1.BackendTrafficPolicy, r *ir.HTTPRoute) (*ir.Timeout, error) { | |||
var ( | |||
tto *ir.TCPTimeout | |||
hto *ir.HTTPTimeout | |||
tto *ir.TCPTimeout |
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>
if to, err = t.buildTimeout(policy, r); err != nil { | ||
return errors.Wrap(err, "Timeout") | ||
if to, err = t.buildTimeout(policy, r); err == nil { | ||
r.Timeout = to |
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.
stop warpping error with message here to prevent the error returned by buildTimeout
got surfaced again.
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.
LGTM thanks !
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Signed-off-by: shawnh2 <shawnhxh@outlook.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3302 +/- ##
==========================================
- Coverage 67.23% 67.22% -0.01%
==========================================
Files 166 166
Lines 19439 19489 +50
==========================================
+ Hits 13070 13102 +32
- Misses 5424 5439 +15
- Partials 945 948 +3 ☔ View full report in Codecov by Sentry. |
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.
thanks !
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #2894, separated from #2926