-
Notifications
You must be signed in to change notification settings - Fork 136
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
base: main
Are you sure you want to change the base?
fix: tell builder and build-dry about go.sum for go caching #2864
Conversation
Signed-off-by: Bob Callaway <[email protected]>
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? |
A contaminated cache with the default settings would poison all binaries,
and contamination would not be limited to only that workflow run IIUC.
You could disable the cache that is on by default in setup-go and use a
unique cache key (see
https://github.com/actions/cache#creating-a-cache-key) to limit the blast
radius but still get reuse across the various jobs depending on how you
configure it.
…On Mon, Oct 16, 2023 at 5:00 PM laurentsimon ***@***.***> wrote:
Thanks for the PR / issue @bobcallaway <https://github.com/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?
—
Reply to this email directly, view it on GitHub
<#2864 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVWTJLGCYIJRHXYY3XOYOLX7WN5RAVCNFSM6AAAAAA6CGHEUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRVGI3DMNJTHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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. |
If you’re using setup-go, caching is on by default in v4+; if you don’t
want that, you should disable it IMO. I think we should talk to GitHub
about the scope of caches (org vs project vs workflow) to design it
properly.
Given that rekor will need to generate 13 variants of two binaries, caching
go modules seems like a meaningful optimization.
…On Mon, Oct 16, 2023 at 7:18 PM Ian Lewis ***@***.***> wrote:
As @laurentsimon <https://github.com/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 <https://github.com/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.
—
Reply to this email directly, view it on GitHub
<#2864 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVWTJIERPG4O6HA4XTL4XDX7W6EVAVCNFSM6AAAAAA6CGHEUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRVGQYTGNBVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
So maybe that's an option we can enable in the workflow to let teams opt-in, like we do for
+1 |
Fixes: #2863