jenkinsci / jenkinsci/git-plugin

[JENKINS-39621] Pipeline job loop after polling always find changes

Open
#2,986 20 comments 0 reactions 0 assignees View on GitHub
component:git-plugin component:pipeline imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

Hi,

We have a situation where my pipeline job is configured with branch "origin/develop"

I have a master and a tests branches as well.

Configured with polling every 5 minutes.

There's no change in any of the branches and still polling 'detects' one on the system-tests branch...

Polling Log example:

Started on Nov 9, 2016 5:58:00 PM

Using strategy: Default
[poll] Last Built Revision: Revision 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 (refs/remotes/origin/develop)
> /usr/bin/git ls-remote -h ssh://my.git.server/git/test.git # timeout=10
Found 3 remote heads on ssh://my.git.server/git/test.git
[poll] Latest remote head revision on refs/heads/develop is: 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 - already built by 4
Using strategy: Default
[poll] Last Built Revision: Revision 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 (refs/remotes/origin/develop)
> /usr/bin/git ls-remote -h ssh://my.git.server/git/test.git # timeout=10
Found 3 remote heads on ssh://my.git.server/git/test.git
[poll] Latest remote head revision on refs/heads/develop is: 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 - already built by 4
Using strategy: Default
[poll] Last Built Revision: Revision 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 (refs/remotes/origin/develop)
> /usr/bin/git ls-remote -h ssh://my.git.server/git/test.git # timeout=10
Found 3 remote heads on ssh://my.git.server/git/test.git
[poll] Latest remote head revision on refs/heads/develop is: 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 - already built by 4
Using strategy: Default
[poll] Last Built Revision: Revision 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 (refs/remotes/origin/develop)
> /usr/bin/git ls-remote -h ssh://my.git.server/git/test.git # timeout=10
Found 3 remote heads on ssh://my.git.server/git/test.git
[poll] Latest remote head revision on refs/heads/system-tests is: afac68d836bc8dcd31826fbd56cb343cf1daf3b5
Done. Took 0.34 sec
Changes found

I tried recreating the job, test branch... no use...

Appreciate your help here.

Thanks

---
Originally reported by assafl, imported from: Pipeline job loop after polling always find changes


  • status: Open
  • priority: Major
  • component(s): git-plugin, pipeline
  • label(s): git-plugin, triaged-2018-11
  • resolution: Unresolved
  • votes: 8
  • watchers: 17
  • imported: 2025-12-02

Raw content of original issue

Hi,

We have a situation where my pipeline job is configured with branch "origin/develop"
I have a master and a tests branches as well.

Configured with polling every 5 minutes.

There's no change in any of the branches and still polling 'detects' one on the system-tests branch...

Polling Log example:



Started on Nov 9, 2016 5:58:00 PM

Using strategy: Default
[poll] Last Built Revision: Revision 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 (refs/remotes/origin/develop)
> /usr/bin/git ls-remote -h ssh://my.git.server/git/test.git # timeout=10
Found 3 remote heads on ssh://my.git.server/git/test.git
[poll] Latest remote head revision on refs/heads/develop is: 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 - already built by 4
Using strategy: Default
[poll] Last Built Revision: Revision 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 (refs/remotes/origin/develop)
> /usr/bin/git ls-remote -h ssh://my.git.server/git/test.git # timeout=10
Found 3 remote heads on ssh://my.git.server/git/test.git
[poll] Latest remote head revision on refs/heads/develop is: 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 - already built by 4
Using strategy: Default
[poll] Last Built Revision: Revision 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 (refs/remotes/origin/develop)
> /usr/bin/git ls-remote -h ssh://my.git.server/git/test.git # timeout=10
Found 3 remote heads on ssh://my.git.server/git/test.git
[poll] Latest remote head revision on refs/heads/develop is: 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 - already built by 4
Using strategy: Default
[poll] Last Built Revision: Revision 9b3f801b5ce8d6649c25ddd4a573801c9a6b5a23 (refs/remotes/origin/develop)
> /usr/bin/git ls-remote -h ssh://my.git.server/git/test.git # timeout=10
Found 3 remote heads on ssh://my.git.server/git/test.git
[poll] Latest remote head revision on refs/heads/system-tests is: afac68d836bc8dcd31826fbd56cb343cf1daf3b5
Done. Took 0.34 sec
Changes found

I tried recreating the job, test branch... no use...

Appreciate your help here.

Thanks

environment

```
Jenkins 2.7.3

Git Plugin 3.0.0
```

1 attachment

- [gitpolling.log](https://issues.jenkins.io/secure/attachment/36202/gitpolling.log)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.