Skip to content

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Sep 10, 2025

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?

None

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]>
@openshift-ci openshift-ci bot added release-note-none approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 10, 2025
@Luap99
Copy link
Member Author

Luap99 commented Sep 10, 2025

cc @mtrmac @timcoding1988 @kolyshkin

@baude
Copy link
Member

baude commented Sep 10, 2025

LGTM

Copy link
Collaborator

@mtrmac mtrmac left a 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
Copy link
Collaborator

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.

Copy link
Member Author

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@timcoding1988
Copy link
Collaborator

LGTM

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

openshift-ci bot commented Sep 10, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants