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

[2201.7.x] Handle bal future complete panic by logging the error #2223

Draft
wants to merge 2 commits into
base: 2201.7.x
Choose a base branch
from

Conversation

TharmiganK
Copy link
Contributor

Purpose

$Subject

The Bal Future complete will throw an error when we try to complete the same future twice(this is an unexpected behaviour). In the current implementation, we do not handle that error, and in some scenarios, this is ending up in a panic, which cause the service to crash. This PR is to catch that exception and add a log which can resolve the panic behaviour and will provide more context on where this error occur(this can be used to trace the unexpected completion).

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

Copy link

sonarcloud bot commented Nov 21, 2024

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 51.16279% with 21 lines in your changes missing coverage. Please review.

Project coverage is 81.65%. Comparing base (82329c0) to head (fa4d726).
Report is 1 commits behind head on 2201.7.x.

Files with missing lines Patch % Lines
...dlib/http/api/client/actions/HttpClientAction.java 33.33% 8 Missing ⚠️
...tp/api/nativeimpl/ExternHttpDataSourceBuilder.java 28.57% 5 Missing ⚠️
...java/io/ballerina/stdlib/http/api/DataContext.java 55.55% 4 Missing ⚠️
...ina/stdlib/http/api/client/actions/HasPromise.java 50.00% 2 Missing ⚠️
...stdlib/http/api/nativeimpl/connection/Respond.java 50.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             2201.7.x    #2223      +/-   ##
==============================================
- Coverage       81.71%   81.65%   -0.07%     
  Complexity        577      577              
==============================================
  Files             393      393              
  Lines           21430    21446      +16     
  Branches         4809     4810       +1     
==============================================
  Hits            17511    17511              
- Misses           2917     2934      +17     
+ Partials         1002     1001       -1     

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


🚨 Try these New Features:

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.

1 participant