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

Add retry configuration when fetching from Github

    XMLWordPrintable

Details

    Description

      We frequently see flakes using https://plugins.jenkins.io/git/ to clone our repositories with error like:

      ```
      > git fetch --no-tags --progress git@github.com:<our_org>/<our_repo>.git +refs/heads/:refs/remotes/origin/ # timeout=20ERROR: Error cloning remote repo 'origin'hudson.plugins.git.GitException: Command "git fetch --no-tags --progress git@github.com:<our_org>/<our_repo>.git +refs/heads/:refs/remotes/origin/" returned status code 128:stdout: Process leaked file descriptors. See {}
      https://jenkins.io/redirect/troubleshooting/process-leaked-file-descriptors
      for more informationstderr: remote: Enumerating objects: 760803 {}
      remote: Enumerating objects: 818003, done.remote: Compressing objects: 90% (11503/12781) {}
      {{remote: Compressing objects: 91% (11631/12781) }}
      {{remote: Compressing objects: 92% (11759/12781) }}
      {{remote: Compressing objects: 93% (11887/12781) }}
      {{remote: Compressing objects: 94% (12015/12781) }}
      {{remote: Compressing objects: 95% (12142/12781) }}
      {{remote: Compressing objects: 96% (12270/12781) }}
      {{remote: Compressing objects: 97% (12398/12781) }}
      {{remote: Compressing objects: 98% (12526/12781) }}
      {{remote: Compressing objects: 99% (12654/12781) }}
      {{remote: Compressing objects: 100% (12781/12781) }}
      remote: Compressing objects: 100% (12781/12781), done.fatal: Unable to read current working directory: No such file or directoryfatal: index-pack failedat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:655)at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:144)at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303)at hudson.model.ResourceController.execute(ResourceController.java:97)at hudson.model.Executor.run(Executor.java:429)ERROR: Error cloning remote repo 'origin'ERROR: Maximum checkout retry attempts reached, abortingFinished: FAILURE
      ```

      Is it possible to add retry configurations to deal with flakes like this?

      Attachments

        Activity

          People

            Unassigned Unassigned
            aaron_wang Aaron
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: