jenkinsci / jenkinsci/git-plugin

[JENKINS-32436] Polling SCM results in infinite builds after pushing changes on GITLab repository

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

Description

We have a project that get code from GITLab repository, performs build and then pushes back updates on the same branch. The push is done with a specific user and we add this user to the list of "Polling ignore commits from certain users".

We added also a push web-hook to the Gitlab project that uses a URL similar to this one described in Git Plugin to trigger the job SCM Poll:

http://yourserver/git/notifyCommit?url=

After pushing an update with a normal user the web-hook is triggered and the poll starts and the job builds, the job then pushes the results back to the branch, after which the job is triggered again, but sometimes the polling log is shown correctly and sometimes the polling log not showing.

When the polling log shows correctly, the excluded user filter is applied, but if the polling log does not appear the excluded user filter is not applied and then the building enter in an infinite loop since it continue pushing updates and the same state persists (poll log does not show any text although the build appears to be "Started by an SCM change")

---
Originally reported by ayaserry, imported from: Polling SCM results in infinite builds after pushing changes on GITLab repository


  • status: Open
  • priority: Blocker
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 2
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

We have a project that get code from GITLab repository, performs build and then pushes back updates on the same branch. The push is done with a specific user and we add this user to the list of "Polling ignore commits from certain users".

We added also a push web-hook to the Gitlab project that uses a URL similar to this one described in Git Plugin to trigger the job SCM Poll:
http://yourserver/git/notifyCommit?url=<URL of the Git repository>

After pushing an update with a normal user the web-hook is triggered and the poll starts and the job builds, the job then pushes the results back to the branch, after which the job is triggered again, but sometimes the polling log is shown correctly and sometimes the polling log not showing.

When the polling log shows correctly, the excluded user filter is applied, but if the polling log does not appear the excluded user filter is not applied and then the building enter in an infinite loop since it continue pushing updates and the same state persists (poll log does not show any text although the build appears to be "Started by an SCM change")


environment

```
Jenkins 1.638

Git plugin 2.4.0

Java 1.7.0_65-b19
```

2 attachments

- [1.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/31614/1.png)
> ![1.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/31614/1.png)
- [2.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/31613/2.png)
> ![2.png](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/31613/2.png)

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.