Skip to content

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Jul 16, 2025

Description

Currently, only tests from the root project count towards the codecov report which shows that only 33% of the lines in this repo are covered by tests.

This PR attempts to aggregate the jacoco reports from root + sub projects (SPI and sample plugin) for one cumulative report to get a more accurate report of code coverage.

Related Issues

Resolves #612

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

Signed-off-by: Craig Perkins <[email protected]>
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.74%. Comparing base (e88586e) to head (bf8075f).
⚠️ Report is 4 commits behind head on main.

❌ Your project status has failed because the head coverage (69.74%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@              Coverage Diff              @@
##               main     #800       +/-   ##
=============================================
+ Coverage     31.43%   69.74%   +38.30%     
=============================================
  Files            34       38        +4     
  Lines          1527     1735      +208     
  Branches        137      156       +19     
=============================================
+ Hits            480     1210      +730     
+ Misses         1010      435      -575     
- Partials         37       90       +53     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cwperks added 13 commits July 16, 2025 17:00
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
@cwperks
Copy link
Member Author

cwperks commented Jul 28, 2025

70% now :)

@cwperks cwperks marked this pull request as ready for review July 28, 2025 12:15
}
}
systemProperty 'tests.security.manager', 'true'
systemProperty 'tests.security.manager', 'false'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to disable this bc the agent was preventing dumpCoverage from writing to build/jacoco.

I plan to figure out how to re-enable this in a subsequent PR.

@cwperks cwperks changed the title Attempt to aggregate codecov across root + sub projects for cumulative report Aggregate codecov across root + sub projects for cumulative report Aug 2, 2025
@cwperks cwperks merged commit 0bab682 into opensearch-project:main Aug 7, 2025
23 of 25 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in Engineering Effectiveness Board Aug 7, 2025
Jeremydupras pushed a commit to Jeremydupras/job-scheduler that referenced this pull request Aug 20, 2025
…pensearch-project#800)

* WIP on allowing interval schedule to operate in seconds

Signed-off-by: Craig Perkins <[email protected]>

* Support defining IntervalSchedule in seconds

Signed-off-by: Craig Perkins <[email protected]>

* Use seconds in bwc test

Signed-off-by: Craig Perkins <[email protected]>

* Update runThenListJobs test

Signed-off-by: Craig Perkins <[email protected]>

* Consistent create watcher job

Signed-off-by: Craig Perkins <[email protected]>

* Add test that disables watcher job and verifies that it stops running, but metadata exists

Signed-off-by: Craig Perkins <[email protected]>

* Disable security manager for bwc test

Signed-off-by: Craig Perkins <[email protected]>

* Always test with security manager

Signed-off-by: Craig Perkins <[email protected]>

* Add java agent to SPI

Signed-off-by: Craig Perkins <[email protected]>

* Ensure that document is searchable immediately

Signed-off-by: Craig Perkins <[email protected]>

* Attempt to aggregate codecov across root + sub projects for cumulative report

Signed-off-by: Craig Perkins <[email protected]>

* Fix error

Signed-off-by: Craig Perkins <[email protected]>

* Try this again

Signed-off-by: Craig Perkins <[email protected]>

* Use codecov-action

Signed-off-by: Craig Perkins <[email protected]>

* Fix flakiness

Signed-off-by: Craig Perkins <[email protected]>

* Fix flakiness

Signed-off-by: Craig Perkins <[email protected]>

* Make sure coverage can be written after node exit using JMX

Signed-off-by: Craig Perkins <[email protected]>

* Fix forbidden

Signed-off-by: Craig Perkins <[email protected]>

* Simplify

Signed-off-by: Craig Perkins <[email protected]>

* Skip JMX for multinode tests

Signed-off-by: Craig Perkins <[email protected]>

* Use 0.8.13

Signed-off-by: Craig Perkins <[email protected]>

* declare task dependency

Signed-off-by: Craig Perkins <[email protected]>

* Finalize test with jacoco

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Jeremy Dupras <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Improve the job-scheduler code coverage percentage

2 participants