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

Have test run failures classified as verification failures in Gradle Enterprise #819

Open
kyhule opened this issue Jul 24, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@kyhule
Copy link

kyhule commented Jul 24, 2023

Is your feature request related to a problem? Please describe.
It would be nice if the gradle executed task that failed due to test failures were classified as verification failures in Gradle Enterprise. Currently, marathon test failures are always classified as non-verification failures. Gradle Enterprise provides a mechanism to filter failure build scans based on non-verification and verification failures. Verification failures are failures that are expected within a standard application development lifecycle. They typically represent a problem with the developer’s inputs to the build such as the source code. Non-verification failures are failures that are typically not expected within a standard application development lifecycle, such as build configuration failures, dependency resolution failures, infrastructure failures, and so on.
CleanShot 2023-07-24 at 15 23 05@2x

Describe the solution you'd like
The simplest solution would be to prefix the exception message with one of the phrases outlined in the documentation here. For instance, replace:

Process 'command '/home/ubuntu/workspace/.../build/marathon/cli/bin/marathon'' finished with non-zero exit value 1

with:

Test Failed. Process 'command '/home/ubuntu/workspace/.../build/marathon/cli/bin/marathon'' finished with non-zero exit value 1

Additional context
I suspect that there could be failures executing the marathon command that constitute being categorized as a non-verification failure but I am not sure if the cli provides enough context to determine that.

@kyhule kyhule added the enhancement New feature or request label Jul 24, 2023
@Malinskiy
Copy link
Member

Hey @kyhule

Thanks for submitting this,

AFAIU the exception is being produced by Gradle. I'm not sure why extending VerificationTask and failing the script

is not treated as verification failure out of the box.

From what you're describing, the super.exec() call might need just to be wrapped in try {} catch {} and rethrow with an error message as described on the Gradle Enterprise doc page.

I'm not a user of Gradle Enterprise and don't have access to such a solution, so happy to accept a PR from someone who can implement and verify a working fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants