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

Consider using actions/cache #25

Closed
embano1 opened this issue Apr 20, 2022 · 1 comment
Closed

Consider using actions/cache #25

embano1 opened this issue Apr 20, 2022 · 1 comment

Comments

@embano1
Copy link

embano1 commented Apr 20, 2022

Is there a particular reason why actions/cache is not included in the workflows?

Besides vendor addressing the module cache in this particular case, persisting the build cache could optimize build times across the org (and dependent repositories) IMHO.

https://github.com/actions/cache/blob/main/examples.md#go---modules

@embano1
Copy link
Author

embano1 commented Apr 25, 2022

I ran some (non-scientific) experiments with eventing and VSphereSources and could not see a huge performance gain from adding a cache.

From what I can tell this is due to:

  1. Using vendor which absorbs a lot of the typical go mod download time (in a test repo without vendor I do see gains as expected)
  2. Sharing the cache with different workflows (using same cache key for unit tests, lint, e2e, etc.) leads to a situation where apparently not all Go cached files are uploaded to the cache destination. Sometimes I only saw 5MB cache size compared to 1.2GB in a local run (for pkg mod and gobuild cache)

Haven't looked deeper into the latter, i.e. why the cache is not the similar size I am seeing after a workflow run in the local GOCACHE GOMODCACHE folders.

Closing this issue for now. Apparently, the community is also pushing for actions/setup-go to support caching without an extra step (see actions/setup-go#130).

@embano1 embano1 closed this as completed Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant