hashicorp / go-kms-wrapping

KMS wrapping libraries split out from Vault
Mozilla Public License 2.0
58 stars 43 forks source link

Invalid version of sdk #19

Closed ghost closed 4 years ago

ghost commented 4 years ago

Hi, I am facing the exact same error message as https://github.com/hashicorp/go-kms-wrapping/issues/13 when I try to get the latest version of vault (or any 1.4.x version):

go: github.com/hashicorp/vault@v1.4.3 requires
    github.com/hashicorp/go-kms-wrapping@v0.5.1 requires
    github.com/hashicorp/vault/sdk@v0.1.14-0.20191229212425-c478d00be0d6: invalid version: unknown revision c478d00be0d6

I can use a 1.3.x version, but this requires

    github.com/hashicorp/vault/api v1.0.5-0.20191017185408-8c0e790cc8e1

which adds about 700 lines to the go.sum.

I need the vault package as I am using "github.com/hashicorp/vault/vault" which installs it.

Could you please expand on what you meant by 'master should work fine' in https://github.com/hashicorp/go-kms-wrapping/issues/13? Thanks!

ghost commented 4 years ago

I've cleaned out the cache from my mod folder in the GOPATH and still getting the error

countingtoten commented 4 years ago

I had the same issue, but it was resolve when I switched to using the official go proxy which has a copy of that deleted commit. Update the GOPROXY env to include proxy.golang.org. If you need to keep some domains/projects private, update GOPRIVATE as well.

❯ go env GOPROXY
https://proxy.golang.org,direct
❯ go env GOPRIVATE
*.internal.yourprivateprojects.com,github.com/yourprivateprojects
jefferai commented 4 years ago

This is not a problem with this library, it's a problem with Vault. The version of Vault libs you're using are tied to a tag here that was during its transition out of Vault and thus was depending on a Vault branch that has since gone away. Use more recent Vault and you should be fine.

thotz commented 3 years ago

@jefferai : can please point to the right version of vault lib need to be used, whether v1.4.4 works or we need to use v1.5 ??

jefferai commented 3 years ago

I'm honestly not sure. Keep in mind the Vault sdk package isn't tagged with the vault main package. Make sure you're using master.

thotz commented 3 years ago

@jefferai : Okay Thanks. But when I try to update the mod, it throws me following error

go get github.com/hashicorp/vault@master
go: github.com/hashicorp/vault@v1.4.2 requires
    github.com/hashicorp/go-kms-wrapping@v0.5.1 requires
    github.com/hashicorp/vault/sdk@v0.1.14-0.20191229212425-c478d00be0d6: invalid version: unknown revision c478d00be0d6

go.mod has

module github.com/libopenstorage/secrets

go 1.13

require (
        github.com/Azure/azure-sdk-for-go v36.2.0+incompatible
        github.com/Azure/go-autorest/autorest v0.9.2
        github.com/Azure/go-autorest/autorest/adal v0.7.0
        github.com/Azure/go-autorest/autorest/to v0.3.0
        github.com/IBM/keyprotect-go-client v0.5.1
        github.com/aws/aws-sdk-go v1.25.41
        github.com/golang/mock v1.4.3
        github.com/hashicorp/go-hclog v0.14.1
        github.com/hashicorp/vault v1.4.2
        github.com/hashicorp/vault/api v1.0.5-0.20200902155336-f9d5ce5a171a
        github.com/pborman/uuid v1.2.0
        github.com/portworx/dcos-secrets v0.0.0-20180616013705-8e8ec3f66611
        github.com/portworx/kvdb v0.0.0-20200929023115-b312c7519467
        github.com/portworx/sched-ops v0.0.0-20200831185134-3e8010dc7056
        github.com/sirupsen/logrus v1.4.2
        github.com/stretchr/testify v1.4.0
        golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
        google.golang.org/api v0.14.0
        google.golang.org/protobuf v1.25.0 // indirect
)

replace (
        github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.0+incompatible
        github.com/hashicorp/consul => github.com/hashicorp/consul v1.5.1
        github.com/kubernetes-incubator/external-storage => github.com/libopenstorage/external-storage v5.1.0-openstorage+incompatible
        github.com/kubernetes-incubator/external-storage v0.0.0-00010101000000-000000000000 => github.com/libopenstorage/external-storage v5.1.0-openstorage+incompatible
        github.com/prometheus/prometheus => github.com/prometheus/prometheus v1.8.2-0.20190424153033-d3245f150225
        k8s.io/api => k8s.io/api v0.15.11
       k8s.io/cli-runtime => k8s.io/cli-runtime v0.15.11
        k8s.io/client-go => k8s.io/client-go v0.15.11
        k8s.io/cloud-provider => k8s.io/cloud-provider v0.15.11
        k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.15.11
        k8s.io/code-generator => k8s.io/code-generator v0.15.11
        k8s.io/component-base => k8s.io/component-base v0.15.11
        k8s.io/cri-api => k8s.io/cri-api v0.15.11
        k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.15.11
        k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.15.11
        k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.15.11
        k8s.io/kube-proxy => k8s.io/kube-proxy v0.15.11
        k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.15.11
        k8s.io/kubectl => k8s.io/kubectl v0.15.11
        k8s.io/kubelet => k8s.io/kubelet v0.15.11
        k8s.io/kubernetes => k8s.io/kubernetes v1.16.0
        k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.15.11
        k8s.io/metrics => k8s.io/metrics v0.15.11
        k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.15.11
)

Can please suggest the steps to update the go mod with master branch?

I tried removing entry from go.mod still the result the same

go get github.com/hashicorp/vault@master
go: finding github.com/hashicorp/vault master
go get: github.com/hashicorp/vault@v1.2.1-0.20201109194903-70ccf02f05cb requires
    github.com/hashicorp/vault/api@v1.0.5-0.20201001211907-38d91b749c77: invalid version: unknown revision 38d91b749c77
jefferai commented 3 years ago

You need to run that command on the sdk submodule.... github.com/hashicorp/vault/sdk.