Skip to content
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

Fix some bugs in xds flow control #1731

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

hanbingleixue
Copy link
Collaborator

@hanbingleixue hanbingleixue commented Jan 7, 2025

What type of PR is this?

Bug

What this PR does / why we need it?

  1. Fixed an issue where the retry fails when the HttpUrlConnection is abnormal or the response header is specified.
  2. Resolved the following issue: When an exception is reported, the number of failures is not counted. As a result, the instance circuit breaker fails.
  3. Fixed the issue that the request address is required during request circuit break judgment.
  4. Fixed an issue where no response body is displayed when okhttp triggers circuit breaker or error injection.

Which issue(s) this PR fixes?

Fixes #1724

Does this PR introduce a user-facing change?

No

Checklist

  • Make sure there is a GitHub_issue related with this PR before you start working on it.
  • Make sure you have squashed your change to one single commit.
  • GitHub Actions works fine in this PR.

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 16.66667% with 30 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../flowcontrol/AbstractXdsHttpClientInterceptor.java 0.00% 16 Missing ⚠️
...control/retry/client/OkHttp3ClientInterceptor.java 0.00% 5 Missing ⚠️
...lient/OkHttpClientInterceptorChainInterceptor.java 0.00% 5 Missing ⚠️
...nt/HttpUrlConnectionResponseStreamInterceptor.java 0.00% 2 Missing ⚠️
...lowcontrol/common/handler/retry/AbstractRetry.java 0.00% 1 Missing ⚠️
...chain/handler/XdsBusinessClientRequestHandler.java 0.00% 1 Missing ⚠️
Flag Coverage Δ Complexity Δ
unittests 42.48% <16.66%> (-0.01%) 181.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ Complexity Δ
...ment/service/xds/utils/RdsProtocolTransformer.java 39.90% <100.00%> (ø) 0.00 <0.00> (ø)
...l/common/xds/circuit/XdsCircuitBreakerManager.java 77.04% <100.00%> (-0.73%) 0.00 <0.00> (ø)
...mant/flowcontrol/service/InterceptorSupporter.java 39.18% <ø> (ø) 0.00 <0.00> (ø)
...ol/res4j/chain/handler/XdsFaultRequestHandler.java 4.34% <ø> (ø) 0.00 <0.00> (ø)
...lowcontrol/common/handler/retry/AbstractRetry.java 21.66% <0.00%> (ø) 0.00 <0.00> (ø)
...chain/handler/XdsBusinessClientRequestHandler.java 8.33% <0.00%> (-0.76%) 0.00 <0.00> (ø)
...nt/HttpUrlConnectionResponseStreamInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...control/retry/client/OkHttp3ClientInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...lient/OkHttpClientInterceptorChainInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../flowcontrol/AbstractXdsHttpClientInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

... and 1 file with indirect coverage changes

daizhenyu
daizhenyu previously approved these changes Jan 7, 2025
lilai23
lilai23 previously approved these changes Jan 7, 2025
@hanbingleixue hanbingleixue dismissed stale reviews from lilai23 and daizhenyu via 1ba2ebf January 7, 2025 06:12
@hanbingleixue hanbingleixue force-pushed the develop branch 2 times, most recently from 1ba2ebf to 40cbe47 Compare January 7, 2025 08:43
@Sherlockhan Sherlockhan merged commit ffbdcd6 into sermant-io:develop Jan 8, 2025
366 checks passed
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.

Fix the issue of xds flow control function test
4 participants