jenkinsci / jenkinsci/git-plugin

[JENKINS-67939] SCM Poll always detects changes - Last build did not detect the right revision

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

Description

After we changed the authentication method of our Bitbucket Branch Source Plugin to OAuth2, we discovered that all Build Jobs does not detect the right Revision from the last Build.

This results in an endless loop auf build triggers within the SCM Plugin. I'm not sure, if this is here the right place but I got some Log messages, where we can see, that the last build does not receive the revision from the last build (which is currently running or failed).

Only if there is a "successfull" build, the scm poll does not logger triggering new builds.

Here some Logs from: hudson.plugins.git.util.BuildData Level FINEST:

 

Mar 03, 2022 8:15:12 AM FINEST hudson.plugins.git.util.BuildDatalastBuildRevisionSha1: b5fd154340c91c6a1fddb1660c53fa175736907e does not match sha1:70a7f323f0b867a1075487904ea7482e4e95c566, checking lastBuild.marked

Mar 03, 2022 8:15:12 AM FINEST hudson.plugins.git.util.BuildDatalastBuildMarkedSha1: b5fd154340c91c6a1fddb1660c53fa175736907e does not match sha1:70a7f323f0b867a1075487904ea7482e4e95c566
Mar 03, 2022 8:15:12 AM FINEST hudson.plugins.git.util.BuildDataNo match found in getLastBuild for sha1:70a7f323f0b867a1075487904ea7482e4e95c566, returning null

This is the Output of build #106.

See here the Build History:

In the gaps I disabled the SCM Poll.

All the builds have the following SCM Information:

All the prevois builds are also building the Revision 70a7f32. So the excpected behavior would be, that the git SCM also detects the running and failed built revision (70a.. instead of b5fd - see log) to avoid this infinite loop of build triggers.

Could you help us? Currently we disabled the whole SCM Poll feature

 

---
Originally reported by norbertkoch_v, imported from: SCM Poll always detects changes - Last build did not detect the right revision


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

Raw content of original issue

After we changed the authentication method of our Bitbucket Branch Source Plugin to OAuth2, we discovered that all Build Jobs does not detect the right Revision from the last Build.

This results in an endless loop auf build triggers within the SCM Plugin. I'm not sure, if this is here the right place but I got some Log messages, where we can see, that the last build does not receive the revision from the last build (which is currently running or failed).

Only if there is a "successfull" build, the scm poll does not logger triggering new builds.

Here some Logs from: hudson.plugins.git.util.BuildData Level FINEST:

 



Mar 03, 2022 8:15:12 AM FINEST hudson.plugins.git.util.BuildDatalastBuildRevisionSha1: b5fd154340c91c6a1fddb1660c53fa175736907e does not match sha1:70a7f323f0b867a1075487904ea7482e4e95c566, checking lastBuild.marked

Mar 03, 2022 8:15:12 AM FINEST hudson.plugins.git.util.BuildDatalastBuildMarkedSha1: b5fd154340c91c6a1fddb1660c53fa175736907e does not match sha1:70a7f323f0b867a1075487904ea7482e4e95c566
Mar 03, 2022 8:15:12 AM FINEST hudson.plugins.git.util.BuildDataNo match found in getLastBuild for sha1:70a7f323f0b867a1075487904ea7482e4e95c566, returning null


This is the Output of build #106.

See here the Build History:

In the gaps I disabled the SCM Poll.

All the builds have the following SCM Information:

All the prevois builds are also building the Revision 70a7f32. So the excpected behavior would be, that the git SCM also detects the running and failed built revision (70a.. instead of b5fd - see log) to avoid this infinite loop of build triggers.

Could you help us? Currently we disabled the whole SCM Poll feature

 

environment

```
Jenkins 2.319.2

Relevant Plugins:

Git: 4.10.2

Bitbucket Branch Source: 751.vda_24678a_f781

```

3 attachments

- [image-2022-03-03-08-50-05-865.png](https://issues.jenkins.io/secure/attachment/57376/image-2022-03-03-08-50-05-865.png)
> ![image-2022-03-03-08-50-05-865.png](https://issues.jenkins.io/secure/attachment/57376/image-2022-03-03-08-50-05-865.png)
- [image-2022-03-03-08-54-24-690.png](https://issues.jenkins.io/secure/attachment/57375/image-2022-03-03-08-54-24-690.png)
> ![image-2022-03-03-08-54-24-690.png](https://issues.jenkins.io/secure/attachment/57375/image-2022-03-03-08-54-24-690.png)
- [image-2022-03-03-14-57-41-621.png](https://issues.jenkins.io/secure/attachment/57377/image-2022-03-03-14-57-41-621.png)
> ![image-2022-03-03-14-57-41-621.png](https://issues.jenkins.io/secure/attachment/57377/image-2022-03-03-14-57-41-621.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.