Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23945

Test result trend breaks lazy-loading

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Observed in a customer installation of 1.554.3, including JENKINS-18065 backport, but reproducible in 1.575-SNAPSHOT. I created a freestyle project using https://github.com/jglick/simple-maven-project-with-tests with a shell step

      mvn -Dmaven.test.failure.ignore test
      

      reporting **/target/surefire-reports/TEST-*.xml and then triggering itself (even if unstable). After setting the system quiet period to 0 and kicking off an initial build, I let it run until it had produced 121 builds of various stability, then restarted Jenkins, running a logger of hudson.model.Run at FINER and hudson.model.RunMap at FINEST.

      Showing the dashboard (/) was fine: builds 120 and 121 were loaded since these are shown as the last stable and failed builds; 116-119 were loaded to complete the weather icon.

      So then I visited the job index page. 90-115 were loaded to show the most recent builds in the HistoryWidget in the sidebar, which is normal. But then the remaining 1-89 were also loaded:

      hudson.model.RunMap$ThisIsHowItsLoaded
      	at hudson.model.RunMap.retrieve(RunMap.java:221)
      	at hudson.model.RunMap.retrieve(RunMap.java:56)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:688)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:650)
      	at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:382)
      	at jenkins.model.lazy.LazyBuildMixIn$RunMixIn.getPreviousBuild(LazyBuildMixIn.java:366)
      	at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:198)
      	at hudson.tasks.test.AbstractTestResultAction.getPreviousResult(AbstractTestResultAction.java:187)
      	at hudson.tasks.test.AbstractTestResultAction.buildDataSet(AbstractTestResultAction.java:270)
      	at hudson.tasks.test.AbstractTestResultAction.doGraph(AbstractTestResultAction.java:232)
      	at hudson.tasks.test.TestResultProjectAction.doTrend(TestResultProjectAction.java:97)
      

      Indeed /test/trend shows the status of every build, not limited to the most recent.

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            The build time trend graph limits itself to 100 builds since JENKINS-20892 in 1.544. Something like that could be done for the test graph as well.

            Show
            danielbeck Daniel Beck added a comment - The build time trend graph limits itself to 100 builds since JENKINS-20892 in 1.544. Something like that could be done for the test graph as well.
            Hide
            jglick Jesse Glick added a comment -

            Yes, something like that.

            Show
            jglick Jesse Glick added a comment - Yes, something like that.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java
            http://jenkins-ci.org/commit/jenkins/0449883d152a772deea8621ce2e2c3e97e7e8a1f
            Log:
            [FIXED JENKINS-23945] Test result trend graph should not load builds which were not already loaded.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java http://jenkins-ci.org/commit/jenkins/0449883d152a772deea8621ce2e2c3e97e7e8a1f Log: [FIXED JENKINS-23945] Test result trend graph should not load builds which were not already loaded.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java
            http://jenkins-ci.org/commit/jenkins/8ea7995813a25b3d0231730ffcac4855891a3fbf
            Log:
            [FIXED JENKINS-23945] Test result trend graph should not load builds which were not already loaded.
            (cherry picked from commit 0449883d152a772deea8621ce2e2c3e97e7e8a1f)

            Conflicts:
            changelog.html

            Compare: https://github.com/jenkinsci/jenkins/compare/2cdf10560481^...8ea7995813a2

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java http://jenkins-ci.org/commit/jenkins/8ea7995813a25b3d0231730ffcac4855891a3fbf Log: [FIXED JENKINS-23945] Test result trend graph should not load builds which were not already loaded. (cherry picked from commit 0449883d152a772deea8621ce2e2c3e97e7e8a1f) Conflicts: changelog.html Compare: https://github.com/jenkinsci/jenkins/compare/2cdf10560481 ^...8ea7995813a2
            Show
            jglick Jesse Glick added a comment - Deployed https://github.com/jenkinsci/jenkins/compare/jenkins-1.554.3...JENKINS-18065-JENKINS-23945 to: http://repo.jenkins-ci.org/public/org/jenkins-ci/main/jenkins-war/1.554.3.JENKINS-18065-JENKINS-23945/jenkins-war-1.554.3.JENKINS-18065-JENKINS-23945.war
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3589
            [FIXED JENKINS-23945] Test result trend graph should not load builds which were not already loaded. (Revision 0449883d152a772deea8621ce2e2c3e97e7e8a1f)

            Result = SUCCESS
            Jesse Glick : 0449883d152a772deea8621ce2e2c3e97e7e8a1f
            Files :

            • changelog.html
            • core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3589 [FIXED JENKINS-23945] Test result trend graph should not load builds which were not already loaded. (Revision 0449883d152a772deea8621ce2e2c3e97e7e8a1f) Result = SUCCESS Jesse Glick : 0449883d152a772deea8621ce2e2c3e97e7e8a1f Files : changelog.html core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java
            http://jenkins-ci.org/commit/jenkins/8d8102036f4e52aada39db37c05025b9bb31516d
            Log:
            [FIXED JENKINS-23945] Test result trend graph should not load builds which were not already loaded.
            (cherry picked from commit 0449883d152a772deea8621ce2e2c3e97e7e8a1f)

            Conflicts:
            changelog.html

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java http://jenkins-ci.org/commit/jenkins/8d8102036f4e52aada39db37c05025b9bb31516d Log: [FIXED JENKINS-23945] Test result trend graph should not load builds which were not already loaded. (cherry picked from commit 0449883d152a772deea8621ce2e2c3e97e7e8a1f) Conflicts: changelog.html
            Hide
            teilo James Nord added a comment -

            introduced JENKINS-25340

            Show
            teilo James Nord added a comment - introduced JENKINS-25340

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: