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

Improve plugin Code Coverage #616

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

prudhvigodithi
Copy link
Member

@prudhvigodithi prudhvigodithi commented Apr 28, 2024

Description

This is the 1st PR as part of this issue to improve the repo code coverage gradually.

Issues Resolved

Part of #612

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • 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.

@prudhvigodithi prudhvigodithi changed the title Imporve plugin Code Coverage Improve plugin Code Coverage Apr 28, 2024
@prudhvigodithi
Copy link
Member Author

FYI, I allowed the tests to run few times since yesterday and I get the following error.

{'detail': ErrorDetail(string='Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected available in 2831 seconds.', code='throttled')}

Let me add a Codecov token and update the test workflow to use the token for uploading the test report.
@bbarani @cwperks

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.37%. Comparing base (1d49ab4) to head (6fb1b11).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #616      +/-   ##
============================================
+ Coverage     29.17%   37.37%   +8.20%     
- Complexity       98      133      +35     
============================================
  Files            22       22              
  Lines          1186     1188       +2     
  Branches        109      109              
============================================
+ Hits            346      444      +98     
+ Misses          819      707     -112     
- Partials         21       37      +16     

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

@prudhvigodithi
Copy link
Member Author

Works now https://app.codecov.io/gh/opensearch-project/job-scheduler/pull/616 and I see the percentage is now 37.27% (from 29.17%).
Screenshot 2024-04-29 at 11 02 41 AM
@cwperks @joshpalis can you please check?
@bbarani

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.

Took a first pass. Thank you for adding missing test! This change looks good to me, just left some minor comments.

@prudhvigodithi
Copy link
Member Author

Thanks @cwperks for reviewing the PR, initially I have to update the access modifiers to make sure those variables/methods are accessible for testing, I have reverted back and replaced to get the getters, can you review again?

@prudhvigodithi prudhvigodithi marked this pull request as ready for review April 29, 2024 21:17
@prudhvigodithi prudhvigodithi self-assigned this Apr 29, 2024
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
@prudhvigodithi prudhvigodithi merged commit 84746aa into opensearch-project:main Apr 30, 2024
16 of 17 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 30, 2024
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
(cherry picked from commit 84746aa)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
prudhvigodithi pushed a commit that referenced this pull request Apr 30, 2024
(cherry picked from commit 84746aa)

Signed-off-by: Prudhvi Godithi <pgodithi@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>
@cwperks cwperks mentioned this pull request May 2, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants