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

NPE with 1.14.1 release

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jenkins stable release
      Github plugins 1.14.1

      Running a build with the set build status in build step (and the post-build had another status setter), resulted in the following:

      14:38:58 ERROR: Build step failed with exception
      14:38:58 java.lang.NullPointerException
      14:38:58 	at com.cloudbees.jenkins.GitHubSetCommitStatusBuilder.perform(GitHubSetCommitStatusBuilder.java:52)
      14:38:58 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      14:38:58 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      14:38:58 	at hudson.model.Build$BuildExecution.build(Build.java:205)
      14:38:58 	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
      14:38:58 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
      14:38:58 	at hudson.model.Run.execute(Run.java:1741)
      14:38:58 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      14:38:58 	at hudson.model.ResourceController.execute(ResourceController.java:98)
      14:38:58 	at hudson.model.Executor.run(Executor.java:408)
      14:38:58 Build step 'Set build status to "pending" on GitHub commit' marked build as failure
      14:38:59 Skipped archiving because build is not successful
      14:38:59 ERROR: Build step failed with exception
      14:38:59 java.lang.NullPointerException
      14:38:59 	at com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus(GitHubCommitNotifier.java:127)
      14:38:59 	at com.cloudbees.jenkins.GitHubCommitNotifier.perform(GitHubCommitNotifier.java:105)
      14:38:59 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      14:38:59 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      14:38:59 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
      14:38:59 	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      14:38:59 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
      14:38:59 	at hudson.model.Run.execute(Run.java:1766)
      14:38:59 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      14:38:59 	at hudson.model.ResourceController.execute(ResourceController.java:98)
      14:38:59 	at hudson.model.Executor.run(Executor.java:408)
      14:38:59 Build step 'Set build status on GitHub commit' marked build as failure
      

        Attachments

          Activity

          Hide
          seadub Chris Williams added a comment -

          I'm seeing the same thing, though I think the version number is written incorrectly here. It's 1.14.1.

          Show
          seadub Chris Williams added a comment - I'm seeing the same thing, though I think the version number is written incorrectly here. It's 1.14.1.
          Hide
          intel352 Jonathan Langevin added a comment -

          Chris Williams, you're correct, thanks for catching my version # gaffe.

          Show
          intel352 Jonathan Langevin added a comment - Chris Williams , you're correct, thanks for catching my version # gaffe.
          Hide
          intel352 Jonathan Langevin added a comment -

          A helpful user that doesn't have an account on this Jira board just yet (name is Zach McCormick) gave me this feedback on the bug:

          It looks like the 1.14.1 changelog says that it introduced a new field
          "build context". I figure that they aren't doing a null check when
          loading settings, so all jobs that used the commit status setter
          before don't have the buildContext field (or whatever it's called) but
          the code is trying to access it anyway.

          I opened up the job in question on our Jenkins server, clicked
          "Advanced", then put a dummy string in then removed it, and saved the
          job, and it no longer NPEs on that particular job.

          Probably something they should patch in 1.14.2.

          screenshot: https://cloudup.com/cinvClUXrUq

          I tried to register for the Jenkins issue tracker but they aren't
          accepting new users due to anti-spam right now :-/

          Figured I'd relay this to you so that you can add some context and a
          workaround on the issue

          Thanks!

          Zach

          Show
          intel352 Jonathan Langevin added a comment - A helpful user that doesn't have an account on this Jira board just yet (name is Zach McCormick) gave me this feedback on the bug: It looks like the 1.14.1 changelog says that it introduced a new field "build context". I figure that they aren't doing a null check when loading settings, so all jobs that used the commit status setter before don't have the buildContext field (or whatever it's called) but the code is trying to access it anyway. I opened up the job in question on our Jenkins server, clicked "Advanced", then put a dummy string in then removed it, and saved the job, and it no longer NPEs on that particular job. Probably something they should patch in 1.14.2. screenshot: https://cloudup.com/cinvClUXrUq I tried to register for the Jenkins issue tracker but they aren't accepting new users due to anti-spam right now :-/ Figured I'd relay this to you so that you can add some context and a workaround on the issue Thanks! Zach
          Hide
          lanwen Kirill Merkushev added a comment -

          Thanks for report. Will fix it in a few hours. Forogot about deserialization rules in jenkins

          Show
          lanwen Kirill Merkushev added a comment - Thanks for report. Will fix it in a few hours. Forogot about deserialization rules in jenkins
          Hide
          lanwen Kirill Merkushev added a comment -
          Show
          lanwen Kirill Merkushev added a comment - https://github.com/jenkinsci/github-plugin/pull/103 Will release ASAP
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kirill Merkushev
          Path:
          src/main/java/com/cloudbees/jenkins/GitHubCommitNotifier.java
          src/main/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilder.java
          http://jenkins-ci.org/commit/github-plugin/57d7870f7a170f9b7ae772b3ccc107554cbf6269
          Log:
          [FIXES JENKINS-32132] Check status message is null (in case of wrong deserialization)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kirill Merkushev Path: src/main/java/com/cloudbees/jenkins/GitHubCommitNotifier.java src/main/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilder.java http://jenkins-ci.org/commit/github-plugin/57d7870f7a170f9b7ae772b3ccc107554cbf6269 Log: [FIXES JENKINS-32132] Check status message is null (in case of wrong deserialization)
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Merkushev Kirill
          Path:
          src/main/java/com/cloudbees/jenkins/GitHubCommitNotifier.java
          src/main/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilder.java
          http://jenkins-ci.org/commit/github-plugin/2c193b499b29cda7723e46329d9c2c57fe73adc9
          Log:
          Merge pull request #103 from lanwen/fix_JENKINS-32132

          [FIXES JENKINS-32132] Check status message is null (in case of wrong …

          Compare: https://github.com/jenkinsci/github-plugin/compare/c8af6ec5af5f...2c193b499b29

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Merkushev Kirill Path: src/main/java/com/cloudbees/jenkins/GitHubCommitNotifier.java src/main/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilder.java http://jenkins-ci.org/commit/github-plugin/2c193b499b29cda7723e46329d9c2c57fe73adc9 Log: Merge pull request #103 from lanwen/fix_ JENKINS-32132 [FIXES JENKINS-32132] Check status message is null (in case of wrong … Compare: https://github.com/jenkinsci/github-plugin/compare/c8af6ec5af5f...2c193b499b29
          Hide
          lanwen Kirill Merkushev added a comment -

          released as 1.14.2
          (should be available for download after some delay)

          Show
          lanwen Kirill Merkushev added a comment - released as 1.14.2 (should be available for download after some delay)
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kirill Merkushev
          Path:
          src/test/java/com/cloudbees/jenkins/GitHubCommitNotifierTest.java
          src/test/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest.java
          src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java
          src/test/java/org/jenkinsci/plugins/github/internal/GitHubClientCacheCleanupTest.java
          src/test/java/org/jenkinsci/plugins/github/test/GHMockRule.java
          src/test/java/org/jenkinsci/plugins/github/test/InjectJenkinsMembersRule.java
          src/test/resources/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest/shouldLoadNullStatusMessage/config.xml
          src/test/resources/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest/shouldLoadNullStatusMessage/jobs/step/config.xml
          src/test/resources/log4j.properties
          src/test/resources/org/jenkinsci/plugins/github/internal/GitHubClientCacheCleanupTest/user.json
          src/test/resources/org/jenkinsci/plugins/github/test/GHMockRule/repos-repo.json
          src/test/resources/org/jenkinsci/plugins/github/test/GHMockRule/user.json
          http://jenkins-ci.org/commit/github-plugin/4024d6249812fb76cf98fca4bb04098ff47e834e
          Log:
          Test for JENKINS-32132 with rule to mock GH

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kirill Merkushev Path: src/test/java/com/cloudbees/jenkins/GitHubCommitNotifierTest.java src/test/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest.java src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java src/test/java/org/jenkinsci/plugins/github/internal/GitHubClientCacheCleanupTest.java src/test/java/org/jenkinsci/plugins/github/test/GHMockRule.java src/test/java/org/jenkinsci/plugins/github/test/InjectJenkinsMembersRule.java src/test/resources/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest/shouldLoadNullStatusMessage/config.xml src/test/resources/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest/shouldLoadNullStatusMessage/jobs/step/config.xml src/test/resources/log4j.properties src/test/resources/org/jenkinsci/plugins/github/internal/GitHubClientCacheCleanupTest/user.json src/test/resources/org/jenkinsci/plugins/github/test/GHMockRule/repos-repo.json src/test/resources/org/jenkinsci/plugins/github/test/GHMockRule/user.json http://jenkins-ci.org/commit/github-plugin/4024d6249812fb76cf98fca4bb04098ff47e834e Log: Test for JENKINS-32132 with rule to mock GH
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Merkushev Kirill
          Path:
          src/test/java/com/cloudbees/jenkins/GitHubCommitNotifierTest.java
          src/test/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest.java
          src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java
          src/test/java/org/jenkinsci/plugins/github/internal/GitHubClientCacheCleanupTest.java
          src/test/java/org/jenkinsci/plugins/github/test/GHMockRule.java
          src/test/java/org/jenkinsci/plugins/github/test/InjectJenkinsMembersRule.java
          src/test/resources/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest/shouldLoadNullStatusMessage/config.xml
          src/test/resources/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest/shouldLoadNullStatusMessage/jobs/step/config.xml
          src/test/resources/log4j.properties
          src/test/resources/org/jenkinsci/plugins/github/internal/GitHubClientCacheCleanupTest/user.json
          src/test/resources/org/jenkinsci/plugins/github/test/GHMockRule/repos-repo.json
          src/test/resources/org/jenkinsci/plugins/github/test/GHMockRule/user.json
          http://jenkins-ci.org/commit/github-plugin/5e14ccae9de8c0ba5226ac4008f05c6f7bbd0a79
          Log:
          Merge pull request #104 from lanwen/JENKINS-32132_tests

          Test for JENKINS-32132 with rule to mock GH

          Compare: https://github.com/jenkinsci/github-plugin/compare/4197fdf14807...5e14ccae9de8

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Merkushev Kirill Path: src/test/java/com/cloudbees/jenkins/GitHubCommitNotifierTest.java src/test/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest.java src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java src/test/java/org/jenkinsci/plugins/github/internal/GitHubClientCacheCleanupTest.java src/test/java/org/jenkinsci/plugins/github/test/GHMockRule.java src/test/java/org/jenkinsci/plugins/github/test/InjectJenkinsMembersRule.java src/test/resources/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest/shouldLoadNullStatusMessage/config.xml src/test/resources/com/cloudbees/jenkins/GitHubSetCommitStatusBuilderTest/shouldLoadNullStatusMessage/jobs/step/config.xml src/test/resources/log4j.properties src/test/resources/org/jenkinsci/plugins/github/internal/GitHubClientCacheCleanupTest/user.json src/test/resources/org/jenkinsci/plugins/github/test/GHMockRule/repos-repo.json src/test/resources/org/jenkinsci/plugins/github/test/GHMockRule/user.json http://jenkins-ci.org/commit/github-plugin/5e14ccae9de8c0ba5226ac4008f05c6f7bbd0a79 Log: Merge pull request #104 from lanwen/ JENKINS-32132 _tests Test for JENKINS-32132 with rule to mock GH Compare: https://github.com/jenkinsci/github-plugin/compare/4197fdf14807...5e14ccae9de8

            People

            Assignee:
            lanwen Kirill Merkushev
            Reporter:
            intel352 Jonathan Langevin
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: