-
Notifications
You must be signed in to change notification settings - Fork 341
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
[JENKINS-34217] add option to disable historical statistics gathering for test results #42
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
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally there should be space-based indenting instead of tabs
} | ||
|
||
@Extension | ||
public static class DescriptorImpl extends JobPropertyDescriptor { |
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.
Add @Symbol
- Useful for Pipeline and JobDSL
} | ||
|
||
@Override | ||
public JobTestResultDisplayProperty newInstance(StaplerRequest req, JSONObject formData) { |
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.
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; |
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.
brackets
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.