-
Bug
-
Resolution: Fixed
-
Major
-
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:
- 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.
- is related to
-
JENKINS-32218 buildsByBranchName is not set anymore
-
- Closed
-
-
JENKINS-19022 GIT Plugin (any version) heavily bloats memory use and size of build.xml with "BuildData" fields
-
- Open
-
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/be1890377a4623be9483e6b70df22cd8da2f7616
Log:
[Fix JENKINS-29482] Don't hide build history when prune stale branches is on
Reverts "prune deleted branches from BuildData to avoid growing memory consumption"
This reverts the bulk of commit 163e60fccd5a08199efd7d85b0b351c6e950c2f7.
The two test cases which were added are still retained, though it is odd
that they are unaffected by reverting the change to the production code.
As far as I can tell, the BuildData.purgeStaleBranches method was not
called by any test, even though it seems it should have been called.