[JENKINS-34217] add option to disable historical statistics gathering…#133
[JENKINS-34217] add option to disable historical statistics gathering…#133XavierRaynaud wants to merge 1 commit into
Conversation
|
Can you please take a look at the merge conflicts, Is this still needed after #134, It no longer blocks page render, instead it is loaded async |
|
Also #142 should obviate the need for such workarounds. |
|
This bug is killing our CI - Interested to help merge. Can anyone help or get me started - if I can get time allocated? |
… 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. Note that this commit is squashing the 3 commits initially devloped by Jim Carrothers. It also fixes h.t.j.JobTestResultDisplayProperty$DescriptorImpl.getDisplayName() return value.
timja
left a comment
There was a problem hiding this comment.
I've done a sanity review and not tested it locally, it won't work as is.
I would strongly suggest people check out https://github.com/jenkinsci/junit-sql-storage-plugin if this is causing an issue for them.
@XavierRaynaud / @qlihdunn what is the reason you want this feature? the issue talks about a specific gerrit feature, is your use-case the same?
| public void doTrend( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { | ||
| AbstractTestResultAction a = getLastTestResultAction(); | ||
| if(a!=null) | ||
| if(a!=null && a.shouldCalculatePreviousResults()) |
| <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" | ||
| xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt" xmlns:local="local" xmlns:c="/charts"> | ||
| <c:trend-chart it="${from}" title="${%Test Result Trend}" enableLinks="true"/> | ||
| <j:set var="tr" value="${action.lastTestResultAction}" /> |
There was a problem hiding this comment.
incorrect merge conflict resolution
| @Override | ||
| public JobTestResultDisplayProperty newInstance(StaplerRequest req, JSONObject formData) { | ||
| if (formData.isNullObject()) return null; | ||
| return new JobTestResultDisplayProperty(formData.getBoolean("junitsettings-disableHistoricalResults")); |
There was a problem hiding this comment.
field should be stored on the descriptor I think and then use data binding instead of retrieving from formData
| * | ||
| */ | ||
| public class JobTestResultDisplayProperty extends JobProperty<Job<?, ?>> { | ||
| private final boolean disableHistoricalResults; |
There was a problem hiding this comment.
use spaces not tabs please to be consistent with elsewhere
|
Hi @timja, Many thanks for your comment. The reason I want this feature is the following: Because of (1), trend chart, statistics, and browsing test results tooks a huge time. Therefore, I would like to cut down all history computation for such jobs. |
https://github.com/jenkinsci/junit-sql-storage-plugin should help with this. and it should make it so that 2 is not such a problem |
|
Ok, thanks for the info. I had a look on the code, and did not see anything about DELETE statements. |
not currently deleted as they are also used for historical test results, run auto-rotation doesn't mean that the test results are no longer interesting. but some form of cleaning should be implemented |
|
Ok. thanks. As I said before, I've a huge number of junit tests. Therefore, I can't switch to a database if the policy is to keep results forever. |
It now deletes them when the job or build is deleted https://github.com/jenkinsci/junit-sql-storage-plugin/releases/tag/99.v79279ea1504d |
|
Wow cool ! Thanks a lot. I will test it asap. I think we can close this pull request. |
… 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.
Note that this commit is squashing the 3 commits initially devloped by Jim Carrothers.
It also fixes h.t.j.JobTestResultDisplayProperty$DescriptorImpl.getDisplayName() return value.