circleci-cli icon indicating copy to clipboard operation
circleci-cli copied to clipboard

Enable Dependency Cache

Open jspri opened this issue 6 years ago • 28 comments

  • [x] I have read Contribution Guidelines.
  • [x] I have checked for similar issues and haven't found anything relevant.
  • [x] This is not a security issue (which should be reported here: https://circleci.com/security/)

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

The dependency cache doesn't work.

Attempts to use it result in

Error: 
Skipping cache - error checking storage: not supported

Step failed

Can you provide an example?

Within config .yml


      - restore_cache:
          name: Restore Go Modules
          keys:
            - go-mod-v1-{{ checksum "./src/go.sum" }}

      - run:
          name: Install Go Modules
          command: cd src && go mod download

      - save_cache:
          name: Cache Go Modules
          key: go-mod-v1-{{ checksum "./src/go.sum" }}
          paths:
            - "/go/pkg/mod"

What is the expected behavior?

Cache should work locally! Local builds could be executed much faster.

An option to clear or skip the cache should be provided. Alternatively this could be an opt in.

The dependencies would take up space on the user's computer but a non-trivial amount of space is already used by the docker images.

Which version of the CLI and OS are you using? Did this work in previous versions?

OSX, latest version.

jspri avatar May 14 '19 04:05 jspri

Facing the same!

crearo avatar Aug 30 '19 12:08 crearo

yes the same freaking error: Skipping cache - error checking storage: not supported

brayanL avatar Sep 25 '19 15:09 brayanL

I got the same! Any progress?

hayata-yamamoto avatar Mar 01 '20 08:03 hayata-yamamoto

+1

mizinsky avatar Mar 02 '20 13:03 mizinsky

+1

ljachymczyk avatar Mar 02 '20 13:03 ljachymczyk

cc @KunalJain

marcomorain avatar Mar 10 '20 13:03 marcomorain

Ubuntu same

a2xchip avatar Mar 11 '20 07:03 a2xchip

Same on macOS 10.15.13

mariana0pachon avatar Mar 17 '20 16:03 mariana0pachon

Getting the same damn error too Error: Skipping cache - error checking storage: not supported

molayodecker avatar Mar 31 '20 03:03 molayodecker

Getting the same error mac os 10.15.14

jordan-paz avatar Apr 07 '20 17:04 jordan-paz

Getting this error mac os 10.15.3

akashDash458 avatar Apr 19 '20 18:04 akashDash458

Getting this error on mac os 10.13.3

ndduc0605 avatar Apr 21 '20 04:04 ndduc0605

Facing the same error.

aakash2610 avatar Jun 12 '20 07:06 aakash2610

mac, same

jelder-digital-stack avatar Jun 25 '20 05:06 jelder-digital-stack

+1, 10.15.4

EdPutans avatar Jul 22 '20 16:07 EdPutans

Same on mac

gsantia avatar Jul 23 '20 17:07 gsantia

Hi all, we are aware of this :) Caching/workspaces are not supported on any platform using the CircleCI CLI at this time.

gmemstr avatar Jul 24 '20 15:07 gmemstr

any update ? :(

jdmaldonado avatar Aug 17 '20 13:08 jdmaldonado

Any update guys?

namdotomosia avatar Sep 30 '20 02:09 namdotomosia

Hi! Any update ?

alycioneto avatar Oct 08 '20 18:10 alycioneto

Same situation for me.

Wellingtonpereira avatar Oct 22 '20 19:10 Wellingtonpereira

Locking this issue until we have more information to share.

gmemstr avatar Oct 23 '20 14:10 gmemstr

There is a potential workaround for this issue depending on your use case. You can pass in -v in the same way you would with the Docker CLI: https://docs.docker.com/storage/volumes

For example:

circleci local execute -v /path/on/local/filesystem:/app/vendor/bundle --job my-build

We have opened this issue back up to give the community a forum to discuss potential workarounds and other ideas for the feature. For those the would like to vote for this issue("+1", etc), we encourage you to make use of our ideas portal. This is monitored by our product team and is the most impactful place to make your voice heard. We have created an issue for it here: https://ideas.circleci.com/cloud-feature-requests/p/add-support-for-save-cache-and-restore-cache-step-in-the-circleci-cli-local-exec

mkly avatar Jan 24 '21 03:01 mkly

Thanks @mkly, I am using the Docker -v workaround mentioned above for all Ruby gems listed in the Gemfile, and it works great. To actually have CircleCI cache working locally, would be a long term goal.

In addition to the circleci caommand above, I add the following to my .circleci/config.yml file:

- run: gem install bundler -v '2.1.4' - run: bundle config set deployment 'true' - run: bundle install --jobs=3 --retry=3 --path=/tmp/vendor/bundle

Thanks again!

mjsommer avatar Jan 25 '21 16:01 mjsommer

Any ETA on when this is going to be fixed? I've just started working with CircleCI yesterday and this is the first issue I've encountered.

inakrin avatar Oct 17 '21 06:10 inakrin

Looks like https://github.com/getlocalci/local-ci/pull/53 implemented this by replacing the cache steps with a local implementation. Would be nice if the circleci cli could do something similar natively.

matschaffer avatar Mar 18 '22 03:03 matschaffer

+1

vincent19974 avatar Apr 12 '22 13:04 vincent19974

+1

3 years later...

pgzmnk avatar Apr 22 '22 12:04 pgzmnk