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

AttachmentTestAction.annotate NPEs for Pipeline jobs

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            abayer 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.

            Show
            abayer 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.
            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/junit-attachments-plugin/pull/15
            Hide
            abayer Andrew Bayer added a comment -

            Fixed in the just-now-releasing 1.4.2!

            Show
            abayer Andrew Bayer added a comment - Fixed in the just-now-releasing 1.4.2!
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: