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-get-tool Makefile target to use go install command #231

Closed
adrianchiris opened this issue Jan 20, 2022 · 4 comments
Closed

go-get-tool Makefile target to use go install command #231

adrianchiris opened this issue Jan 20, 2022 · 4 comments

Comments

@adrianchiris
Copy link
Collaborator

using go get to install go executable is depreated since 1.17 and will be removed in 1.18[1]

we should fix go-get-tool Makefile target before updating to go 1.18

[1]https://go.dev/doc/go-get-install-deprecation

A trivial fix of running GOFLAGS="" go install seems to solve the issue for controller-gen but we seem to hit the following issue when trying to install kustomize:

# make V=1 kustomize
go: creating new go.mod: module tmp                                                                                                                           
Downloading sigs.k8s.io/kustomize/kustomize/v3@v3.8.7                                                                                                         
go install sigs.k8s.io/kustomize/kustomize/v3@v3.8.7: sigs.k8s.io/kustomize/kustomize/v3@v3.8.7                                                               
        The go.mod file for the module providing named packages contains one or                                                                               
        more exclude directives. It must not contain directives that would cause                                                                              
        it to be interpreted differently than if it were the main module.                                                                                     
make: *** [Makefile:153: kustomize] Error 1
@adrianchiris
Copy link
Collaborator Author

@e0ne encountered this while working on PR #228

e0ne added a commit to e0ne/sriov-network-operator that referenced this issue Jan 20, 2022
This patch introduces following changes:
* explicitly set go version to v1.17 in GitHub actions
* updates go.mod file and vendored packages
* updates go version in Dockerfiles

'go install' instead of 'go get' [1] will be used once k8snetworkplumbingwg#231
is fixed.

[1] https://go.dev/doc/go-get-install-deprecation
e0ne added a commit to e0ne/sriov-network-operator that referenced this issue Jan 20, 2022
This patch introduces following changes:
* explicitly set go version to v1.17 in GitHub actions
* updates go.mod file and vendored packages
* updates go version in Dockerfiles

'go install' instead of 'go get' [1] will be used once k8snetworkplumbingwg#231
is fixed.

[1] https://go.dev/doc/go-get-install-deprecation
zeeke pushed a commit to zeeke/sriov-network-operator-1 that referenced this issue Mar 7, 2022
This patch introduces following changes:
* explicitly set go version to v1.17 in GitHub actions
* updates go.mod file and vendored packages
* updates go version in Dockerfiles

'go install' instead of 'go get' [1] will be used once k8snetworkplumbingwg#231
is fixed.

[1] https://go.dev/doc/go-get-install-deprecation
@zeeke
Copy link
Member

zeeke commented Apr 7, 2022

It seems to be fixed in v4 (kubernetes-sigs/kustomize#4387) and discussed in kubernetes-sigs/kustomize#3618 .
Without a backport, upgrading to go1.18 implies upgrading kustomize to v4.

@SchSeba
Copy link
Collaborator

SchSeba commented Apr 14, 2022

Hi @zeeke can we close this one now as right now we use golang 1.17?

@zeeke
Copy link
Member

zeeke commented Apr 14, 2022

That's ok from my side. We will tackle it when we'll upgrade to 1.18

@SchSeba SchSeba closed this as completed Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants