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

Adding RPC handler to touch files #820

Merged
merged 2 commits into from
Feb 4, 2025
Merged

Conversation

aryanjassal
Copy link
Member

@aryanjassal aryanjassal commented Oct 1, 2024

Description

This PR implements a RPC handler which touches files. Touching a file means that a file must be created if it doesn't exist, or update its access/modification timestamps to current time if it does.

Most likely Polykey#821 needs to be finished before this can be done.

Issues Fixed

Tasks

  • 1. Create a VaultsSecretsTouch RPC handler
  • 2. Create files if they don't exist, update timestamps if they do
  • 3. Add support for doing so for multiple vaults in a single commit
  • 4. Add vaultOps.touchFile (or just do it manually in the handler)
  • 5. Write tests for VaultsSecretsTouch
  • 6. Write tests for vaultOps.touchFile (if it exists)

Final checklist

  • Domain specific tests
  • Full tests
  • Updated inline-comment documentation
  • Lint fixed
  • Squash and rebased
  • Sanity check the final build

@aryanjassal aryanjassal self-assigned this Oct 1, 2024
Copy link

linear bot commented Oct 1, 2024

@aryanjassal
Copy link
Member Author

In order to perform operations across vaults in a single commit, I will be re-using the header-content protocol developed during work on a similar issue for VaultsSecretsRemove handler.

First, a header message containing all the vault names will be sent, so a resource can be acquired for them all ahead of time. Then, each content message will perform all its actions within a single commit message in the vaults side.

@aryanjassal aryanjassal marked this pull request as ready for review February 3, 2025 05:34
@aryanjassal
Copy link
Member Author

I will now work on the command from Polykey CLI

@aryanjassal
Copy link
Member Author

The CI is passing for this, and the tests I performed in PKCLI are also working, so the secrets touch command seems to be working just fine. I will merge this along with the connected PR in PKCLI.

@aryanjassal aryanjassal merged commit 7d78a29 into staging Feb 4, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant