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

AttachmentTestAction.annotate NPEs for Pipeline jobs

      After making junit-attachments compatible with Pipeline, I've discovered that case result pages for failed tests with attachments on Pipeline jobs now show up with no values for error details, etc, while the headers for each of those fields are still visible.

      Turns out that AttachmentTestAction.annotate is NPEing.

          [JENKINS-36504] AttachmentTestAction.annotate NPEs for Pipeline jobs

          Andrew Bayer added a comment -

          Issue was a call to the deprecated getOwner() on a TestObject, which returns null for WorkflowRun related tests. Changing that to getRun() fixes it.

          Andrew Bayer added a comment - Issue was a call to the deprecated getOwner() on a TestObject , which returns null for WorkflowRun related tests. Changing that to getRun() fixes it.

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/junit-attachments-plugin/pull/15

          Andrew Bayer added a comment -

          Fixed in the just-now-releasing 1.4.2!

          Andrew Bayer added a comment - Fixed in the just-now-releasing 1.4.2!

          Code changed in jenkins
          User: nostalic
          Path:
          src/main/java/de/esailors/jenkins/teststability/StabilityTestDataPublisher.java
          http://jenkins-ci.org/commit/test-stability-plugin/0d3b93af32e98073eb519ced3c1d549757124cf8
          Log:
          Use TestObject.getRun in buildUpInitialHistory

          On pipeline jobs, the call to deprecated API TestObject.getOwner() returns null, as reported on https://issues.jenkins-ci.org/browse/JENKINS-36504 .

          This causes an NPE on previousResult.getOwner().getNumber() ; using TestObject.getRun() avoid this issue.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: nostalic Path: src/main/java/de/esailors/jenkins/teststability/StabilityTestDataPublisher.java http://jenkins-ci.org/commit/test-stability-plugin/0d3b93af32e98073eb519ced3c1d549757124cf8 Log: Use TestObject.getRun in buildUpInitialHistory On pipeline jobs, the call to deprecated API TestObject.getOwner() returns null, as reported on https://issues.jenkins-ci.org/browse/JENKINS-36504 . This causes an NPE on previousResult.getOwner().getNumber() ; using TestObject.getRun() avoid this issue.

            abayer Andrew Bayer
            abayer Andrew Bayer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: