ballerina-lang
ballerina-lang copied to clipboard
Add runtime APIs to call module init, start, stop and function invocations from a Ballerina project
Purpose
$title
Fixes #42128
Approach
Describe how you are implementing the solutions along with the design details.
Samples
Runtime balRuntime = Runtime.from(new Module("orgName", "moduleName", "majorVersion"));
balRuntime.init();
balRuntime.start();
Object[] args = [];
balRuntime.invokeMethodAsync(“functionName”, args, callback);
balRuntime.stop(“org”, “module”, 1.0.0);
Remarks
List any other known issues, related PRs, TODO items, or any other notes related to the PR.
Check List
- [x] Read the Contributing Guide
- [ ] Updated Change Log
- [ ] Checked Tooling Support (#<Issue Number>)
- [ ] Added necessary tests
- [ ] Unit Tests
- [ ] Spec Conformance Tests
- [x] Integration Tests
- [ ] Ballerina By Example Tests
- [ ] Increased Test Coverage
- [ ] Added necessary documentation
- [ ] API documentation
- [ ] Module documentation in Module.md files
- [ ] Ballerina By Examples
Codecov Report
Attention: Patch coverage is 8.79121% with 83 lines in your changes are missing coverage. Please review.
Project coverage is 76.55%. Comparing base (
572e01d) to head (85939a4). Report is 122 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #42363 +/- ##
============================================
- Coverage 76.56% 76.55% -0.01%
- Complexity 53422 53521 +99
============================================
Files 2902 2905 +3
Lines 201858 202259 +401
Branches 26271 26334 +63
============================================
+ Hits 154547 154848 +301
- Misses 38840 38924 +84
- Partials 8471 8487 +16
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@gabilang Shall we create an issue to investigate why code coverage is low even tests are covered?
Will fix the code-coverage issue separately. Created a task for it https://github.com/ballerina-platform/ballerina-lang/issues/42427