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

support for new go 1.20 #326

Closed
1 of 5 tasks
jason-huang-deltatre opened this issue Feb 3, 2023 · 8 comments
Closed
1 of 5 tasks

support for new go 1.20 #326

jason-huang-deltatre opened this issue Feb 3, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@jason-huang-deltatre
Copy link

jason-huang-deltatre commented Feb 3, 2023

Description:
CI failed after I specified the version to go 1.20, here is the error:

Error: perfutils/ballast/ballast.go:6:2: cannot find package "k8s.io/apimachinery/pkg/api/resource" in any of:
/opt/hostedtoolcache/go/1.2.2/x64/src/pkg/k8s.io/apimachinery/pkg/api/resource (from $GOROOT)
($GOPATH not set)

I guess it is because setup-go action picked up go version 1.2 by mistake. It should be version 1.20 (since go use semantic versioning). Can you guys please fix that?

Action version:
Latest version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.

Expected behavior:
A description of what you expected to happen.

Actual behavior:
A description of what is actually happening.

@jason-huang-deltatre jason-huang-deltatre added bug Something isn't working needs triage labels Feb 3, 2023
@jason-huang-deltatre
Copy link
Author

If i set go 1.20, setup-go will grab go 1.2.2 instead of go 1.20. Issue solved by using tag go 1.20.0

@cpanato
Copy link

cpanato commented Feb 3, 2023

if use 1.20.x works

but looks like it is an issue in the github action infrastructure and not in the setup-go action itself

@panticmilos
Copy link
Contributor

hi @jason-huang-deltatre, thank you for the report, we will take a look at it :)

@leonbergr
Copy link

I faced similar issue while having go version without apostrophes in gha .yaml file.
ie. good: go-version: '1.20'
bad go-version: 1.20

This this 1.20 => 1.2 conversion can happened to any value in gha .yaml without apostrophes

@dmitry-shibanov
Copy link
Contributor

Hello everyone. I think it is an expected behaviour. You need to specify version like this go-version: '1.20'. You can check this comment for more information: actions/setup-python#160 (comment).

Thank you for your reply @leonbergr.

For now I'm going to close the issue.

@dmitry-shibanov dmitry-shibanov closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2023
This was referenced Feb 6, 2023
vaughany added a commit to vaughany/golangci-lint-action that referenced this issue Feb 8, 2023
I recently came across a bug where specifying `go-version: '1.20'` used Go 1.2, not 1.20. It was not clear from the readme that to avoid this, the Go version should be written inside single quotes (as per this comment: actions/setup-go#326 (comment)) but the single quotes are missing from the example in this repository.  This PR fixes this.
wongoo pushed a commit to vogo/informer that referenced this issue Apr 7, 2023
obourdon added a commit to squarescale/squarescale-cli that referenced this issue Apr 13, 2023
@cedws
Copy link

cedws commented Apr 16, 2023

I got bitten by this too... goddamn YAML.

jdrews added a commit to jdrews/logstation that referenced this issue May 1, 2023
hkf57 added a commit to SafetyCulture/safetyculture-exporter that referenced this issue May 18, 2023
hkf57 added a commit to SafetyCulture/safetyculture-exporter that referenced this issue May 18, 2023
* [INTG-2805] Adding date to the log

* [INTG-2805] Use time.DateOnly instead

* [INTG-2805] Upgrade to go1.20

* [INTG-2805] Fix tests for 1.20

* [INTG-2805] actions/setup-go#326 (comment)

* [INTG-2805] Typo

* [INTG-2805] Typo

* [INTG-2805] Typo

---------

Co-authored-by: Charles Lee <[email protected]>
@xlab
Copy link

xlab commented May 24, 2023

image

pawelposkrobko added a commit to PiwikPRO/actions that referenced this issue May 26, 2023
rsvihladremio added a commit to rsvihladremio/dremio-diagnostic-collector that referenced this issue May 30, 2023
tamada added a commit to tamada/crssy that referenced this issue Jun 15, 2023
sjdiego added a commit to sjdiego/fishbot that referenced this issue Jul 5, 2023
zachaller added a commit to zachaller/argo-rollouts that referenced this issue Jul 27, 2023
zachaller added a commit to zachaller/argo-rollouts that referenced this issue Jul 27, 2023
zachaller added a commit to argoproj/argo-rollouts that referenced this issue Jul 28, 2023
* bump golang to 1.20

Signed-off-by: zachaller <[email protected]>

* use .x because of actions/setup-go#326

Signed-off-by: zachaller <[email protected]>

* use .x because of actions/setup-go#326

Signed-off-by: zachaller <[email protected]>

* change test to avoid loopclosure: loop variable test captured by func literal from go vet

Signed-off-by: zachaller <[email protected]>

* ignore new govet rules for tests to pass

Signed-off-by: zachaller <[email protected]>

* change closures

Signed-off-by: zachaller <[email protected]>

* fix test

Signed-off-by: zachaller <[email protected]>

* fix test

Signed-off-by: zachaller <[email protected]>

* fix go vet by removing concurency

Signed-off-by: zachaller <[email protected]>

* one more

Signed-off-by: zachaller <[email protected]>

* copy var instead of removing Parallel

Signed-off-by: zachaller <[email protected]>

* copy var instead of removing Parallel

Signed-off-by: zachaller <[email protected]>

---------

Signed-off-by: zachaller <[email protected]>
levaitamas added a commit to l7mp/stunner that referenced this issue Aug 2, 2023
levaitamas added a commit to l7mp/stunner-auth-service that referenced this issue Aug 2, 2023
levaitamas added a commit to l7mp/stunner-gateway-operator that referenced this issue Aug 2, 2023
flexwie added a commit to flexwie/ghs that referenced this issue Aug 25, 2023
github action fails to pick up 1.20 correctly

ref actions/setup-go#326
empovit added a commit to fdo-rs/fdo-operator that referenced this issue Nov 14, 2023
* Upgrade Go from 1.19 to 1.20.
* Update tools to latest.
* Bump controller-runtime from 0.16.2 to 0.16.3.

Set version to 1.20.x in action/setup-go because of #actions/setup-go/issues/326
iamrajhans added a commit to iamrajhans/local-ip-mapper that referenced this issue Oct 24, 2024
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

8 participants