Skip to content

Adding RPC handler to touch files#820

Merged
aryanjassal merged 2 commits intostagingfrom
feature-unix-touch
Feb 4, 2025
Merged

Adding RPC handler to touch files#820
aryanjassal merged 2 commits intostagingfrom
feature-unix-touch

Conversation

@aryanjassal
Copy link
Contributor

@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
@linear
Copy link

linear bot commented Oct 1, 2024

@aryanjassal
Copy link
Contributor 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
Contributor Author

I will now work on the command from Polykey CLI

@aryanjassal
Copy link
Contributor 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