[JENKINS-34217] add option to disable historical statistics gathering for test results#42
[JENKINS-34217] add option to disable historical statistics gathering for test results#42jcarrothers-sap wants to merge 3 commits into
Conversation
|
I'm afraid I don't understand why the test that is failing is failing. I can't find where its data is coming from and I've been over my own changes a dozen times and I cannot see where the side-effect is coming from. Some help would be appreciated. |
898da01 to
473a023
Compare
|
Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests. |
… for test results This change adds a new job configuration property that, when enabled, disables the display of the test trend chart and prevents the plugin from even calculating how long a test has been failing for, thus saving the work of digging up historical records.
My original code was incorrectly exiting a loop inside getPreviousResult() when it shouldn't have been.
473a023 to
8df64ee
Compare
oleg-nenashev
left a comment
There was a problem hiding this comment.
The PR looks good to me excepting the formatting and missing tests
| * | ||
| */ | ||
| public class JobTestResultDisplayProperty extends JobProperty<Job<?, ?>> { | ||
| private final boolean disableHistoricalResults; |
There was a problem hiding this comment.
Ideally there should be space-based indenting instead of tabs
| } | ||
|
|
||
| @Extension | ||
| public static class DescriptorImpl extends JobPropertyDescriptor { |
There was a problem hiding this comment.
Add @Symbol - Useful for Pipeline and JobDSL
| } | ||
|
|
||
| @Override | ||
| public JobTestResultDisplayProperty newInstance(StaplerRequest req, JSONObject formData) { |
There was a problem hiding this comment.
Why not just DataBoundConstructor?
|
|
||
| // abort if the job is configured to not do this | ||
| AbstractTestResultAction tra = b.getAction(getParentAction().getClass()); | ||
| if ( tra != null && !tra.shouldCalculatePreviousResults()) return null; |
|
Is anyone interested in doing the work to merge this? The functionality sounds like it would be very useful for our setup. |
|
Hello! Has this feature been discarded? |
|
Closing in favour of #133 |
This change adds a new job configuration property that, when enabled, disables
the display of the test trend chart and prevents the plugin from even calculating
how long a test has been failing for, thus saving the work of digging up historical
records.