opensearch-project / opensearch-metrics

OpenSearch Metrics
https://metrics.opensearch.org
Apache License 2.0
3 stars 5 forks source link

Onboard repo code coverage metrics #93

Closed prudhvigodithi closed 2 weeks ago

prudhvigodithi commented 2 weeks ago

Description

Onboard repo code coverage metrics and mechanism to link with existing release metrics.

"_source": {
    "coverage": 43.41,
    "current_date": "2024-10-28T17:54:41.742113549",
    "component": "customImportMapDashboards",
    "id": "b10b960e-b31f-3cb1-9a55-5e87ed2ade6b",
    "commitid": "511840ae5ca900610d521aad311677445269055f",
    "state": "complete",
    "repository": "dashboards-maps",
    "release_version": "2.18.0",
    "release_state": "open",
    "version": "2.18.0",
    "branch": "2.18",
    "url": "https://api.codecov.io/api/v2/github/opensearch-project/repos/dashboards-maps/commits?branch=2.18"
  },
  "_source": {
    "coverage": 0,
    "current_date": "2024-10-28T17:54:41.742113549",
    "component": "OpenSearch",
    "id": "09c026db-49b3-3502-ae80-717c6db4b8e1",
    "commitid": "none",
    "state": "no-coverage",
    "repository": "OpenSearch",
    "release_version": "2.18.0",
    "release_state": "open",
    "version": "2.18.0",
    "branch": "2.18",
    "url": "https://api.codecov.io/api/v2/github/opensearch-project/repos/OpenSearch/commits?branch=2.18"
  },

Issues Resolved

Part of https://github.com/opensearch-project/opensearch-metrics/issues/51 and https://github.com/opensearch-project/opensearch-metrics/issues/90

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.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 93.44262% with 8 lines in your changes missing coverage. Please review.

Project coverage is 86.58%. Comparing base (6c900a3) to head (3a1cffd). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...opensearchmetrics/model/codecov/CodeCovResult.java 87.50% 4 Missing :warning:
.../opensearchmetrics/metrics/MetricsCalculation.java 94.11% 2 Missing :warning:
...va/org/opensearchmetrics/dagger/MetricsModule.java 0.00% 1 Missing :warning:
...ensearchmetrics/model/codecov/CodeCovResponse.java 90.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #93 +/- ## ============================================ + Coverage 84.53% 86.58% +2.04% - Complexity 228 271 +43 ============================================ Files 61 64 +3 Lines 1371 1491 +120 Branches 56 58 +2 ============================================ + Hits 1159 1291 +132 + Misses 189 177 -12 Partials 23 23 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

peterzhuamazon commented 2 weeks ago

Seems like we need to increase the test coverage of this PR?

prudhvigodithi commented 2 weeks ago

Seems like we need to increase the test coverage of this PR?

Let me see @peterzhuamazon, the codecov complains missing coverage for single lines in middle of the code,