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 vault@v1.9.1 fails to compile properly due to known bugs in hashicorp/go-discover #13386

Closed
woohgit opened this issue Dec 10, 2021 · 8 comments

Comments

@woohgit
Copy link

woohgit commented Dec 10, 2021

# github.com/hashicorp/go-discover/provider/aliyun
../../golib/pkg/mod/github.com/hashicorp/go-discover@v0.0.0-20211203145537-8b3ddf4349a8/provider/aliyun/aliyun_discover.go:74:3: cannot use map[string]string{...} (type map[string]string) as type []ecs.TagType in field value

see:

It's kind of impossible to use the golang vault libs for a long time as they're broken after every release.

Can someone have a look and finally fix it? How come that it even properly compiles for the release...

@heatherezell
Copy link
Contributor

We don't support building Vault from source or using it as a dependency, as that can often run into conflicts when importing both vault, along with the api and sdk modules. We understand you may have your reasons to do this, but we don't offer much in the way of guarantees that this will work. As such, I'm going to go ahead and close this issue out. Thanks for understanding.

@woohgit
Copy link
Author

woohgit commented Dec 10, 2021

@hsimon-hashicorp Then please expose the &vault.TestCluster and everything related to firing up a test cluster to a package or in the SDK / API if possible.

We have hundreds of tests that is using vault.TestCluster to launch an in-memory vault cluster and run tests against it. And it was working before properly so I understand that "suddenly" it's not supported, but we need an alternative...

Especially since all examples you'll find on the internet about vault integration testing starts with importing

	"github.com/hashicorp/vault/vault"

I neither can't use

	client, closer := api.testVaultServer(t)
	defer closer()

as the api/testvaultServer is not exported.. so it's a bit hard to do any tests without really importing vault itself

And some official statement from a few years ago:

2021-12-11_11-07

@jeffwidman
Copy link
Contributor

@hsimon-hashicorp This has come up repeatedly on the issue tracker over the past few years... there is no public API for vault.TestCluster so folks are forced to import vault, which breaks repeatedly. As a result tickets get repeatedly filed/triaged as "wontfix", wasting the time of Hashicorp employees and demoralizing open source contributors.

Can you please consider creating / keep open a ticket tracking eventually adding a public API/SDK for vault.TestCluster so that the conversation could be kept in a single place and external folks like myself can subscribe for updates?

@heatherezell
Copy link
Contributor

@jeffwidman and @woohgit - thank you both for sharing your thoughts and needs around this functionality. We've been having discussions internally about how we could try to tackle this issue. Our concern is around a level of complexity and ongoing support, primarily, and there's a worry about how to implement this sort of request in a robust and stable way. I know this is a common pain point, so while I can't make any promises about whether or when this might be implemented, please know that I'll be advocating for this as best I can. Thank you both, again, for your time and your patience. :)

@jeffwidman
Copy link
Contributor

Can you please consider creating / keep open a ticket tracking eventually adding a public API/SDK for vault.TestCluster so that the conversation could be kept in a single place and external folks like myself can subscribe for updates?

Even if the eventual answer is "we aren't sure if we'll do this", having a single ticket would keep conversations centralized and give us a single point to subscribe/follow for the current thinking... vs today it's scattered across multiple closed tickets, so every time it comes up, it's a rehash of the previous conversation...

@peczenyj
Copy link

peczenyj commented Dec 28, 2021

We don't support building Vault from source or using it as a dependency, as that can often run into conflicts when importing both vault, along with the api and sdk modules. We understand you may have your reasons to do this, but we don't offer much in the way of guarantees that this will work. As such, I'm going to go ahead and close this issue out. Thanks for understanding.

I guess you should also close hashicorp/go-discover#183 - right @hsimon-hashicorp ?

@george-angel
Copy link

Hello, broadly want to echo @jeffwidman sentiment, and if thats too much, can we please have a statement in README saying "you can't have Vault unit tests", don't import "vault/vault" because it will break.

You gain nothing by having users find out the hard way the tests they wrote will constantly break and will become unfixable.

Thank you.

george-angel added a commit to utilitywarehouse/vault-kube-cloud-credentials that referenced this issue Oct 5, 2022
This is not supported and breaks every patch version update:
hashicorp/vault#13386
george-angel added a commit to utilitywarehouse/vault-kube-cloud-credentials that referenced this issue Oct 5, 2022
This is not supported and breaks every patch version update:
hashicorp/vault#13386
@ncabatoff
Copy link
Collaborator

@george-angel Done: https://github.com/hashicorp/vault#importing-vault

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

6 participants