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

GitHub Commit Status Setter - Cannot retrieve Git metadata

    Details

    • Similar Issues:

      Description

      Upon upgrading a number of plugins on one of our Jenkins clusters, we observed that builds were failing with the following exceptions:

       

      ERROR: [GitHub Commit Status Setter] - Cannot retrieve Git metadata for the build, setting build result to UNSTABLE
      

       

      Rolling the `GitHub` plugin back from '1.29.3' to '1.29.2' removes the error and builds now function as expected. 

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          Alan Lee the latest release of the GitHub plugin (1.29.3) depends on git plugin 3.4.0 or newer. The GitHub plugin expects the git plugin to write BuildData.

          All releases of git plugin 3.x write BuildData. Git plugin 4.0.0-beta10 (pre-release delivered July 5, 2019) and git plugin 4.0.0-beta11 (pre-release delivered Sep 13, 2019) write BuildData.

          Git plugin 4.0.0-rc (pre-release delivered Jan 30, 2019) does not write BuildData. Git plugin 4.0.0-rc was a failed attempt to resolve the memory bloat caused by the git plugin (JENKINS-19022). The attempt introduced too many incompatibilities and had to be reverted. My sincere apologies that I released git plugin 4.0.0-rc. The poor choice of version string caused it to appear in the Jenkins update center rather than in the Jenkins experimental update center.

          If you are running git plugin 4.0.0-rc and cannot downgrade, then I assume that means some plugin in your installation has declared a dependency on git plugin 4.0.0-rc. That plugin needs to be updated to not depend on git plugin 4.0.0-rc. The BuildData related changes in git plugin 4.0.0-rc are not included in git plugin 4.0.0-beta10 and are not included in git plugin 4.0.0-beta11 and will not be included in the final release of git plugin 4.0.0. The git plugin 4.0.0-rc release was a terrible mistake that I made which delivered pre-release code to the production Jenkins update center. The git plugin 4.0.0-rc release was also the clear proof that the API changes proposed in git plugin 4.0.0 pre-releases introduced too much incompatibility for other plugins that use the BuildData provided by the git plugin.

          If you cannot downgrade because an installed plugin has an explicit dependency on 4.0.0-rc, then you should still be able to upgrade to git plugin 4.0.0-beta11 from the experimental upgrade center. However, if one of your installed plugins truly has a dependency on git plugin 4.0.0-rc, it seems likely that the reason it depends on git plugin 4.0.0-rc is because it is using the API changes that were included in git plugin 4.0.0-rc. Those API changes are not available in newer pre-releases of git plugin 4.0.0 like git plugin 4.0.0-beta10 and git plugin 4.0.0-beta11.

          In summary, if you cannot downgrade because one of your plugins explicitly depends on git plugin 4.0.0-rc, then that plugin must be changed to not depend on git plugin 4.0.0-rc. If you cannot downgrade for some other reason, then you can likely upgrade to git client plugin 3.0.0-beta11 and git plugin 4.0.0-beta11.

          Show
          markewaite Mark Waite added a comment - Alan Lee the latest release of the GitHub plugin (1.29.3) depends on git plugin 3.4.0 or newer . The GitHub plugin expects the git plugin to write BuildData . All releases of git plugin 3.x write BuildData. Git plugin 4.0.0-beta10 (pre-release delivered July 5, 2019) and git plugin 4.0.0-beta11 (pre-release delivered Sep 13, 2019) write BuildData. Git plugin 4.0.0-rc (pre-release delivered Jan 30, 2019) does not write BuildData. Git plugin 4.0.0-rc was a failed attempt to resolve the memory bloat caused by the git plugin ( JENKINS-19022 ). The attempt introduced too many incompatibilities and had to be reverted. My sincere apologies that I released git plugin 4.0.0-rc. The poor choice of version string caused it to appear in the Jenkins update center rather than in the Jenkins experimental update center. If you are running git plugin 4.0.0-rc and cannot downgrade, then I assume that means some plugin in your installation has declared a dependency on git plugin 4.0.0-rc. That plugin needs to be updated to not depend on git plugin 4.0.0-rc. The BuildData related changes in git plugin 4.0.0-rc are not included in git plugin 4.0.0-beta10 and are not included in git plugin 4.0.0-beta11 and will not be included in the final release of git plugin 4.0.0. The git plugin 4.0.0-rc release was a terrible mistake that I made which delivered pre-release code to the production Jenkins update center. The git plugin 4.0.0-rc release was also the clear proof that the API changes proposed in git plugin 4.0.0 pre-releases introduced too much incompatibility for other plugins that use the BuildData provided by the git plugin. If you cannot downgrade because an installed plugin has an explicit dependency on 4.0.0-rc, then you should still be able to upgrade to git plugin 4.0.0-beta11 from the experimental upgrade center. However, if one of your installed plugins truly has a dependency on git plugin 4.0.0-rc, it seems likely that the reason it depends on git plugin 4.0.0-rc is because it is using the API changes that were included in git plugin 4.0.0-rc. Those API changes are not available in newer pre-releases of git plugin 4.0.0 like git plugin 4.0.0-beta10 and git plugin 4.0.0-beta11. In summary, if you cannot downgrade because one of your plugins explicitly depends on git plugin 4.0.0-rc, then that plugin must be changed to not depend on git plugin 4.0.0-rc. If you cannot downgrade for some other reason, then you can likely upgrade to git client plugin 3.0.0-beta11 and git plugin 4.0.0-beta11.
          Hide
          alanthedev Alan Lee added a comment -

          Mark Waite Thanks for a comprehensive summary of the issue. I think what I need is the last paragraph. Will try it out.

          Show
          alanthedev Alan Lee added a comment - Mark Waite Thanks for a comprehensive summary of the issue. I think what I need is the last paragraph. Will try it out.
          Hide
          markewaite Mark Waite added a comment -

          If you have a publicly available plugin that explicitly depends on git plugin 4.0.0-rc (and not on earlier released versions), then the plugin maintainer needs to be notified that 4.0.0-rc is a dead and removed release.

          Show
          markewaite Mark Waite added a comment - If you have a publicly available plugin that explicitly depends on git plugin 4.0.0-rc (and not on earlier released versions), then the plugin maintainer needs to be notified that 4.0.0-rc is a dead and removed release.
          Hide
          bgaillard Baptiste Gaillard added a comment -

          Hi, with the release of Git plugin 4.0.0 it appears to work now (and no more Jenkins crashes after downgrading plugins).

          Here are the steps i followed to fix the problem.

          1. Upgrade Jenkins master to the last version (we use the Blue Ocean Docker container in version 1.21.0)
          2. Execute the following in Manage Jenkins -> Script Console, this allows to identify the Jenkins plugins which depend on version 4.0.0-rc of Git Plugin
             def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins()
            plugins.each {
                println "${it.getShortName()} (${it.getVersion()}) => ${it.getDependencies()}\n"
            }
          3. {{}}Downgrade the plugins with a dependency to Git Plugin 4.0.0-rc
          4. Upgrade Git Plugin to version 4.0.0 and the other plugins which depend on it (most probably those found in step 3.)

          Hope this helps.

          Show
          bgaillard Baptiste Gaillard added a comment - Hi, with the release of Git plugin 4.0.0 it appears to work now (and no more Jenkins crashes after downgrading plugins). Here are the steps i followed to fix the problem. Upgrade Jenkins master to the last version (we use the Blue Ocean Docker container in version 1.21.0) Execute the following in Manage Jenkins -> Script Console, this allows to identify the Jenkins plugins which depend on version 4.0.0-rc of Git Plugin   def plugins = jenkins.model.Jenkins.instance.getPluginManager().getPlugins() plugins.each {     println "${it.getShortName()} (${it.getVersion()}) => ${it.getDependencies()}\n" } {{}}Downgrade the plugins with a dependency to Git Plugin 4.0.0-rc Upgrade Git Plugin to version 4.0.0 and the other plugins which depend on it (most probably those found in step 3.) Hope this helps.
          Hide
          markewaite Mark Waite added a comment -

          Resolved regression in git plugin 4.0.0-rc by releasing git plugin 4.0.0

          Show
          markewaite Mark Waite added a comment - Resolved regression in git plugin 4.0.0-rc by releasing git plugin 4.0.0

            People

            • Assignee:
              lanwen Kirill Merkushev
              Reporter:
              fatmcgav Gavin Williams
            • Votes:
              19 Vote for this issue
              Watchers:
              34 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: