Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip cache save feature #497

Open
kian99 opened this issue Aug 22, 2024 · 2 comments
Open

Skip cache save feature #497

kian99 opened this issue Aug 22, 2024 · 2 comments
Labels
feature request New feature or request to improve the current logic

Comments

@kian99
Copy link

kian99 commented Aug 22, 2024

Description:
I'd like to propose a new input to the action to enable skipping cache saves but maintaining the ability to restore an existing cache.
Something like skip-cache-save.

Justification:
We have the case in our CI/CD where we have the following jobs running in parallel:

  1. Run tests - i.e. runs go test ./...
  2. Run linting - i.e. run golangci-lint

Both jobs benefit from Go package caching but in the above scenario, the linting job finishes first and creates a cache that doesn't contain Go test artefacts. It would be useful to only have 1 job create the cache i.e. the job that populates the package cache and the test/build cache.

I imagine this can be handled by using actions/cache, but this addition feels like a simple way of achieving better cache control without dropping to a lower level tool.

Are you willing to submit a PR?
Possibly, if the feature request is relevant.

@kian99 kian99 added feature request New feature or request to improve the current logic needs triage labels Aug 22, 2024
@priya-kinthali
Copy link

Hello @kian99 👋,
Thank you for this feature request. We will investigate it and get back to you as soon as we have some feedback.

@adamdecaf
Copy link

Similar to #495 the caching process takes a long time on our runners. There's no reason to cache by default as Github Actions already has tons of network proxying.

It takes 8s to setup Go in one job, but 2m45s to cache after the job.. Can we disable this post-job caching by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

3 participants