-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: workflow-cps-plugin
-
None
-
Environment:Jenkins 2.426.1 LTS, all plugins up-to-date
I have "SCM checkout retry count" set as 3 in the Jenkins settings:
And while I can confirm that this configuration is indeed being honored by the initial checkout, it is not being honored for the second automatic checkout that happens inside the agent when it is allocated.
There, it simply tries once and does not retry if it fails.
Logs for the second checkout, where you can see that not retry happened:
[Pipeline] {
10:15:06 [Pipeline] stage
10:15:06 [Pipeline] { (Declarative: Checkout SCM)
10:15:08 [Pipeline] checkout
10:15:08 The recommended git tool is: NONE
10:15:11 using credential bsscicd
10:15:12 Cloning the remote Git repository
10:15:12 Using shallow clone with depth 2
10:15:12 Avoid fetching tags
10:15:12 Honoring refspec on initial clone
10:15:12 Cloning repository https://<hidden>
10:15:12 > git init /home/jenkins/agent/workspace/<hidden> # timeout=10
10:15:12 Fetching upstream changes from https://<hidden>
10:15:12 > git --version # timeout=10
10:15:12 > git --version # 'git version 2.43.0'
10:15:12 using GIT_ASKPASS to set credentials
10:15:12 > git fetch --no-tags --force --progress --depth=2 -- https://<hidden> refs/changes/78/16653678/25 # timeout=10
10:15:13 ERROR: Error cloning remote repo 'origin'
10:15:13 hudson.plugins.git.GitException: Command "git fetch --no-tags --force --progress --depth=2 -- https://<hidden>refs/changes/78/16653678/25" returned status code 128:
10:15:13 stdout:
10:15:13 stderr: fatal: couldn't find remote ref refs/changes/78/16653678/25
10:15:13
10:15:13 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2842)
10:15:13 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)
10:15:13 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)
10:15:13 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:871)
10:15:13 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:170)
10:15:13 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
10:15:13 at hudson.remoting.UserRequest.perform(UserRequest.java:211)
10:15:13 at hudson.remoting.UserRequest.perform(UserRequest.java:54)
10:15:13 at hudson.remoting.Request$2.run(Request.java:377)
10:15:13 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
10:15:13 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
10:15:13 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
10:15:13 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
10:15:13 at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:137)
10:15:13 at java.base/java.lang.Thread.run(Thread.java:829)
10:15:13 Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to medium-high-karrer001-frnfs
10:15:13 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1787)
10:15:13 at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
10:15:13 at hudson.remoting.Channel.call(Channel.java:1003)
10:15:13 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:153)
10:15:13 at jdk.internal.reflect.GeneratedMethodAccessor1653.invoke(Unknown Source)
10:15:13 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
10:15:13 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
10:15:13 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:138)
10:15:13 at com.sun.proxy.$Proxy162.execute(Unknown Source)
10:15:13 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1222)
10:15:13 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1305)
10:15:13 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
10:15:13 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
10:15:13 at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
10:15:13 at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
10:15:13 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
10:15:13 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
10:15:13 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
10:15:13 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
10:15:13 ... 1 more
10:15:14 [Pipeline] }
10:15:15 [Pipeline] // stage
10:15:15 [Pipeline] }
10:15:16 [Pipeline] // node
10:15:16 [Pipeline] stage
10:15:16 [Pipeline] { (Declarative: Post Actions)
10:15:17 [Pipeline] script
10:15:17 [Pipeline] {
10:15:17 [Pipeline] }
10:15:19 [Pipeline] // script
10:15:19 [Pipeline] }
10:15:20 [Pipeline] // stage
10:15:20 [Pipeline] End of Pipeline
10:15:21 ERROR: Error cloning remote repo 'origin'
10:15:21 Finished: FAILURE
- relates to
-
JENKINS-39194 Honor SCM checkout retry count from CpsScmFlowDefinition
-
- Resolved
-
- links to