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

jenkins-cli.jar: set-build-description command fails with NPE for non-existent build

    Details

    • Similar Issues:

      Description

      We use "jenkins-cli.jar set-build-description" command for integration with external CI systems - they record build number, do their processing, then post status back to jenkins by updating build description. Sometimes, recorded build number no longer exists (e.g. was expired), and in thsi case, set-build-description command fails with NullPointerException (and exist code of 255). Of course, NPE isn't selective enough to differentiate "build doesn't exist" (warning-like condition) from more serious error which may require closer attention.

      It would be nice if set-build-description checked build existence, and exited with specific error message and specific exit code for easy scripting.

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Pavel Janoušek You may be interested in this one.

            Show
            danielbeck Daniel Beck added a comment - Pavel Janoušek You may be interested in this one.
            Hide
            pajasoft Pavel Janoušek added a comment -

            Ok, I can see this issue in the code, will fix it.

            Show
            pajasoft Pavel Janoušek added a comment - Ok, I can see this issue in the code, will fix it.
            Hide
            pajasoft Pavel Janoušek added a comment -

            PR sent.

            Show
            pajasoft Pavel Janoušek added a comment - PR sent.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ing. Pavel Janousek
            Path:
            core/src/main/java/hudson/cli/SetBuildDescriptionCommand.java
            http://jenkins-ci.org/commit/jenkins/575c1af489a43a6bc1846ca46864e5d4931e47e3
            Log:
            JENKINS-33942 Fixed NPE when non-exists run requested

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ing. Pavel Janousek Path: core/src/main/java/hudson/cli/SetBuildDescriptionCommand.java http://jenkins-ci.org/commit/jenkins/575c1af489a43a6bc1846ca46864e5d4931e47e3 Log: JENKINS-33942 Fixed NPE when non-exists run requested
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/cli/SetBuildDescriptionCommand.java
            http://jenkins-ci.org/commit/jenkins/511ccf0c836651d1d825c062d7d42338438c735c
            Log:
            Merge pull request #2230 from pjanouse/JENKINS-33942

            [FIX JENKINS-33942] Fixed NPE when non-exists run requested

            Compare: https://github.com/jenkinsci/jenkins/compare/0846358bf627...511ccf0c8366

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/cli/SetBuildDescriptionCommand.java http://jenkins-ci.org/commit/jenkins/511ccf0c836651d1d825c062d7d42338438c735c Log: Merge pull request #2230 from pjanouse/ JENKINS-33942 [FIX JENKINS-33942] Fixed NPE when non-exists run requested Compare: https://github.com/jenkinsci/jenkins/compare/0846358bf627...511ccf0c8366
            Hide
            pfalcon Paul Sokolovsky added a comment -

            Thanks for quick turnaround!

            Show
            pfalcon Paul Sokolovsky added a comment - Thanks for quick turnaround!
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4549
            JENKINS-33942 Fixed NPE when non-exists run requested (Revision 575c1af489a43a6bc1846ca46864e5d4931e47e3)

            Result = SUCCESS
            pjanouse : 575c1af489a43a6bc1846ca46864e5d4931e47e3
            Files :

            • core/src/main/java/hudson/cli/SetBuildDescriptionCommand.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4549 JENKINS-33942 Fixed NPE when non-exists run requested (Revision 575c1af489a43a6bc1846ca46864e5d4931e47e3) Result = SUCCESS pjanouse : 575c1af489a43a6bc1846ca46864e5d4931e47e3 Files : core/src/main/java/hudson/cli/SetBuildDescriptionCommand.java

              People

              • Assignee:
                pajasoft Pavel Janoušek
                Reporter:
                pfalcon Paul Sokolovsky
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: