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

Publish failed gradle test results #397

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Publish failed gradle test results #397

merged 1 commit into from
Mar 21, 2024

Conversation

rishabh6788
Copy link
Collaborator

@rishabh6788 rishabh6788 commented Mar 15, 2024

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

opensearch-project/opensearch-build#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.

Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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           

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

Copy link
Member

@peterzhuamazon peterzhuamazon left a comment

Choose a reason for hiding this comment

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

Hi @rishabh6788 ,

Add some comments.

Thanks.

vars/getTestResults.groovy Outdated Show resolved Hide resolved
vars/getTestResults.groovy Outdated Show resolved Hide resolved
vars/getTestResults.groovy Outdated Show resolved Hide resolved
@rishabh6788 rishabh6788 marked this pull request as draft March 16, 2024 00:48
@@ -0,0 +1,141 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

Maybe rename it getGradleTestResults? since these are specific to the gradle test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Renamed.

@rishabh6788 rishabh6788 merged commit 2d571f5 into opensearch-project:main Mar 21, 2024
8 of 9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 21, 2024
Signed-off-by: Rishabh Singh <[email protected]>
(cherry picked from commit 2d571f5)
Signed-off-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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants