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

cache input key is wrong which results in cache not loading #640

Closed
3 tasks done
padlar opened this issue Jan 5, 2023 · 1 comment
Closed
3 tasks done

cache input key is wrong which results in cache not loading #640

padlar opened this issue Jan 5, 2023 · 1 comment
Labels
area: cache question Further information is requested

Comments

@padlar
Copy link

padlar commented Jan 5, 2023

Welcome

  • Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).

Description of the problem

We noticed a problem with loading cache with version 1.50.1. Following log line seems to be the problem

Cache not found for input keys: golangci-lint.cache-2766-0af665d41368f88967f6a599142b9ceeb0573e14, golangci-lint.cache-2766-

Output below has all the necessary info -

Run golangci/golangci-lint-action@0ad9a0988b3973e85[1]
  with:
    version: v1.50.1
    github-token: ***
    only-new-issues: false
    skip-cache: false
    skip-pkg-cache: false
    skip-build-cache: false
prepare environment
  Finding needed golangci-lint version...
  Installing golangci-lint v1.50.1...
  Downloading https://github.com/golangci/golangci-lint/releases/download/v1.50.1/golangci-lint-1.50.1-linux-amd6[4]
  Cache Size: ~181 MB (189838229 B)
  /usr/bin/tar --use-compress-program unzstd -xf /home/runner/work/_temp/384d86f6-b831-44[12](snip)d/cache.tzst -P -C /home/runner/work/image-scanner-operator/image-scanner-operator
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protopath/path.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protopath/step.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protorange/range_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protorange/range.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protorange/example_test.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protodesc/desc.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protodesc/desc_resolve.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protodesc/desc_init.go: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/google.golang.org/protobuf@v1.28.1/reflect/protodesc/desc_validate.go: Cannot open: File exists
<snip>
  /usr/bin/tar: ../../../go/pkg/mod/github.com/gogo/protobuf@v1.3.2/jsonpb/jsonpb_test_proto/Makefile: Cannot open: File exists
  Error: /usr/bin/tar: ../../../go/pkg/mod/github.com/gogo/protobuf@v1.3.2/jsonpb/jsonpb_test.go: Cannot open: File exists
  /usr/bin/tar: Exiting with failure status due to previous errors
  Warning: Failed to restore: Tar failed with error: The process '/usr/bin/tar' failed with exit code 2
  Cache not found for input keys: golangci-lint.cache-2766-0af665d41368f88967f6a599142b9ceeb0573e14, golangci-lint.cache-2766-
  Prepared env in 5962ms
run golangci-lint
  Running [/home/runner/golangci-lint-1.50.1-linux-amd64/golangci-lint run --out-format=github-actions] in [] ...
  golangci-lint found no issues
  Ran golangci-lint in 1058ms

Version of golangci-lint

v1.50.1

Version of the GitHub Action

0ad9a09 # v3.3.1

Workflow file

  golangci-lint:
    permissions:
      contents: read # for actions/checkout to fetch code
      pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
    runs-on: ubuntu-latest
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5 # v2.0.0
        with:
          egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
      - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0
      - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
        with:
          go-version-file: go.mod
          cache: true
      - uses: golangci/golangci-lint-action@0ad9a0988b3973e851ab0a07adf248ec2e100376 # v3.3.1
        with:
          version: v1.50.1

Go version

1.19

Code example or link to a public repository

Problem is with the caching in github action
@erikgb
Copy link

erikgb commented Apr 25, 2024

It seems like this is no longer an issue.

/close

@ldez ldez closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cache question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants