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 restore fails with go 1.23 #506

Closed
2 of 5 tasks
arodland opened this issue Sep 24, 2024 · 4 comments
Closed
2 of 5 tasks

Cache restore fails with go 1.23 #506

arodland opened this issue Sep 24, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@arodland
Copy link

Description:

Cache restore is failing with a tar error whenever we build a project with go 1.23

Action version:
v5.0.2

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
go 1.23.0

Repro steps:

Build a repo with go 1.23.0 in go.mod,

uses: actions/setup-go@v5
with:
    go-version-file: go.mod

and an existing cache.

Expected behavior:
The cache is restored.

Actual behavior:

/usr/bin/tar -xf /home/runner/_work/_temp/af5c9c0c-c61a-4bbc-85b1-77654a640835/cache.tzst -P -C /home/runner/_work/quickset/quickset --use-compress-program unzstd
Received 530564234 of 530564234 (100.0%), 126.4 MBs/sec
/usr/bin/tar: ../../../go/pkg/mod/golang.org/x/telemetry/[email protected]/config.json: Cannot open: File exists
/usr/bin/tar: ../../../go/pkg/mod/golang.org/x/telemetry/[email protected]/LICENSE: Cannot open: File exists
/usr/bin/tar: ../../../go/pkg/mod/golang.org/x/telemetry/[email protected]/go.mod: Cannot open: File exists
/usr/bin/tar: ../../../go/pkg/mod/golang.org/x/telemetry/[email protected]/doc.go: Cannot open: File exists
/usr/bin/tar: Exiting with failure status due to previous errors
Warning: Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
Cache is not found
go version go1.23.0 linux/amd64
@arodland arodland added bug Something isn't working needs triage labels Sep 24, 2024
@priya-kinthali
Copy link

Hello @arodland 👋,
Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

@gowridurgad gowridurgad self-assigned this Sep 25, 2024
@gowridurgad
Copy link

Hi @arodland, The issue you're facing during cache restoration is due to the telemetry update in Go 1.23.0. This update includes files (config.json, go.mod, LICENSE, doc.go) that already exist in the golang.org/x/telemetry directory, causing conflicts. When restoring the cache, these existing files prevent the tar command from completing successfully, resulting in "File exists" errors.

We have observed that the error related to extracting telemetry files is not present in Go version 1.23.1. Attached a screenshot for your reference This suggests that the issue might have been resolved in the newer release.
We recommend updating your workflow to use Go version 1.23.1 as follows:

- name: Set up Go
  uses: actions/setup-go@v5
  with:
    go-version: 1.23.1

If you continue to experience issues, please let us know.
Screenshot 2024-09-10 at 4 46 11 PM

@gowridurgad
Copy link

Hi @arodland, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know.

@arodland
Copy link
Author

arodland commented Oct 9, 2024

I can confirm that the issue doesn't occur with go 1.23.1, and I suppose that's good enough. Closing.

@arodland arodland closed this as completed Oct 9, 2024
michi-covalent added a commit to cilium/cilium-cli that referenced this issue Nov 28, 2024
Temporarily set go-version explicitly to avoid hitting this cache
restore issue [^1]. We can revert this when Go 1.24 gets released.

Also modify kind.yaml to install Cilium CLI using the local action.

[^1]: actions/setup-go#506

Signed-off-by: Michi Mutsuzaki <[email protected]>
michi-covalent added a commit to cilium/cilium-cli that referenced this issue Nov 28, 2024
Temporarily set go-version explicitly to avoid hitting this cache
restore issue [^1]. We can revert this when Go 1.24 gets released.

Also modify kind.yaml to install Cilium CLI using the local action.

[^1]: actions/setup-go#506

Signed-off-by: Michi Mutsuzaki <[email protected]>
tklauser pushed a commit to cilium/cilium-cli that referenced this issue Nov 28, 2024
Temporarily set go-version explicitly to avoid hitting this cache
restore issue [^1]. We can revert this when Go 1.24 gets released.

Also modify kind.yaml to install Cilium CLI using the local action.

[^1]: actions/setup-go#506

Signed-off-by: Michi Mutsuzaki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants