-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[VAULT-3157] Move mergeStates
utils from Agent to api module
#12731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor nits, but otherwise looks good!
Better make sure this works on Enterprise too. ParseRequiredState is used in some ent-specific files. |
@ncabatoff the last spot that needs to be updated in Vault Enterprise is here in I'll open a PR on the |
Yup, that's the usual practice. Just don't want you to be caught unawares and scrambling to fix the build. |
This PR moves the utils
mergeStates
,compareStates
fromapi_proxy.go
in Agent toclient.go
in the API module. In addition,ParseRequiredStates
from thehashicorp/vault/vault
package is also moved toclient.go
. TheParseRequiredStates
andmergeStates
methods are also made public.These methods need to be accessed by the Terraform Vault Provider in order to provide consistent X-Vault-Index header support.