Cache plugin fails when using compression method

Hi Team,

We started to implement the buildkite cache plugin GitHub - buildkite-plugins/cache-buildkite-plugin: 🎩🗄Cache ephemeral files between builds and using the backend S3 for it, since we use elastic-stack CI setup and instances are ephemeral, so we could not use FS backend.
But it gives error when we are using the compression methods. Both tgz and zip gave errors.

We have set this VARs - BUILDKITE_PLUGIN_S3_CACHE_BUCKET and set AWS profile to interact with the S3 bucket.

Could you help us in identifying the issue? Is there a workaround or fix for this?

We found a git issue already opened for this.

The pipeline step that we used is as

  - command: "./scripts/build.sh\n"
    label: "build"
    agents:
      - "queue=frontend"
    plugins:
      - cache#v0.6.0:
          manifest: package-lock.json
          backend: s3
          compression: tgz
          path: node_modules
          restore: file
          save: file

Hello @surajthakur!

Thanks for the message and hope you are well :+1:

Have seen the same case come up before from previous mention - there is a open PR at the moment with our plugin experts to look at tests/get the fix merged in for this case: its a known issue where the s3 sync command doesn’t expect a single file. Have looped in this callout to that case you’ve linked to, and the team shall look at it shortly.

Much obliged!

James

Hi @james.s

Thanks for the prompt reply. Yeah, I checked the PR raised.
So do you recommend waiting for the PR to be merged?
Should we be waiting for the response on this case?

Thanks for looking into it.
Regards,
Suraj

No worries :+1:

I’d suggest so in this case - as there will be work triaged along with testing the actual implementation raised for the hooks changed.

It’s worth keeping tabs on the actual issue on GitHub since that will be closed out with the remedy - but I’ve let our team know of your callout :smile:

Thanks @james.s ,

We will keep an eye for updates on this case.

Cheers !!

Hi @james.s

Any update on this case?

Thanks
Suraj

Hey @surajthakur!

Hope you’ve been well over the weekend :+1:

Have let the team know of the PR that was submitted to solve this case and are tracking testing and getting it merged/released accordingly.

Cheers!

James