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

go-version: ">=1.20" with check-latest: true does not resolve to 1.20.5 #384

Closed
silverwind opened this issue Jun 9, 2023 · 8 comments
Closed
Labels
bug Something isn't working

Comments

@silverwind
Copy link

silverwind commented Jun 9, 2023

go1.20.5 was released on 2023-06-06, but this action does not find it, even with check-latest enabled. This is problematic for us because we have govulncheck in the pipeline and all builds fail because of vulnerabilities in go1.20.4.

- uses: actions/setup-go@v4
  with:
    go-version: ">=1.20"
    check-latest: true

Run output:

Run actions/setup-go@v4
Setup go version spec >=1.20
Attempting to resolve the latest version from the manifest...
matching >=1.20...
Resolved as '1.20.4'
Found in cache @ /opt/hostedtoolcache/go/1.20.4/x64
Added go to the path
Successfully set up Go version >=1.20
@silverwind silverwind added bug Something isn't working needs triage labels Jun 9, 2023
@silverwind silverwind changed the title `go-version: ">=1.20" with check-latest: true does not resolve to 1.20.5 go-version: ">=1.20" with check-latest: true does not resolve to 1.20.5 Jun 9, 2023
@silverwind
Copy link
Author

It may be because versions-manifest.json was not updated for the release, even though the releases on that repo include a number of go1.20.5 releases. Is this not automated correctly?

@silverwind
Copy link
Author

Likely depends on actions/go-versions#75.

@didrocks
Copy link

didrocks commented Jun 9, 2023

I confirm having the same issue. And indeed, with govulncheck in the pipeline too, it means that we will always have the CI failing PRs when new security release version of Go is made, until the manifest is updated.

I was expecting though that check-latest: true with no cache would still try to download latest minor version from Google's website and bypass the manifest.json check. Is there any way to achieve this?

@silverwind
Copy link
Author

silverwind commented Jun 9, 2023

Working now that actions/go-versions#75 is merged:

Run actions/setup-go@v4
Setup go version spec >=1.20
Attempting to resolve the latest version from the manifest...
matching >=1.20...
Resolved as '1.20.5'
Attempting to download 1.20.5...
matching 1.20.5...
Acquiring 1.20.5 from https://github.com/actions/go-versions/releases/download/1.20.5-5218672569/go-1.20.5-linux-x64.tar.gz
Extracting Go...

For the future, I suggest check-latest to check agains actual go releases instead of a outdated manifest file. The expectation here is certainly that check-latest follows upstream releases closely, not be 3+ days out of date.

@gaby
Copy link

gaby commented Jun 9, 2023

@silverwind @dmitry-shibanov Using "1.20.x" still pulls 1.20.4 or am I doing something wrong? 🤔

@silverwind
Copy link
Author

Try adding check-latest: true.

@gaby
Copy link

gaby commented Jun 9, 2023

@silverwind I can't, I'm using an official action from Golang 😂

https://github.com/golang/govulncheck-action

Their action.yaml does the setup-go

@gaby
Copy link

gaby commented Jun 9, 2023

I probably need to find a different action then, since they are only mirroring those to Github.

This whole setup of having versions in 1 place and actions in another is a single point of failure. I haven't been able to run any Golang CI job since yesterday

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

4 participants