-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Powered by SuggestiMate
Git polling not detecting changes since 1.1.1.
Seems to be related to "Excluded Users" feature.
Reverting to 1.0.7 fixed the issue.
Am getting in the git polling log the following:
Started on Jul 30, 2013 2:21:29 PM Using strategy: Default [poll] Last Built Revision: Revision AAA (origin/master) Fetching changes from the remote Git repositories Fetching upstream changes from origin Polling for changes in Ignored commit BBB: Found excluded author: Build System Done. Took 0.21 sec No changes
BBB is the SHA ID of a new commit that shouldn't be ignored.
- is duplicated by
-
JENKINS-20607 Gerrit trigger caused git plugin polling to not ignore commit from certain users
-
- Open
-
[JENKINS-19001] Git polling not detecting changes since 1.1.1
Same issue here, with the same logs:
Started on Sep 8, 2013 12:07:06 AM
Polling SCM changes on master
Using strategy: Default
[poll] Last Built Revision: Revision 338c0231f863070f3db37a2d2b7dcbec42801426 (origin/integration)
Fetching changes from the remote Git repositories
Fetching upstream changes from origin
Polling for changes in
Ignored commit e7612e9a8d83638c6ab931859fc6850713451301: Found excluded author: Jenkins CI
Done. Took 2.7 sec
No changes
If I look at the repo on github, I can verify that the author of that commit is not Jenkins CI (though the previous few are):
jlmichael authored 24 minutes ago 1 parent fe9a106 commit e7612e9a8d83638c6ab931859fc6850713451301
It's almost like it's considering only the first of perhaps several commits since its last built revision, and if that is from an excluded user, it doesn't check any of the more recent commits.
Does anyone know if this is still an issue with builds > 1.0.7? I've been holding off upgrading because of this problem...
I think this has been fixed in 1.4 and was due to a bug computing changelog. Please reopen if this still occurs
Is this still and issue with 1.4.6.
I am seeing the following with polling while using Jenkins GIT client plugin 1.4.6 after enabling the force remote polling:
FATAL: Failed to fetch from ssh:repository address
hudson.util.IOException2: Failed to fetch from ssh:repository address
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:458)
at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
at hudson.scm.SCM.poll(SCM.java:373)
at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1588)
at hudson.model.AbstractProject._poll(AbstractProject.java:1558)
at hudson.model.AbstractProject.poll(AbstractProject.java:1490)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: hudson.plugins.git.GitException: Failed to fetch from ssh://repository address
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:532)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:456)
... 14 more
Caused by: hudson.plugins.git.GitException: Command "fetch -t ssh://repository address +refs/heads/:refs/remotes/origin/" returned status code 128:
stdout:
stderr: error: cannot run ssh: No such file or directory
fatal: unable to fork
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:187)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
... 5 more
Done. Took 0.21 sec
No changes
If i disable the fast remote polling the error is as follows:
Started on Oct 31, 2013 9:58:50 AM
Using strategy: Default
[poll] Last Built Revision: Revision 3d19a4e40b165ee27b58618ca33ae664a9a3bafd (origin/master)
FATAL: Command "ls-remote -h ssh://repository address" returned status code 128:
stdout:
stderr: error: cannot run ssh: No such file or directory
fatal: unable to fork
hudson.util.IOException2: Command "ls-remote -h ssh://repository address" returned status code 128:
stdout:
stderr: error: cannot run ssh: No such file or directory
fatal: unable to fork
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:458)
at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
at hudson.scm.SCM.poll(SCM.java:373)
at hudson.model.AbstractProject._poll(AbstractProject.java:1567)
at hudson.model.AbstractProject.poll(AbstractProject.java:1490)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: hudson.plugins.git.GitException: Command "ls-remote -h ssh://repository address" returned status code 128:
stdout:
stderr: error: cannot run ssh: No such file or directory
fatal: unable to fork
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1297)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:488)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:456)
... 13 more
Done. Took 85 ms
No changes
It seems I had a slightly different problem.
The git plugin didn't exclude commits done by jenkins, which is what I wanted.
I had to use "Force polling using workspace" feature to make it ignore commits done by jenkins, after upgrade to newer version.
Didn't seems obvious to me, that it should be needed. Going through the code it would never reach the isRevExcluded method.
It would always return from within if statement
// fast remote polling needs a single branch and an existing last build if (getExtensions().get(DisableRemotePoll.class)==null && singleBranch != null && buildData.lastBuild != null && buildData.lastBuild.getMarked() != null) {
Code changed in jenkins
User: Nicolas De Loof
Path:
src/main/java/hudson/plugins/git/GitSCM.java
src/main/java/hudson/plugins/git/extensions/GitSCMExtension.java
src/main/java/hudson/plugins/git/extensions/impl/AuthorInChangelog.java
src/main/java/hudson/plugins/git/extensions/impl/DisableRemotePoll.java
src/main/java/hudson/plugins/git/extensions/impl/PathRestriction.java
src/main/java/hudson/plugins/git/extensions/impl/UserExclusion.java
src/main/java/hudson/plugins/git/util/BuildChooser.java
src/main/java/hudson/plugins/git/util/DefaultBuildChooser.java
http://jenkins-ci.org/commit/git-plugin/d8338ce4bca957a555a8dd02e9681550ce3f4566
Log:
[FIXED JENKINS-19001] extension can declare requirement for a workspace during polling
Code changed in jenkins
User: Jacob Keller
Path:
src/main/java/hudson/plugins/git/extensions/impl/AuthorInChangelog.java
http://jenkins-ci.org/commit/git-plugin/04152e98a19da6c43658a22c3f3340a26ac2fb49
Log:
using author in the changelog should not require workspace polling
Commit d8338ce4bca9 ("[FIXED JENKINS-19001] extension can declare
requirement for a workspace during polling", 2014-03-06) appears to have
accidentally set the workspace to poll whenever AuthorInChangelog is
used.
The extension only modifies two things, (a) the changelog parser which
should not depend on polling and (b) the check for user exclusion in
isRevExcluded.
One might consider that the second case does depend on polling, however
it is only triggered in the case where the UserExclude extension is
enabled! Thus, we should not need to poll when only using the
AuthorInChangelog extension.
It appears this functionality should already be tested by
testAuthorOrComitterTrue() in GitSCMTest.java.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
We get the same with following log:
Started on Aug 12, 2013 9:21:51 PM Polling SCM changes on master Using strategy: Default [poll] Last Built Revision: Revision 730e90c26c960e878b4497ac1821061cf68f0166 (origin/master) Fetching changes from the remote Git repositories Fetching upstream changes from origin Polling for changes in Ignored commit 4fd36ecb850160d3f39f32ced3100deb1a42b043: Found excluded author: jenkins Done. Took 2.4 sec No changes