jenkinsci / jenkinsci/git-plugin
[JENKINS-43468] git-plugin 3.2.0 Build triggered on the same revision repeatedly
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
As of v3.2.0 of git-plugin, I noticed that all my build job with Poll SCM enabled started triggering at regular intervals regardless of whether there was a new commit or not. In other words, the builds were being triggered on exactly same revision, which was not happening on v3.1.0. So this might by a regression!
Polling Log
View as plain text
This page captures the polling log that triggered this build.
Started on Apr 7, 2017 5:46:00 PM
Using strategy: Default
[poll] Last Built Revision: Revision fd8305fe99b7a72fe7b1b375504575a888afa371 (origin/master)
using GIT_SSH to set credentials mygituser-creds
> git ls-remote -h git@github.com:myorg/appRepo.git # timeout=10
Found 13 remote heads on git@github.com:myorg/appRepo.git
[poll] Latest remote head revision on refs/heads/master is: fd8305fe99b7a72fe7b1b375504575a888afa371 - already built by 4
Using strategy: Default
using GIT_SSH to set credentials mygituser-creds
> git ls-remote -h git@github.com:myorg/appRepo # timeout=10
Found 13 remote heads on git@github.com:myorg/appRepo
[poll] Latest remote head revision on refs/heads/master is: fd8305fe99b7a72fe7b1b375504575a888afa371
Done. Took 4.5 sec
Changes found
As can be seen above in the polling log, git-plugin concludes that "Changes found" even though "Last Built Revision" and "Latest remote head revision" are exactly the same.
I only see this behaviour on v3.2.0.
As workaround, I've had to downgrade git-plugin to v3.1.0.
---
Originally reported by ogonna, imported from: git-plugin 3.2.0 Build triggered on the same revision repeatedly
Raw content of original issue
As of v3.2.0 of git-plugin, I noticed that all my build job with Poll SCM enabled started triggering at regular intervals regardless of whether there was a new commit or not. In other words, the builds were being triggered on exactly same revision, which was not happening on v3.1.0. So this might by a regression!
Polling Log
View as plain text
This page captures the polling log that triggered this build.
Started on Apr 7, 2017 5:46:00 PM
Using strategy: Default
[poll] Last Built Revision: Revision fd8305fe99b7a72fe7b1b375504575a888afa371 (origin/master)
using GIT_SSH to set credentials mygituser-creds
> git ls-remote -h git@github.com:myorg/appRepo.git # timeout=10
Found 13 remote heads on git@github.com:myorg/appRepo.git
[poll] Latest remote head revision on refs/heads/master is: fd8305fe99b7a72fe7b1b375504575a888afa371 - already built by 4
Using strategy: Default
using GIT_SSH to set credentials mygituser-creds
> git ls-remote -h git@github.com:myorg/appRepo # timeout=10
Found 13 remote heads on git@github.com:myorg/appRepo
[poll] Latest remote head revision on refs/heads/master is: fd8305fe99b7a72fe7b1b375504575a888afa371
Done. Took 4.5 sec
Changes found
As can be seen above in the polling log, git-plugin concludes that "Changes found" even though "Last Built Revision" and "Latest remote head revision" are exactly the same.
I only see this behaviour on v3.2.0.
As workaround, I've had to downgrade git-plugin to v3.1.0.
2 attachments
- [plugins-list.txt](https://issues.jenkins.io/secure/attachment/37011/plugins-list.txt)
- [sample-Jenkinsfile](https://issues.jenkins.io/secure/attachment/37012/sample-Jenkinsfile)
Contributor guide
Assessment
This issue has not been assessed yet.