Skip to content
This repository was archived by the owner on Mar 12, 2020. It is now read-only.

Refactor Key/Value logic into KvClient#74

Open
winpat wants to merge 26 commits intoadfinis:masterfrom
winpat:refactor_kv_logic
Open

Refactor Key/Value logic into KvClient#74
winpat wants to merge 26 commits intoadfinis:masterfrom
winpat:refactor_kv_logic

Conversation

@winpat
Copy link
Copy Markdown
Contributor

@winpat winpat commented Feb 8, 2019

With the more recent Vault releases, a version 2 of the key/value backend has been introduced. This new version has a different URL scheme, which is not compatible with the old one. (This is due to the fact that secrets are versioned in v2.)

Since we don't want to encode the logic of different URL schemes in every command, we refactor this into a new KvClient abstraction. This not only simplifies the code of the commands but also makes the code better testable.

This MR will be the base to support multiple versions of the k/v backend in the future.

@winpat winpat force-pushed the refactor_kv_logic branch from 96587d1 to d7aedae Compare April 18, 2019 15:43
@winpat winpat force-pushed the refactor_kv_logic branch from fcf5ac5 to d7aedae Compare April 18, 2019 15:58
@winpat winpat requested a review from hairmare April 18, 2019 16:31
@winpat winpat force-pushed the refactor_kv_logic branch from d7aedae to 33695ce Compare April 18, 2019 16:35
@winpat
Copy link
Copy Markdown
Contributor Author

winpat commented Apr 18, 2019

Looks like the tests are a bit flaky. I will fix them first.

@winpat winpat removed the request for review from hairmare April 18, 2019 16:48
@czosel czosel requested a review from hairmare April 23, 2019 06:42
@winpat winpat removed the request for review from hairmare October 23, 2019 11:07
@hairmare
Copy link
Copy Markdown

@winpat This fail is still open, other than that the changes look sane.

--- FAIL: TestList/ListExistingSecretsRecursively (0.01s)
   list_test.go:88: Wrong exit code. errors: 
       Unkown error occured: [*errors.errorString] "Secret does not exist"

@hairmare hairmare self-requested a review December 12, 2019 16:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants