abnobdoss opened a new pull request, #1263:
URL: https://github.com/apache/iceberg-go/pull/1263
Closes #1260
## What
Stop using the golangci-lint action's built-in cache and manage caching with
`actions/cache` instead. The Go module/build cache and the golangci-lint cache
are now keyed by os + Go version + lockfile, restored on every run, and saved
only on `main`. Cache dirs are pinned under the workspace via `env:` so the
same paths work on every runner, and `setup-go`'s own caching is turned off.
The cross-compile job and the integration workflow get the same restore-always,
save-on-main treatment.
## Why
The golangci-lint action builds its cache key from
`{os}-{workdir}-{interval}-{go.mod hash}`, with no Go version and no input to
add one, so both Go versions in the matrix share one immutable entry. Whichever
version loses the weekly save-race restores a cache built by the other
compiler, throws it out, and re-lints from cold. That's roughly 25s vs 203s on
the lint step for the same inputs (about 1m42s vs 6m15s per cell). Adding the
Go version to the key gives each version its own cache. Gating saves to `main`
stops PR branches from overwriting the cache that `main` builds.
## Validation
Tested in a fork: warm runs restored the per-version caches and the
previously-slow lint step dropped back to ~25s, and PR runs restored without
saving.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]