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

Prune stale branches prevents git plugin change history display

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • git plugin 2.3.6 pre-release (pre-release for git 2.4.0)
      git client plugin 1.18.0 pre-release

      A git SCM based job will stop showing changes (both "Recent Changes" and "Changes") if "Prune stale remote-tracking branches" is enabled. It will resume showing changes if the "Prune stake remote-tracking branches is removed from the job definition.

      It appears that a new method "purgeStaleBranches" was added to the git plugin in March 2015 . It is purging a branch named "refs/remotes/origin/master" even though that is the only branch defined in the job.

      To duplicate the problem:

      1. Start Jenkins
      2. Install pre-release git client plugin
      3. Install pre-release git plugin
      4. Configure a new job with Git SCM as source control
      5. Configure the job to poll SCM frequently (once a minute)
      6. Run the job once, confirm no history is shown
      7. Commit a change to the repository that job is tracking
      8. Wait for polling to detect the change, confirm history is shown
      9. Reconfigure job to add "Prune stale remote-tracking branches"
      10. Commit a change to the repository that job is tracking
      11. Wait for polling to detect the change, confirm history is shown
      12. Commit another change to the repository that job is tracking
      13. Wait for polling to detect the change, confirm history is NOT shown

      Once history is not being shown, it will continue to not be shown, even though the polling log and the build status page shows that the job was started by an SCM change.

      If the "Prune stale remote-tracking branches" setting is removed, then two builds later the job will begin showing history again.

        1. Selection_046.png
          Selection_046.png
          22 kB
        2. Selection_045.png
          Selection_045.png
          15 kB
        3. Selection_044.png
          Selection_044.png
          48 kB
        4. Selection_043.png
          Selection_043.png
          86 kB
        5. Selection_042.png
          Selection_042.png
          45 kB

          [JENKINS-29482] Prune stale branches prevents git plugin change history display

          Mark Waite created issue -
          Mark Waite made changes -
          Description Original: A git SCM based job will stop showing changes (both "Recent Changes" and "Changes") if "Prune stale remote-tracking branches" is enabled. It will resume showing changes if the "Prune stake remote-tracking branches is removed from the job definition.

          It appears that a new method "purgeStaleBranches" was added to the git plugin in commit 163e60fccd5a08199efd7d85b0b351c6e950c2f7 . It is purging a branch named "refs/remotes/origin/master" even though that is the only branch defined in the job.

          To duplicate the problem:
          # Start Jenkins
          # Install pre-release git client plugin
          # Install pre-release git plugin
          # Configure a new job with Git SCM as source control
          # Configure the job to poll SCM frequently (once a minute)
          # Run the job once
          # Commit a change to the repository that job is tracking
          # Wait for change polling to detect the change
          # Confirm that the bug exists - no change is listed, even though the change was started by an SCM change
          New: A git SCM based job will stop showing changes (both "Recent Changes" and "Changes") if "Prune stale remote-tracking branches" is enabled. It will resume showing changes if the "Prune stake remote-tracking branches is removed from the job definition.

          It appears that a new method "purgeStaleBranches" was added to the [git plugin in March 2015|https://github.com/jenkinsci/git-plugin/commit/163e60fccd5a08199efd7d85b0b351c6e950c2f7] . It is purging a branch named "refs/remotes/origin/master" even though that is the only branch defined in the job.

          To duplicate the problem:
          # Start Jenkins
          # Install pre-release git client plugin
          # Install pre-release git plugin
          # Configure a new job with Git SCM as source control
          # Configure the job to poll SCM frequently (once a minute)
          # Run the job once
          # Commit a change to the repository that job is tracking
          # Wait for change polling to detect the change
          # Confirm that the bug exists - no change is listed, even though the change was started by an SCM change
          Mark Waite made changes -
          Description Original: A git SCM based job will stop showing changes (both "Recent Changes" and "Changes") if "Prune stale remote-tracking branches" is enabled. It will resume showing changes if the "Prune stake remote-tracking branches is removed from the job definition.

          It appears that a new method "purgeStaleBranches" was added to the [git plugin in March 2015|https://github.com/jenkinsci/git-plugin/commit/163e60fccd5a08199efd7d85b0b351c6e950c2f7] . It is purging a branch named "refs/remotes/origin/master" even though that is the only branch defined in the job.

          To duplicate the problem:
          # Start Jenkins
          # Install pre-release git client plugin
          # Install pre-release git plugin
          # Configure a new job with Git SCM as source control
          # Configure the job to poll SCM frequently (once a minute)
          # Run the job once
          # Commit a change to the repository that job is tracking
          # Wait for change polling to detect the change
          # Confirm that the bug exists - no change is listed, even though the change was started by an SCM change
          New: A git SCM based job will stop showing changes (both "Recent Changes" and "Changes") if "Prune stale remote-tracking branches" is enabled. It will resume showing changes if the "Prune stake remote-tracking branches is removed from the job definition.

          It appears that a new method "purgeStaleBranches" was added to the [git plugin in March 2015|https://github.com/jenkinsci/git-plugin/commit/163e60fccd5a08199efd7d85b0b351c6e950c2f7] . It is purging a branch named "refs/remotes/origin/master" even though that is the only branch defined in the job.

          To duplicate the problem:
          # Start Jenkins
          # Install pre-release git client plugin
          # Install pre-release git plugin
          # Configure a new job with Git SCM as source control
          # Configure the job to poll SCM frequently (once a minute)
          # Run the job once, confirm no history is shown
          # Commit a change to the repository that job is tracking
          # Wait for polling to detect the change, confirm history is shown
          # Reconfigure job to add "Prune stale remote-tracking branches"
          # Commit a change to the repository that job is tracking
          # Wait for polling to detect the change, confirm history is shown
          # Commit another change to the repository that job is tracking
          # Wait for polling to detect the change, confirm history is *NOT* shown

          Once history is not being shown, it will continue to not be shown, even though the polling log and the build status page shows that the job was started by an SCM change.

          If the "Prune stale remote-tracking branches" setting is removed, then two builds later the job will begin showing history again.
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Ramin Baradari made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Mark Waite made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ] New: Mark Waite [ markewaite ]
          Mark Waite made changes -
          Status Original: Reopened [ 4 ] New: Open [ 1 ]
          Mark Waite made changes -
          Link New: This issue is related to JENKINS-32218 [ JENKINS-32218 ]
          Mark Waite made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Mark Waite made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            markewaite Mark Waite
            markewaite Mark Waite
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: