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

buildsByBranchName is not set anymore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      git-plugin 2.4.1
      Jenkins 1.643
    • Similar Issues:

      Description

      I noticed that GIT_PREVIOUS_SUCCESSFUL_COMMIT was not set anymore on the Job that only builds our master branch. After some digging I found out that since the upgrade from the previous version (I can't find which version that was, is that stored somewhere?) the buildsByBranchName variable in any `build.xml` is not set anymore (it's empty). It is set in other jobs we have, just not this one.

      This env is critical for us, so I'm going to try to rollback. I'm glad to help track down this problem if possible.

        Attachments

          Issue Links

            Activity

            Hide
            jeysaba Jey Saba added a comment -

            I'm also experiencing the issue of commit changes not being set for each build. Like others here, I am seeing the problem only in some of the jobs on my server.

            I've narrowed down the issue to the inclusion of the Prune stale remote-tracking branches option in Additional Behaviours.

            I can also confirm that I started seeing this symptom after upgrading from 2.4.0 to 2.4.1, running Jenkins 1.625.3 LTS.

            Show
            jeysaba Jey Saba added a comment - I'm also experiencing the issue of commit changes not being set for each build. Like others here, I am seeing the problem only in some of the jobs on my server. I've narrowed down the issue to the inclusion of the Prune stale remote-tracking branches option in Additional Behaviours. I can also confirm that I started seeing this symptom after upgrading from 2.4.0 to 2.4.1, running Jenkins 1.625.3 LTS.
            Hide
            markewaite Mark Waite added a comment -

            I found that reverting c1872d from the git plugin resolves this bug and JENKINS-29482. I'll need to work with @ndeloof to see if there is another way to include that improvement without breaking plugin changelog when pruning stale branches.

            Show
            markewaite Mark Waite added a comment - I found that reverting c1872d from the git plugin resolves this bug and JENKINS-29482 . I'll need to work with @ndeloof to see if there is another way to include that improvement without breaking plugin changelog when pruning stale branches.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Mark Waite
            Path:
            src/main/java/hudson/plugins/git/extensions/impl/PruneStaleBranch.java
            src/main/java/hudson/plugins/git/util/BuildData.java
            http://jenkins-ci.org/commit/git-plugin/336c1787c7b967e4220c4d459092397fda29892a
            Log:
            [Fix JENKINS-29482] Don't prune stale branches from BuildData

            This reverts commit c1872d038cc2f584bafbc375744deb54a1dbe316.

            Git plugin 2.4.1 included c1872d0 which regressed the plugin and
            introduced JENKINS-32218

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/extensions/impl/PruneStaleBranch.java src/main/java/hudson/plugins/git/util/BuildData.java http://jenkins-ci.org/commit/git-plugin/336c1787c7b967e4220c4d459092397fda29892a Log: [Fix JENKINS-29482] Don't prune stale branches from BuildData This reverts commit c1872d038cc2f584bafbc375744deb54a1dbe316. Git plugin 2.4.1 included c1872d0 which regressed the plugin and introduced JENKINS-32218
            Hide
            markewaite Mark Waite added a comment -

            Fixed in git plugin 2.4.2, released 2 Feb 2016

            Show
            markewaite Mark Waite added a comment - Fixed in git plugin 2.4.2, released 2 Feb 2016
            Hide
            alexnederlof Alex Nederlof added a comment -

            Thanks Mark!

            Show
            alexnederlof Alex Nederlof added a comment - Thanks Mark!

              People

              • Assignee:
                markewaite Mark Waite
                Reporter:
                alexnederlof Alex Nederlof
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: