`circleci local execute` checkout step is insanely slow

Here’s my config.yml:

version: 2

jobs:
  noop:
    docker:
      - image: ubuntu:18.04
    steps:
      - checkout

workflows:
  version: 2
  poop:
    jobs:
      - noop

And here’s what happens when I try to run it with circleci local execute:

$ time circleci local execute --job noop
Docker image digest: sha256:3d88cfffd448da07ff8ced22ccdca5adc09ff18e87dc7db9b8af5b8a47647c08
====>> Spin up Environment
Build-agent version 0.1.750-336e0196 (2018-09-13T19:48:06+0000)
Starting container ubuntu:18.04
  using image ubuntu@sha256:6d0e0c26489e33f5a6f0020edface2727db9489744ecc9b4f50c7fa671f23c49

Using build environment variables:
  BASH_ENV=/tmp/.bash_env-localbuild-1542960972
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=touch-me
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=noop
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=https://github.com/drshrey/kumo.git
  CIRCLE_SHA1=a57a0fae406989cb92e624520f520336b80aec46
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1542960972
  CIRCLE_WORKING_DIRECTORY=~/project

====>> Checkout code
  #!/bin/bash -eo pipefail
mkdir -p /root/project && cp -r /tmp/_circleci_local_build_repo/. /root/project
Success!

real	8m3.132s
user	0m0.083s
sys	0m0.086s

What the heck is taking 8 minutes!?? I’m on macOS 10.14 with Docker version 18.09.0, build 4d60db4,

1 Like

I am having the same issue. Unfortunately my repo is about 500+ meg. The sad thing is I can upload it to github, and download it to another machine faster than I can get it into a container on my mac.

Hi Mathew and Samuela,

Since this is the local CLI it uses standard git under the hood, so this is going to be something local.

The repo is here https://github.com/CircleCI-Public/circleci-cli and open-source. I’m not aware of anything that would cause it to be slow, though. :thinking:

This bit of the output leads me to believe that it’s cp’ing instead of using git. Am I misunderstanding something? How exactly does the local checkout process work under the hood?

I think we’ve made some changes since then.

Can you try upgrading to the latest version and see if that improved things? https://circleci.com/docs/2.0/local-cli/#updating-the-legacy-cli

Checking to see if there’s any update on this issue.
I’m seeing the same here with the latest circleci.

% circleci version
0.1.15108+272a716 (homebrew)

Running locally with a very small repo, the checkout step takes a very long time (multiple minutes). Making it extremely unproductive to work with.