Skip to content

Conversation

@gilcu3
Copy link
Contributor

@gilcu3 gilcu3 commented Oct 17, 2025

Closes #1293

@gilcu3 gilcu3 linked an issue Oct 17, 2025 that may be closed by this pull request
@gilcu3 gilcu3 marked this pull request as ready for review October 17, 2025 08:31
Copy link
Collaborator

@netrome netrome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is greenfield work I'd like us to prioritize adding tests alongside any new functionality. While the code looks correct (-ish, since we do sync I/O from an async function), I would like to see tests. Ideally the tests do not require filesystem interactions either, which requires a design update.

Ideally I'd picture LocalSecretsStorage to be a generic type that holds some type of handle we could read and write to. In production this would be an tokio::fs::File object for the secrets.json file. but in tests a plain Vec should do.

@netrome
Copy link
Collaborator

netrome commented Oct 17, 2025

I added an example for how to make the storage implementation testable without touching the file system in #1304

Copy link
Collaborator

@netrome netrome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for bearing with me. Just some nits but otherwise looks great. Ideally we'd use dedicated error types but I'm okay with skipping that for now.

@gilcu3 gilcu3 enabled auto-merge October 20, 2025 07:20
Copy link
Collaborator

@netrome netrome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff!

@gilcu3 gilcu3 added this pull request to the merge queue Oct 20, 2025
Merged via the queue into main with commit 7c92c84 Oct 20, 2025
15 of 17 checks passed
@gilcu3 gilcu3 deleted the 1293-cli-save-the-backup-services-secret-key-after-running-the-generate-keys-subcommand branch October 20, 2025 08:08
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.

Backup Service: persistent secret store

3 participants