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

Error 500 using Build other Projects in Promotion process of a template

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.625.3.1
      CloudBees Template 4.21
    • Similar Issues:

      Description

      When adding a Build Other Projects step in the promotion process in a Job Template, the server raises a NullPointerException when processing the following request:

      http://localhost:8083/job/test-job/descriptorByName/hudson.tasks.BuildTrigger/check?value=
      

      The method doCheck in the BuildTrigger assume that the @AncestorInPath is not null which is a bug.

      Source code is here: https://github.com/jenkinsci/jenkins/blob/e2dccc35572b64f5e602a6b1b3efb517c578872c/core/src/main/java/hudson/tasks/BuildTrigger.java#L371

      How to reproduce:

      • Create a Job Template "test-job" at the root
      • Tick "Define Promotion Process"
      • "Build Other Projects" action
      • An ERROR link appears

      Note: This issue does not block the functionality and this error can be ignored. Specifying an existing project and saving the configuration will make this error disappears.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Allan Burdajewicz
            Path:
            core/src/main/java/hudson/tasks/BuildTrigger.java
            test/src/test/java/hudson/tasks/BuildTriggerTest.java
            http://jenkins-ci.org/commit/jenkins/10699e2a50a748585401e12cbfef89fb4c2d215d
            Log:
            JENKINS-32525 - Handle null @AncestorInPath when selecting Downstream Jobs.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Allan Burdajewicz Path: core/src/main/java/hudson/tasks/BuildTrigger.java test/src/test/java/hudson/tasks/BuildTriggerTest.java http://jenkins-ci.org/commit/jenkins/10699e2a50a748585401e12cbfef89fb4c2d215d Log: JENKINS-32525 - Handle null @AncestorInPath when selecting Downstream Jobs.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Allan Burdajewicz
            Path:
            core/src/main/java/hudson/tasks/BuildTrigger.java
            core/src/main/resources/hudson/tasks/Messages.properties
            http://jenkins-ci.org/commit/jenkins/85365c6f399cd3dcdc9a0c10fb6737e4d9a3e5ca
            Log:
            JENKINS-32525 - Added warning.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Allan Burdajewicz Path: core/src/main/java/hudson/tasks/BuildTrigger.java core/src/main/resources/hudson/tasks/Messages.properties http://jenkins-ci.org/commit/jenkins/85365c6f399cd3dcdc9a0c10fb6737e4d9a3e5ca Log: JENKINS-32525 - Added warning.
            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/BuildTrigger.java
            core/src/main/resources/hudson/tasks/Messages.properties
            test/src/test/java/hudson/tasks/BuildTriggerTest.java
            http://jenkins-ci.org/commit/jenkins/a4cabd511fdcd04d8a057927688968ade569106f
            Log:
            [FIXED JENKINS-32525] Merged #2087.

            Compare: https://github.com/jenkinsci/jenkins/compare/f1d5653b507f...a4cabd511fdc

            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/BuildTrigger.java core/src/main/resources/hudson/tasks/Messages.properties test/src/test/java/hudson/tasks/BuildTriggerTest.java http://jenkins-ci.org/commit/jenkins/a4cabd511fdcd04d8a057927688968ade569106f Log: [FIXED JENKINS-32525] Merged #2087. Compare: https://github.com/jenkinsci/jenkins/compare/f1d5653b507f...a4cabd511fdc
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4514
            JENKINS-32525 - Handle null @AncestorInPath when selecting Downstream (Revision 10699e2a50a748585401e12cbfef89fb4c2d215d)
            JENKINS-32525 - Added warning. (Revision 85365c6f399cd3dcdc9a0c10fb6737e4d9a3e5ca)

            Result = SUCCESS
            allan.burdajewicz : 10699e2a50a748585401e12cbfef89fb4c2d215d
            Files :

            • test/src/test/java/hudson/tasks/BuildTriggerTest.java
            • core/src/main/java/hudson/tasks/BuildTrigger.java

            allan.burdajewicz : 85365c6f399cd3dcdc9a0c10fb6737e4d9a3e5ca
            Files :

            • core/src/main/resources/hudson/tasks/Messages.properties
            • core/src/main/java/hudson/tasks/BuildTrigger.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4514 JENKINS-32525 - Handle null @AncestorInPath when selecting Downstream (Revision 10699e2a50a748585401e12cbfef89fb4c2d215d) JENKINS-32525 - Added warning. (Revision 85365c6f399cd3dcdc9a0c10fb6737e4d9a3e5ca) Result = SUCCESS allan.burdajewicz : 10699e2a50a748585401e12cbfef89fb4c2d215d Files : test/src/test/java/hudson/tasks/BuildTriggerTest.java core/src/main/java/hudson/tasks/BuildTrigger.java allan.burdajewicz : 85365c6f399cd3dcdc9a0c10fb6737e4d9a3e5ca Files : core/src/main/resources/hudson/tasks/Messages.properties core/src/main/java/hudson/tasks/BuildTrigger.java

              People

              Assignee:
              allan_burdajewicz Allan BURDAJEWICZ
              Reporter:
              allan_burdajewicz Allan BURDAJEWICZ
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: