Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47800

Global library modern SCM intermittently fails to fetch

XMLWordPrintable

      We have a library stored in gitlab.com and we're using global libraries plugin with modern SCM selection. We have observed an intermittent failure fetching library from SCM in a random job about once a day.

      Loading library rlib@master
      > git rev-parse --is-inside-work-tree # timeout=10
      Setting origin to https://gitlab.com/test/rlib.git
      > git config remote.origin.url https://gitlab.com/test/rlib.git # timeout=10
      Fetching origin...
      Fetching upstream changes from origin
      > git --version # timeout=10
      using GIT_ASKPASS to set credentials 
      > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
      hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*" returned status code 128:
      stdout: 
      stderr: remote: Not Found
      fatal: repository 'https://gitlab.com/test/rlib.git/' not found
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1877)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1596)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:71)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:348)
      at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:224)
      at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:352)
      at jenkins.scm.api.SCMSource.fetch(SCMSource.java:598)
      at org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever.retrieve(SCMSourceRetriever.java:80)
      at org.jenkinsci.plugins.workflow.libs.LibraryAdder.retrieve(LibraryAdder.java:150)
      at org.jenkinsci.plugins.workflow.libs.LibraryAdder.add(LibraryAdder.java:131)
      at org.jenkinsci.plugins.workflow.libs.LibraryDecorator$1.call(LibraryDecorator.java:114)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1053)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:129)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:123)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:517)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:480)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:238)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:405)
      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: Loading libraries failed
      1 error
      at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1073)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:129)
      at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:123)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:517)
      at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:480)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:238)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:405)
      Finished: FAILURE
      

       

       It would be helpful if we have a re-try mechanism or perhaps a cached library to mitigate our jobs from failing.

            Unassigned Unassigned
            scott_zhong Scott Zhong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: