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

"File exists" errors when un-taring golangci-lint on upgrading to setup-go@v4 from setup-go@v3 #807

Closed
3 tasks done
Shwetha-Acharya opened this issue Jul 27, 2023 · 4 comments · Fixed by winebarrel/cronplan#40 or #1024
Labels
area: cache bug Something isn't working

Comments

@Shwetha-Acharya
Copy link

Shwetha-Acharya commented Jul 27, 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

Error Snippet:

Received 612368384 of 664124659 (92.2%), 116.3 MBs/sec
Received 664124659 of 664124659 (100.0%), 118.2 MBs/sec
Cache Size: ~633 MB (664124659 B)
/usr/bin/tar -xf /home/runner/work/_temp/005209fb-aa88-4145-a3ef-1[26]
(https://github.com/RamenDR/ramen/actions/runs/5609819817/job/15198156789#step:4:27)4e395e5c7/cache.tzst -P -C
/home/runner/work/ramen/ramen --use-compress-program unzstd
Error: /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/yaml@v1.3.0/yaml_test.go: Cannot open: File exists
/usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/yaml@v1.3.0/LICENSE: Cannot open: File exists
/usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/yaml@v1.3.0/code-of-conduct.md: Cannot open: File exists
Error: /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/yaml@v1.3.0/yaml.go: Cannot open: File exists

The issue can be resolved on setting cache: false with setup-golang:

      - name: Setup go
        uses: actions/setup-go@v4
        with:
          go-version: ${{ env.GO_VERSION }}
          cache: false

      - name: GolangCI Lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.49.0
          

Version of golangci-lint

v3

Version of the GitHub Action

Latest

Workflow file

  golangci:
    name: Golangci Lint
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout source
        uses: actions/checkout@v3

      - name: Setup go
        uses: actions/setup-go@v4
        with:
          go-version: ${{ env.GO_VERSION }}

      - name: GolangCI Lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.49.0

Go version

v4

Code example or link to a public repository

https://github.com/RamenDR/ramen/blob/main/.github/workflows/ci.yaml

@bombsimon
Copy link
Member

This seems to be the only still open issue for this problem. Have you read through the different comments in #23, #244, #677?

@Shwetha-Acharya
Copy link
Author

Shwetha-Acharya commented Sep 12, 2023

@bombsimon yes, I had come across all the above mentioned issues before.

We are already running unit tests after golangci-lint alraedy as mentioned in #23, which did not seem to help us much to mitigate the problem.
Setting cache:false as mentioned in #677 have only worked for us. (Refer our actual codebase: https://github.com/RamenDR/ramen/blob/main/.github/workflows/ci.yaml)

This issue is raised because disabling cache is workaround, not a fix to this problem.
We would want to encounter no errors even with cache on.

andrew-farries added a commit to xataio/pgroll that referenced this issue Sep 14, 2023
Disabling the cache during the `setup-go` step was probably done to
avoid errors from the `golangci-lint` step
golangci/golangci-lint-action#807,
golangci/golangci-lint-action#244), but the
`setup-go` step isn't actually needed before running `golangci-lint`.
@ldez ldez added the bug Something isn't working label Sep 18, 2023
JoaoCxMartins added a commit to Checkmarx/kics that referenced this issue Oct 17, 2023
fredbi added a commit to fredbi/errors that referenced this issue Dec 24, 2023
Every time a job is posted, I received false alarm failure notifications
because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/jsonpointer that referenced this issue Dec 24, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/jsonreference that referenced this issue Dec 24, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/runtime that referenced this issue Dec 25, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/spec that referenced this issue Dec 25, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/errors that referenced this issue Dec 26, 2023
Every time a job is posted, I received false alarm failure notifications
because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

* fixed code coverage on all sub packages

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to go-openapi/errors that referenced this issue Dec 26, 2023
Every time a job is posted, I received false alarm failure notifications
because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

* fixed code coverage on all sub packages

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/jsonpointer that referenced this issue Dec 26, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to go-openapi/jsonpointer that referenced this issue Dec 26, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/jsonreference that referenced this issue Dec 26, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/jsonreference that referenced this issue Dec 26, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

* added unit tests to internal package

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to go-openapi/jsonreference that referenced this issue Dec 26, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

* added unit tests to internal package

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/runtime that referenced this issue Dec 26, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

* ci: fixed code coverage on all sub packages

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to go-openapi/runtime that referenced this issue Dec 26, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

* ci: fixed code coverage on all sub packages

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to fredbi/spec that referenced this issue Dec 27, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit to go-openapi/spec that referenced this issue Dec 27, 2023
Every time a job is posted, I receive false alarm failure notifications because of some cache conflict during the linting job.

Reference: golangci/golangci-lint-action#807

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
hbomb79 added a commit to hbomb79/Thea that referenced this issue Jan 18, 2024
jurisevo added a commit to evolution-gaming/ease that referenced this issue Feb 26, 2024
jurisevo added a commit to evolution-gaming/ease that referenced this issue Feb 26, 2024
@rdonkin-attest
Copy link

Just ran into this error - it would be great to have a fix that enables good performance (which golangci-lint talks about in main README) by enabling caching without also having 16K lines of logs with file-exists errors.

@NfNitLoop

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cache bug Something isn't working
Projects
None yet
5 participants