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 hanging issue in the HTTP client after status code binding feature #1954

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

TharmiganK
Copy link
Contributor

@TharmiganK TharmiganK commented Apr 19, 2024

Purpose

$Subject

Related to ballerina-platform/ballerina-library#6474

Here, we have used a hack to avoid the countdown latch and used the bal future to return the result from the ballerina call directly. With this there is an additional call to Java in order to build the status code response (since the status code response is not anydata, we cannot create it using cloneWithType). So we have decided to add this new feature with a new client: http:StatusCodeClient and the behaviour of the http:Client will remain same as in Update 8.

Examples

N/A

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility
  • Checked the impact on OpenAPI generation : Need to address this!

Copy link

sonarcloud bot commented Apr 19, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 38.68613% with 168 lines in your changes are missing coverage. Please review.

Project coverage is 80.95%. Comparing base (b9e477a) to head (d07fa66).
Report is 1 commits behind head on master.

Files Patch % Lines
ballerina/http_status_code_client.bal 11.72% 128 Missing ⚠️
ballerina/http_status_code_client_object.bal 0.00% 24 Missing ⚠️
...b/http/api/nativeimpl/ExternResponseProcessor.java 83.33% 9 Missing and 1 partial ⚠️
ballerina/http_client_endpoint.bal 87.50% 4 Missing ⚠️
ballerina/http_response.bal 83.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    ballerina-platform/ballerina-library#1954      +/-   ##
============================================
- Coverage     81.55%   80.95%   -0.60%     
  Complexity      562      562              
============================================
  Files           387      389       +2     
  Lines         21401    21585     +184     
  Branches       4855     4969     +114     
============================================
+ Hits          17453    17475      +22     
- Misses         2951     3103     +152     
- Partials        997     1007      +10     

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

@TharmiganK
Copy link
Contributor Author

Will send a different PR to improve code coverage with the new client

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.

2 participants