-
Notifications
You must be signed in to change notification settings - Fork 336
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… #133
base: master
Are you sure you want to change the base?
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.
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 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?
@@ -156,7 +156,7 @@ private TestResultActionIterable createBuildHistory(Run<?, ?> lastCompletedBuild | |||
@Deprecated | |||
public void doTrend( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException { | |||
AbstractTestResultAction a = getLastTestResultAction(); | |||
if(a!=null) | |||
if(a!=null && a.shouldCalculatePreviousResults()) |
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.
this is not used anymore
@@ -25,5 +25,31 @@ THE SOFTWARE. | |||
<?jelly escape-by-default='true'?> | |||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.