actions / setup-go

Set up your GitHub Actions workflow with a specific version of Go
MIT License
1.41k stars 531 forks source link

Intermittent failures downloading go #470

Closed jmhbnz closed 3 months ago

jmhbnz commented 7 months ago

Description: The etcd project see failures downloading go with the setup-go action from time to time on our managed arm64 runners. We suspect this might just be network flakiness so could mean retries are potentially required to prevent it happening.

Action version: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4

Platform:

Runner type:

Tools version: go-version: 1.22.2 - This issue has occurred across multiple go versions.

Repro steps:
We don't know how to reproduce this, it is occurring on a small percentage of workflow runs. We have attempted a repro with this repository but not had any luck https://github.com/actuated-samples/checkout-go/actions.

Expected behavior: Go downloads should succeed. Retries should overcome intermittent network flakiness.

Actual behavior:

https://github.com/etcd-io/bbolt/actions/runs/8065572741/job/22031667659

Run actions/setup-go@v5
  with:
    go-version: 1.21.6
    check-latest: false
    token: ***
    cache: true
Setup go version spec 1.21.6
Attempting to download 1.21.6...
matching 1.21.6...
Not found in manifest.  Falling back to download directly from Go

https://github.com/etcd-io/etcd/actions/runs/8651099263/job/23721045685

Run actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
  with:
    go-version: 1.22.2
    check-latest: false
    token: ***
    cache: true
Setup go version spec 1.22.2
Attempting to download 1.22.2...
Request timeout: /repos/actions/go-versions/git/trees/main
Falling back to download directly from Go
Error: Request timeout: /dl/?mode=json&include=all
mahabaleshwars commented 4 months ago

Hello @jmhbnz, We are unable to reproduce the issue with the provided repository actuated-samples/checkout-go. The logs for the workflows bbolt and etcd are unavailable. Please share a workflow or another repository link where the issue can be reproduced.

mahabaleshwars commented 3 months ago

Hello @jmhbnz, Just a friendly reminder to provide a public repository that replicates the issue. Thank you!

jmhbnz commented 3 months ago

Hello @jmhbnz, Just a friendly reminder to provide a public repository that replicates the issue. Thank you!

I did originally - it took so long for someone to look at this issue that the logs are no longer available. I don't have time to look at this issue anymore but in general I would kindly request you review handling for code in this action that downloads artifacts and consider adding retry logic where none is currently present to prevent annoying rare failures due to flaky network conditions.

mahabaleshwars commented 3 months ago

Hello @jmbnz, thank you for your valuable feedback. We will consider implementing retry logic in the future. Please feel free to reach out to us if you encounter any other issues.