-
Notifications
You must be signed in to change notification settings - Fork 2.8k
cirrus: fix golangci-lint cache leak + update freebsd version #27039
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
base: main
Are you sure you want to change the base?
Conversation
Do not use reupload_on_changes, this will make the cache grow unbound and I have seen the cache become so large then restoring it and uploading it took several minutes thus making the task time worse compared to no cache. I manually cleaned the cache a few times to fix this but it need to properly be fixed here. To not have a stale cache for to long also use date +%U which will create a new cache once a week. This is in line with the offical golangci-lint github action which invalidates the cache every 7 days by default[1]. [1] https://github.com/golangci/golangci-lint-action/blob/main/README.md#cache-invalidation-interval Signed-off-by: Paul Holzinger <[email protected]>
Freebsd 13.4 is EOL so update to the latest one. Signed-off-by: Paul Holzinger <[email protected]>
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, feel free to merge as is.
- go version | ||
- grep GOLANGCI_LINT_VERSION Makefile | head -1 | ||
- date +%U |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at https://github.com/golangci/golangci-lint-action/blob/7574dab08b6e7a561d21c7f5c153fe1107cc0b2f/src/cache.ts#L40 , consider adding cat go.mod
. The week number is definitely going to trigger a refresh — but IIRC most Renovate updates happen on Monday, so, on a typical week, we would be running with a somewhat stale cache.
OTOH discarding the cache more frequently means less caching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I don't think I want that with how many renovate PRs are going in here, basically daily. Cache wise it should be fine even if some deps are different and once a week seemed like the perfect time period to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kolyshkin, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Do not use reupload_on_changes, this will make the cache grow unbound and I have seen the cache become so large then restoring it and uploading it took several minutes thus making the task time worse compared to no cache. I manually cleaned the cache a few times to fix this but it need to properly be fixed here.
To not have a stale cache for to long also use date +%U which will create a new cache once a week. This is in line with the offical golangci-lint github action which invalidates the cache every 7 days by default[1].
[1] https://github.com/golangci/golangci-lint-action/blob/main/README.md#cache-invalidation-interval
Does this PR introduce a user-facing change?