opensearch-project / opensearch-build-libraries

Apache License 2.0
6 stars 24 forks source link

Publish failed gradle test results #397

Closed rishabh6788 closed 5 months ago

rishabh6788 commented 5 months ago

Description

This PR is to publish all the failng tests for each gradle-check job runs. The results will be indexed into our metrics cluster (publicly available). A sample record would look like.

{
  "build_number": 116,
  "pull_request": "PR #12503",
  "pr_description": "removing unused fetch sub phase processor initialization during fetch",
  "test_class": "LibraryTest",
  "test_name": "test.java.LibraryTest.testNewLibraryMethod",
  "test_status": "FAILED",
  "build_result": "FAILURE",
  "test_fail_count": 2,
  "test_skipped_count": 0,
  "test_passed_count": 0,
  "build_duration": 10071,
  "build_start_time": 1710541261641
}

This script will be added to the post action block of gradle-check.

The PR has no tests due to lack to support for jenkins internal methods, specifically currentBuild object.

Issues Resolved

https://github.com/opensearch-project/opensearch-build/issues/4469

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 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.01%. Comparing base (0721e85) to head (96e50bd).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #397 +/- ## ========================================= Coverage 87.01% 87.01% Complexity 31 31 ========================================= Files 86 86 Lines 231 231 Branches 12 12 ========================================= Hits 201 201 Misses 22 22 Partials 8 8 ```

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