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

Fix multiple requests to Chef server #365

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

unix-way
Copy link

@unix-way unix-way commented Nov 19, 2020

Reduce the number of requests to Chef server for secrets in sparse mode.

Description

We noticed that when loading a secret in sparse mode, chef-vault makes as much as six requests to Chef server while retrieving the client's data bag encryption key, which is caused by multiple calls of sparse_key method. These changes reduce the number of such requests to one.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

Signed-off-by: Kirill Lyubchenko <kirill.lyubchenko@applovin.com>
@unix-way unix-way requested review from a team as code owners November 19, 2020 01:20
@unix-way unix-way marked this pull request as draft December 1, 2020 21:58
* Converted tmpcache to hash, renamed variable
* Re-initialize hash in delete method

Signed-off-by: Kirill Lyubchenko <kirill.lyubchenko@applovin.com>
@unix-way unix-way marked this pull request as ready for review December 15, 2020 02:58
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

Successfully merging this pull request may close these issues.

1 participant