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

Add code coverage exclusions on false positives #3196

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

peternied
Copy link
Member

Description

Adding code coverage exclusions on files that are creating code coverage measurement issues.

Issues Resolved

Testing

Will be checking the codecov output on this PR and expect it to come back clean. Might need to iterate a couple times to make sure the max threshold % amount is correct.

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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: Peter Nied <petern@amazon.com>
@peternied peternied changed the title Add code coverage exclusions Add code coverage exclusions on false positives Aug 16, 2023
@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #3196 (cbcb876) into main (bd084c8) will decrease coverage by 0.05%.
Report is 10 commits behind head on main.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #3196      +/-   ##
============================================
- Coverage     62.46%   62.42%   -0.05%     
+ Complexity     3354     3352       -2     
============================================
  Files           254      254              
  Lines         19749    19748       -1     
  Branches       3334     3334              
============================================
- Hits          12337    12327      -10     
- Misses         5784     5788       +4     
- Partials       1628     1633       +5     

see 8 files with indirect coverage changes

Signed-off-by: Peter Nied <petern@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

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

@peternied I'm approving this PR, but also had a question. Could this be achieved using java annotations?

@peternied peternied merged commit 07406d6 into opensearch-project:main Aug 21, 2023
@peternied peternied deleted the temp-coverage-fix branch August 21, 2023 21:29
@peternied
Copy link
Member Author

Could this be achieved using java annotations?

Codecov doesn't support any java annotations that I'm aware of. The only really annotations that I've seen used in the code coverage space are about automatically excluding code that was generated, such as by adding your own @.generated annotation example.

@peternied peternied added the backport 2.x backport to 2.x branch label Aug 22, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 22, 2023
Adding code coverage exclusions on files that are creating code coverage
measurement issues.

Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit 07406d6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
peternied pushed a commit that referenced this pull request Aug 23, 2023
Backport 07406d6 from #3196.

Signed-off-by: Peter Nied <petern@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants