-
Notifications
You must be signed in to change notification settings - Fork 4
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
Updating behaviour of VaultsSecretsGet
to align with requirements of secrets cat
#805
Conversation
I have implemented basic functionality for displaying file contents for multiple files, and updated the tests in I still need to review the issue spec and all the code to ensure everything's ready for review. |
MatrixAI/Polykey-CLI#243 (comment) I'm going to go ahead with the assumption that we need to implement support for listing contents for files from multiple vaults concurrently, as that makes sense and retains consistency with UNIX commands and I will wait for review of my approach from |
69e9b36
to
e44a713
Compare
The naming of secret commands has changed from what it was. The intention was to keep using the pattern of We are kinda moving away from the pattern. This was hard to detect as this change was made one-at-a-time across multiple PRs. We might need to look into this and set a standard pattern to follow for ensuring consistency. |
af985a8
to
d777f92
Compare
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.
Small changes, just check your tests are only testing the specific condition we want.
a1623a4
to
2ffd590
Compare
While I am writing the tests, I can see that we use RPC calls everywhere, even when we don't need to. For example, if we are testing This introduces slowdowns as each RPC call takes time to complete. A faster method of doing the same would be to acquire a vault, and perform @tegefaulkes and I had a chat about this, and he was also of the same opinion as I, but he mentioned how all the tests would need to be updated to ensure consistency. How should I deal with this? Do I make a new issue tracking this? It should be relatively straightforward, so maybe this can be something @brynblack could attempt once she gets into Polykey Core development. |
2ffd590
to
acf03b3
Compare
It's some thing we can address later. I think we should make a new issue for it. It should be a general review and refactor of the vaults domain tests. I think one for the CLI and one for Polykey. You mentioned that the vaults tests is one big test file. We should look into splitting that out again but we need to check if it still crashes the CI. The other part is dealing with the |
Looks good to me. |
feat: concatenates secrets from multiple vaults feat: updated RPC handlers taking multiple secret paths to use duplex streams chore: updated tests chore: updated metadata assignment chore: simplified tests chore: separated tests for deleting directories recursively chore: added option to continue on error
90aeb6a
to
81510fd
Compare
All tasks have been completed for this PR, all checks are passing, and reviews has also been approved. Merging. |
Description
The current
VaultsSecretsGet
only gets a single secret from the vault, and returns it in the form of aUnaryHandler
, meaning for large files, the RPC call will timeout. It also fetches only one file at a time, so behaviour like UNIX'scat
command isn't possible.This PR aims to fix that issue by switching over the RPC handler to a
ServerHandler
, supporting larger files. This PR also adds support for listing the contents of multiple files in order, like whatcat
does.Issues Fixed
secrets cat
command Polykey-CLI#243Tasks
UnaryHandler
toStreamHandler
Final checklist