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

fix: tell builder and build-dry about go.sum for go caching #2864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bobcallaway
Copy link
Contributor

Fixes: #2863

Signed-off-by: Bob Callaway <bcallaway@google.com>
@bobcallaway bobcallaway changed the title tell builder and build-dry about go.sum for go caching fix: tell builder and build-dry about go.sum for go caching Oct 16, 2023
@laurentsimon
Copy link
Collaborator

Thanks for the PR / issue @bobcallaway . Do I understand correctly that if the cache becomes contaminated, it would contaminate all the (arch-specific) binaries instead of one? And the contamination would be only for this workflow run, not other runs?

@bobcallaway
Copy link
Contributor Author

bobcallaway commented Oct 16, 2023 via email

@ianlewis
Copy link
Member

As @laurentsimon is alluding to, I think our main concern would be how caching affects the build and if the cache could be poisoned from the user's job. I assume the cache is for the whole repo and is reused across jobs? I kind of feel like reusable workflows should be operating from their own cache but could be wrong.

@bobcallaway What is the impact to you and rekor? Does not using cache greatly affect your build times?

It's also worth noting we have this same issue for other builders like the Node.js builder.

@bobcallaway
Copy link
Contributor Author

bobcallaway commented Oct 16, 2023 via email

@laurentsimon
Copy link
Collaborator

So maybe that's an option we can enable in the workflow to let teams opt-in, like we do for go-version and go-version-file?

I think we should talk to GitHub
about the scope of caches (org vs project vs workflow) to design it
properly.

+1

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

Successfully merging this pull request may close these issues.

[bug] setup-go cache restore fails due to non-default path
3 participants