CI: sequence actions/checkout before actions/setup-go#4473
Closed
lukasschwab wants to merge 1 commit intoprebid:masterfrom
Closed
CI: sequence actions/checkout before actions/setup-go#4473lukasschwab wants to merge 1 commit intoprebid:masterfrom
lukasschwab wants to merge 1 commit intoprebid:masterfrom
Conversation
The actions/setup-go build cache always misses because go.sum isn't present when the step runs:[^example] > Warning: Restore cache failed: Dependencies file is not found in /home/runner/work/prebid-server/prebid-server. Supported file pattern: go.sum [^example]: https://github.com/prebid/prebid-server/actions/runs/16729524538/job/47353933940#step:2:16 Running actions/checkout first checks out the go.sum file so the cache can hit. This matches the step-order demonstrated in the setup-go README.
Author
Unnecessary commentary...For what it's worth, I think the race stage of validate.sh leaves a lot of room for optimization —
Haven't investigated deeply, but I wonder if this whole thing would be faster (and much simpler) with a single pass of |
Author
|
Closing to clean up my inbox, but happy to reopen if it helps. cc @bsardo, @SyntaxNode, @VeronikaSolovei9, and @guscarreon (involved in a recent CI change #4251) — this would save a few minutes per CI run without changing the check logic at all. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Reorders GitHub workflows using actions/checkout and actions/setup-go: run actions/checkout before actions/setup-go.
Running actions/checkout first checks out the go.sum file so the cache can hit. This matches the step-order demonstrated in the setup-go README:1
Motivation
The actions/setup-go build cache always misses because go.sum isn't present when the step runs. Here's the warning message and some timing notes 2
Validation
The first time this updated workflow runs (against this PR!) the setup-go step will still cache-miss, but it shouldn't emit the "Dependencies file is not found" log — the cache is just empty!
Subsequent runs should realize the speedup.
Footnotes
https://github.com/actions/setup-go?tab=readme-ov-file#basic ↩
https://github.com/prebid/prebid-server/actions/runs/16729524538/job/47353933940#step:2:16 ↩