You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
We have upgraded the go version of our project to 1.23 and updated the golangci-lint as well. But the log output Cache not found which made golangci-lint fail.
Setup go version spec 1.23.0
Attempting to download 1.23.0...
matching 1.23.0...
Acquiring 1.23.0 from https://github.com/actions/go-versions/releases/download/1.23.0-103[8](https://github.com/Azure/AppConfiguration-KubernetesProvider/actions/runs/10519320181/job/29146495024#step:3:9)0775229/go-1.23.0-linux-x64.tar.gz
Extracting Go...
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/bf173660-517d-4d7[9](https://github.com/Azure/AppConfiguration-KubernetesProvider/actions/runs/10519320181/job/29146495024#step:3:10)-8823-26a5e905efc1 -f /home/runner/work/_temp/c8[11](https://github.com/Azure/AppConfiguration-KubernetesProvider/actions/runs/10519320181/job/29146495024#step:3:12)b549-7eec-4ea2-8c26-73b4bee40ebc
Successfully extracted go to /home/runner/work/_temp/bf173660-517d-4d79-8823-26a5e905efc1
Adding to the cache ...
Successfully cached go to /opt/hostedtoolcache/go/1.23.0/x64
Added go to the path
Successfully set up Go version 1.23.0
/opt/hostedtoolcache/go/1.23.0/x64/bin/go env GOMODCACHE
/opt/hostedtoolcache/go/1.23.0/x64/bin/go env GOCACHE
/home/runner/go/pkg/mod
/home/runner/.cache/go-build
Cache is not found
go version go1.23.0 linux/amd64
Action version:
Specify the action version setup-go@v5
I got a similar problem and I also see that even if the cache is marked as found by the action many packages are still downloaded :( I'm not sure the cache is working properly by default
I also had a similar issue with V5 , go version 1.23 .
Here are some logs (debug mode):
...
2024-08-27T12:10:00.9630701Z ../../../../.cache/go-build/54/
2024-08-27T12:10:00.9631864Z Cache Size: ~0 MB (58214 B)
2024-08-27T12:10:00.9635096Z [command]/usr/bin/tar -xf /home/runner/actions-runner/_work/_temp/47ac88a3-544a-4172-8835-ebd0ed8b2ffd/cache.tzst -P -C /home/runner/actions-runner/_work/<repository_name>/<repository_name> --use-compress-program unzstd
2024-08-27T12:10:00.9637846Z /usr/bin/tar: ../../../../go/pkg/mod/golang.org/x/telemetry/config@v0.29.0/doc.go: Cannot open: File exists
2024-08-27T12:10:00.9639625Z /usr/bin/tar: ../../../../go/pkg/mod/golang.org/x/telemetry/config@v0.29.0/LICENSE: Cannot open: File exists
2024-08-27T12:10:00.9641358Z /usr/bin/tar: ../../../../go/pkg/mod/golang.org/x/telemetry/config@v0.29.0/config.json: Cannot open: File exists
2024-08-27T12:10:00.9643051Z /usr/bin/tar: ../../../../go/pkg/mod/golang.org/x/telemetry/config@v0.29.0/go.mod: Cannot open: File exists
2024-08-27T12:10:00.9644483Z /usr/bin/tar: Exiting with failure status due to previous errors
2024-08-27T12:10:00.9672705Z ##[warning]Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
2024-08-27T12:10:00.9680769Z Cache is not found
2024-08-27T12:10:00.9693251Z ##[add-matcher]/home/runner/actions-runner/_work/_actions/actions/setup-go/v5/matchers.json
2024-08-27T12:10:00.9704908Z ##[debug]Added matchers: 'go'. Problem matchers scan action output for known warning or error strings and report these inline.
2024-08-27T12:10:00.9706337Z go version go1.23.0 linux/amd64
Hi @linglingye001, We've upgraded go and golangci-lint to the latest versions (Go: 1.23, golangci-lint: v1.60.3) and Successfully executed the workflow without encountering any errors. Here's a screenshot for your reference. To help us further investigate the issue, Could you please attach link to the build or public repository to reproduce the issue ?
I'm also facing this issue with Go 1.23.
And my errors also point to go/pkg/mod/golang.org/x/telemetry/config
(by the way, is it the new telemetry feature introduced since go 1.23?)
Then, I tried cache: false and use @actions/cache directly:
Hi @muzimuzhi, @datbth, 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.
Reacted by datbth, Leonid Shevtsov and Johan Walles
Hi @linglingye001, Thank you for the confirmation. We are proceeding to close this issue as it has been resolved. If any future clarifications are needed, please feel free to reach out.
Activity
linglingye001 commentedon Aug 23, 2024
With go version
1.22.6, the cache restored successfully. I’m not sure if this is related to the Go version. Thanksv-priya-kinthali commentedon Aug 23, 2024
Hello @linglingye001 👋,
Thank you for reporting this. We will investigate the issue and get back to you as soon as we have updates.
remyleone commentedon Aug 26, 2024
I got a similar problem and I also see that even if the cache is marked as found by the action many packages are still downloaded :( I'm not sure the cache is working properly by default
andreigorgan commentedon Aug 27, 2024
I also had a similar issue with V5 , go version 1.23 .
Here are some logs (debug mode):
The configuration i used is:
galdor commentedon Sep 3, 2024
It seems we are having the same issue. The only way to make builds pass is to delete the cache manually and restart the job.
v-gowridurgad commentedon Sep 5, 2024
Hi @linglingye001, We've upgraded go and golangci-lint to the latest versions (Go: 1.23, golangci-lint: v1.60.3) and Successfully executed the workflow without encountering any errors. Here's a screenshot for your reference. To help us further investigate the issue, Could you please attach link to the build or public repository to reproduce the issue ?
muzimuzhi commentedon Sep 5, 2024
I observed the warning
in a job run in https://github.com/ayoisaiah/f2, 4 days ago. But now it disappeared in runs since 2 days ago.
4 days ago, warning raised
https://github.com/ayoisaiah/f2/actions/runs/10655048967/job/29532111772#step:3:47
Extra log lines compared to the 2-day later job run:
2 days ago, no warnings.
https://github.com/ayoisaiah/f2/actions/runs/10655117355/job/29532260567#step:3:39
The no-warning job run was 1 commit ahead, which updates go dependencies, see ayoisaiah/f2@5865461...560fe30.
datbth commentedon Sep 7, 2024
I'm also facing this issue with Go 1.23.

And my errors also point to
go/pkg/mod/golang.org/x/telemetry/config(by the way, is it the new telemetry feature introduced since go 1.23?)
Then, I tried
cache: falseand use@actions/cachedirectly:It failed similarly:

Then I tried cleaning
modcachebefore calling (restoring)@actions/cache:It also failed:

Then I tried using

rm -rfinstead ofgo cleanand, interestingly, it threw permission denied:I could

sudo rm -rfinstead, but then it still failed when restoring cache:sudo chmod -R 0777also failed:However, cleaning both

-modcacheand-cachesomehow worked:which is weird to me because the error is pointing to GOMODCACHE (
go/pkg/mod).Edit: I ran my workflow another time and this time it failed 😿 (even when cleaning both

-modcacheand-cache):p/s I would like to note that this issue happens when restoring cache, while @gowridurgad ran a workflow that had no cache yet.
v-gowridurgad commentedon Sep 11, 2024
Hi @muzimuzhi, @datbth, 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:
If you continue to experience issues, please let us know.
datbth commentedon Sep 11, 2024
I just tried a few workflows with 1.23.1 and it is working fine so far.
Still find it quite weird that removing the whole modcache directory did not work.
But anyway, I'm good for now. Thank you!
v-gowridurgad commentedon Sep 16, 2024
Hi @linglingye001, Just a gentle reminder regarding this issue, If you have any updates or need further assistance, Please let us know.
linglingye001 commentedon Sep 18, 2024
Hi @gowridurgad , it works with version 1.23.1, thanks!
v-gowridurgad commentedon Sep 18, 2024
Hi @linglingye001, Thank you for the confirmation. We are proceeding to close this issue as it has been resolved. If any future clarifications are needed, please feel free to reach out.
Fix CI cache restoration issue