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

Packages installation not working starting golang 1.18 #104

Open
visheyra opened this issue May 23, 2022 · 2 comments Β· May be fixed by #105
Open

Packages installation not working starting golang 1.18 #104

visheyra opened this issue May 23, 2022 · 2 comments Β· May be fixed by #105

Comments

@visheyra
Copy link

visheyra commented May 23, 2022

πŸ—£οΈ Foreword

πŸ‘» Brief Description

When using the go 1.18 version, the package installation is no longer working because packages cannot be installed globally using go get leading to this error message:

         go: go.mod file not found in current directory or any parent directory.
    	'go get' is no longer supported outside a module.
    	To build and install a command, use 'go install' with a version,
    	like 'go install example.com/cmd@latest'
    	For more information, see https://golang.org/doc/go-get-install-deprecation
    	or run 'go help get' or 'go help install'.

πŸ₯ž Cookbook version

version is 5.3.2 but this will fail in any version

πŸ‘©β€πŸ³ Chef-Infra Version

chef version is 17.9.46 but this is not related.

🎩 Platform details

Operating system distribution and release version. Cloud provider if running in the cloud.

Steps To Reproduce

Steps to reproduce the behavior:

with a recipe using this cookbook:

  • specify go 1.18 or above (in my case 1.18.1)
  • specify a package to be installed using the node_attributes (in my case golangcilint)
  • run chef on the instance and see the error message

πŸš“ Expected behavior

I expect the package that I specified in node attributes being installed globally without failure

βž• Additional context

I'm trying to make a pr to fix this issue, however I'm kind of a noob in ruby/chef so I might have questions :)

@visheyra visheyra linked a pull request May 23, 2022 that will close this issue
3 tasks
@visheyra
Copy link
Author

visheyra commented May 23, 2022

first version here :) #105 waiting for your feedback, I'm checking to make the CI pass now

@visheyra
Copy link
Author

visheyra commented May 23, 2022

I'm not sure about the upgrade part, it looks like package installed by go install are frost and only changing the version and requiring a new go install is the way to do, unless using gup to manage those. Also it looks like version are mandatory now, How do you want to handle those cases ?

@ramereth ramereth linked a pull request Aug 8, 2022 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

1 participant