-
Notifications
You must be signed in to change notification settings - Fork 316
Support module split and generate individual coverage reports in gradle check task #5778
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
base: main
Are you sure you want to change the base?
Conversation
… in gradle check task Signed-off-by: Divya Madala <[email protected]>
| ''' | ||
| junit allowEmptyResults: true, testResults: '**/build/test-results/**/*.xml' | ||
| archiveArtifacts artifacts: 'codeCoverage.xml', onlyIfSuccessful: true | ||
| archiveArtifacts artifacts: 'codeCoverage/**', onlyIfSuccessful: true |
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.
Is the value of onlyIfSuccessful right? Seems confusing when it is placed under always block but only archiveArtifacts if successful.
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.
Yeah Sayali. It's valid, only archives if the build is successful. The files aren't even created if the build fails.
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.
Isn't that what @bowenlan-amzn and we were discussing. That failure also needs to generate codecoverage? opensearch-project/opensearch-build-libraries#744
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.
That is a different problem Sayali. Will need to expliticitly generate reports from the .exec files using jacococli or a gradle command in failed block .
This PR handles the successful condition and generates all the required reports independently to generate coverage data for unit and integration tests.
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.
In that case should this entire block be placed under success block of jenkins instead of always?
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.
We would anyway create the reports with same names. So once I add the failure block I will remove onlyIfSuccessful condition. Archiving will be applicable to every build status in that case.
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.
Sure sounds good. I believe we are yet to add module_name arg in build-lib side?
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.
Yes, just a small change will send the PR.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5778 +/- ##
=======================================
Coverage 96.57% 96.57%
=======================================
Files 405 405
Lines 18526 18526
=======================================
Hits 17892 17892
Misses 634 634 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Divya Madala <[email protected]>
Description
Issues Resolved
Addresses build side changes for the meta issue opensearch-project/OpenSearch#19378
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.