-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Display test failures in the gradle check status report. #5200
Display test failures in the gradle check status report. #5200
Conversation
44a6755
to
7f2e175
Compare
Gradle Check (Jenkins) Run Completed with:
|
4c41428
to
731aa1f
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
731aa1f
to
2e79652
Compare
Gradle Check (Jenkins) Run Completed with:
|
4e80ab8
to
560f26f
Compare
Gradle Check (Jenkins) Run Completed with:
|
@dblock I think we could use community provided test reporters, fe [1], what do you think? [1] https://github.com/marketplace/actions/test-reporter |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Yeah that's a good idea. Would need to fetch the test results from gradle check to use, and this is not very reassuring:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the curl / jq command and it seems to work. Is there any way to test this end-to-end without just committing it to main?
.github/workflows/gradle-check.yml
Outdated
- name: Extract Test Failure | ||
if: ${{ github.event_name == 'pull_request_target' && failure() }} | ||
run: | | ||
TEST_FAILURES=`curl -s "${{ env.workflow_url }}/testReport/api/json?tree=suites\[cases\[status,className,name\]\]" | jq -r '.. | objects | select(.status=="FAILED",.status=="REGRESSION") | (.className + "." + .name)' | uniq` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use uniq -c
to get a count of failures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to display the actual failures instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-c
will give you both the failure and the count:
curl -s "https://build.ci.opensearch.org/job/gradle-check/6876/testReport/api/json?tree=suites\[cases\[status,className,name\]\]" | jq -r '.. | objects | select(.status=="FAILED",.status=="REGRESSION") | (.className + "." + .name)' | uniq -c
2 org.opensearch.index.ShardIndexingPressureConcurrentExecutionTests.testCoordinatingPrimaryThreadedUpdateToShardLimitsAndRejections
4 org.opensearch.index.mapper.GeoPointFieldMapperTests.testLatLonInArrayMoreThanThreeValues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'd add | sort -n -r | head -n 10
to the command as well to put the most failures at the top and have a limit so we don't spam the correspondence in the case things go badly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added. Nice bash-fu @andrross :)
Also I agree there are probably better ways to do this but this seems like a quick and easy improvement that can be done now |
Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
560f26f
to
8dc990c
Compare
haha @dblock , I am absolutely not against it, just wanted to make integration of such a feature as simple as possible (using available Github actions but it seems like we need to allow external actions on repository explicitly) |
The test-reporter action seems to put the results on the github action screen (which you'd have to click to get to) and doesn't seems like it would add much value given that we have a handy link to the test results anyway. Am I misinterpreting that? I like that this solution ends up being very in-your-face about the flaky failures and you don't have to click anything to see what failed. Might be more motivation to help drive these down :) |
@andrross fair enough, let's give it a try? |
Signed-off-by: dblock <dblock@dblock.org>
Signed-off-by: dblock <dblock@dblock.org>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
* Display test failures in the gradle check status report. Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> * Add counts of failures. Signed-off-by: dblock <dblock@dblock.org> * Limit to 10 failures. Signed-off-by: dblock <dblock@dblock.org> Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> Signed-off-by: dblock <dblock@dblock.org> (cherry picked from commit 51991e0) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…t. (#5266) * Display test failures in the gradle check status report. (#5200) * Display test failures in the gradle check status report. Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> * Add counts of failures. Signed-off-by: dblock <dblock@dblock.org> * Limit to 10 failures. Signed-off-by: dblock <dblock@dblock.org> Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> Signed-off-by: dblock <dblock@dblock.org> (cherry picked from commit 51991e0) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Quote failures. Signed-off-by: dblock <dblock@dblock.org> Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> Signed-off-by: dblock <dblock@dblock.org> 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> Co-authored-by: dblock <dblock@dblock.org>
Signed-off-by: Daniel (dB.) Doubrovkine dblock@amazon.com
Description
Display test failures in the gradle check status report.
I tested this by hard-coding a few failed build URIs, so hopefully this doesn't break everything, but to actually open the PR we need a pull request target to work.
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.