Skip to content
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

ci/gha: disable double caching #3822

Merged
merged 2 commits into from
May 16, 2023
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Apr 10, 2023

Since commit e3cf217 (#3771) actions/setup-go@v4 uses caching implicitly.

Fix two cases of double caching.

@kolyshkin kolyshkin changed the title ci/gha: rm actions/cache from validate/deps job ci/gha: disable double caching Apr 10, 2023
@kolyshkin
Copy link
Contributor Author

@thaJeztah PTAL

~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go.sum-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go.sum-
Copy link
Member

Choose a reason for hiding this comment

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

The issue with CGO caching was resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is irrelevant to this PR for two reasons:

  1. We remove own caching here, which is sort of orthogonal to that issue
  2. We only validate the dependencies here, and the issue (cache key do not include linux distro name and version actions/setup-go#368; which is not yet fixed) only surfaces when we use different distros at the same time (which we don't do here).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(and when we use different distros at the same time and are affected, we disable caching:

cache: false # https://github.com/actions/setup-go/issues/368
)

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM (if the issue with CGO is resolved)

Since commit e3cf217 actions/setup-go@v4 uses caching
implicitly, so it is no longer required.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Since commit e3cf217 actions/setup-go@v4 uses caching
implicitly, and olangci/golangci-lint-action also uses caching.

These two caches clash, resulting in multiple warnings in CI logs.

The official golangci-lint-action solution is to disable caching
for setup-go job (see [1]). Do the same.

[1] golangci/golangci-lint-action#704

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin merged commit b492357 into opencontainers:main May 16, 2023
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants