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

error while getting dependencies of the helm v3 package #11691

Closed
amitjain3087 opened this issue Jan 5, 2023 · 7 comments
Closed

error while getting dependencies of the helm v3 package #11691

amitjain3087 opened this issue Jan 5, 2023 · 7 comments

Comments

@amitjain3087
Copy link

Issue:-
I have done go get helm.sh/helm/v3 which is successfully happened but after that when I am doing go mod tidy I got
go: downloading GitHub - klauspost/compress: Optimized Go Compression Packages v1.13.6
go: finding module for package github.com/chai2010/gettext-go/gettext 1
helm.sh/helm/v3/pkg/kube imports
k8s.io/kubectl/pkg/cmd/util imports
k8s.io/kubectl/pkg/util/i18n imports
github.com/chai2010/gettext-go/gettext: module github.com/chai2010/gettext-go@latest found (v1.0.2), but does not contain package github.com/chai2010/gettext-go/gettext

Assumption:-
It seems that helm.sh/helm/v3/pkg/kube needs to update its reference to k8s.io/kubectl from v0.26.0 to v0.27.0 or later which looks to be the release where kubectl updated to v1.0.2 of github.com/chai2010/gettext-go where the package was changed from github.com/chai2010/gettext-go/gettext to just github.com/chai2010/gettext-go.

@Anshu-Garg
Copy link

Hi @amitjain3087 I faced same issue now. Any go.mod entries to get past the issue ?

@amitjain3087
Copy link
Author

Hi @Anshu-Garg, I am just pointing it to helm.sh/helm/v3 v3.9.4, but this is just a work around not a solution .
with v.3.10.* I am getting same issue

@gjenkins8
Copy link
Contributor

Can you be a bit more specific around your setup. If I create a basic go project that imports helm api, then go mod tidy works for me:

# dummy.go
package main

import (
	"helm.sh/helm/v3/pkg/action"
)

func main() {
	a := action.Configuration{}
	a.Log("hi")
}

Create the module/project:

$ go mod init example.com/m
$ go get helm.sh/helm/v3
# go.mod
module example.com/m

go 1.19

require helm.sh/helm/v3 v3.10.3 // indirect

Run go mod tidy:

$ go mod tidy # no error
$ cat go.mod
module example.com/m

go 1.19

require helm.sh/helm/v3 v3.10.3

require (
        github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
        ...

@amitjain3087
Copy link
Author

Can you be a bit more specific around your setup. If I create a basic go project that imports helm api, then go mod tidy works for me:

# dummy.go
package main

import (
	"helm.sh/helm/v3/pkg/action"
)

func main() {
	a := action.Configuration{}
	a.Log("hi")
}

Create the module/project:

$ go mod init example.com/m
$ go get helm.sh/helm/v3
# go.mod
module example.com/m

go 1.19

require helm.sh/helm/v3 v3.10.3 // indirect

Run go mod tidy:

$ go mod tidy # no error
$ cat go.mod
module example.com/m

go 1.19

require helm.sh/helm/v3 v3.10.3

require (
        github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
        ...

I am having go 1.17 in my environment , is that can be reason it is not working for me ??

@gjenkins8
Copy link
Contributor

I get a slightly different error if I set my go.mod version to go 1.17:

$ go mod tidy
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/Masterminds/sprig v2.22.0+incompatible
go: downloading go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489
example.com/m imports
        helm.sh/helm/v3/pkg/action imports
        k8s.io/cli-runtime/pkg/resource imports
        sigs.k8s.io/kustomize/api/krusty imports
        sigs.k8s.io/kustomize/api/resmap imports
        sigs.k8s.io/kustomize/kyaml/kio tested by
        sigs.k8s.io/kustomize/kyaml/kio.test imports
        github.com/stretchr/testify/mock imports
        github.com/stretchr/objx loaded from github.com/stretchr/objx@v0.2.0,
        but go 1.16 would select v0.4.0

To upgrade to the versions selected by go 1.16:
        go mod tidy -go=1.16 && go mod tidy -go=1.17
If reproducibility with go 1.16 is not needed:
        go mod tidy -compat=1.17
For other options, see:
        https://golang.org/doc/modules/pruning

Since go 1.17 is unsupported, I think you will need to update to go 1.18 (or 1.19).

@github-actions
Copy link

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Apr 13, 2023
@joejulian
Copy link
Contributor

Since this was answered and there's been no further activity, I'm going to go ahead and close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants