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

Loss of exception detail in LogRotator failures

XMLWordPrintable

    • 2.215

      The patch forĀ JENKINS-58779 resulted in a loss of detail in the system log about the root cause of a build rotation failure. Caught by plugin-compat-tester on artifact-manager-s3:

      WARNING	o.j.p.workflow.job.WorkflowRun#lambda$finish$2: failed to perform log rotation after p #2
      hudson.tasks.LogRotator$CollatedLogRotatorException: Failed to rotate logs for [p #1]
      	at hudson.tasks.LogRotator.perform(LogRotator.java:220)
      	at hudson.model.Job.logRotate(Job.java:469)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.lambda$finish$2(WorkflowRun.java:608)
      ...
      java.lang.AssertionError: 
      
      Expected: iterable with items ["container not found: sorry about your artifacts"] in any order
           but: not matched: "Failed to rotate logs for [p #1]"
      	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      	at org.junit.Assert.assertThat(Assert.java:956)
      	at org.junit.Assert.assertThat(Assert.java:923)
      	at io.jenkins.plugins.artifact_manager_jclouds.NetworkTest.errorCleaningArtifacts(NetworkTest.java:335)
      

      Original log contents for comparison:

      WARNING	o.j.p.workflow.job.WorkflowRun#lambda$finish$2: failed to perform log rotation after p #2
      org.jclouds.blobstore.ContainerNotFoundException: container not found: sorry about your artifacts
      	at io.jenkins.plugins.artifact_manager_jclouds.NetworkTest.lambda$errorCleaningArtifacts$3(NetworkTest.java:333)
      	at io.jenkins.plugins.artifact_manager_jclouds.MockApiMetadata$MockStrategy.removeBlob(MockApiMetadata.java:229)
      	at ...
      	at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.delete(JCloudsVirtualFile.java:370)
      Caused: java.io.IOException
      	at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.delete(JCloudsVirtualFile.java:374)
      	at io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManager.delete(JCloudsArtifactManager.java:206)
      	at hudson.model.Run.deleteArtifacts(Run.java:1555)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.deleteArtifacts(WorkflowRun.java:633)
      	at hudson.tasks.LogRotator.perform(LogRotator.java:158)
      	at hudson.model.Job.logRotate(Job.java:468)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.lambda$finish$2(WorkflowRun.java:608)
      	at ...
      

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: