Skip to content

Conversation

V02460
Copy link
Contributor

@V02460 V02460 commented Jun 2, 2025

Code refactor of the config’s secrets section. Can be reviewed commit-by-commit.

Benefits

  • Makes some invalid states unrepresentable
  • Eliminates now-unnecessary checks in the validate function
  • Adds concurrent loading of key files
  • Creates a cleaner separation between deserialization and creation of key store

Noteworthy changes

  • This PR unifies the loading of keys from the config and file by no longer assuming a specific key format in either case.
  • The futures crate is added as a dependency to have access to the standard async tools try_join and try_join_all.

@V02460 V02460 marked this pull request as draft June 2, 2025 11:15
V02460 added 5 commits June 2, 2025 14:06
Signed-off-by: Kai A. Hiller <[email protected]>
Signed-off-by: Kai A. Hiller <[email protected]>
Signed-off-by: Kai A. Hiller <[email protected]>
@V02460 V02460 force-pushed the secrets-config-refactor branch from c6b4650 to c67fb80 Compare June 2, 2025 12:08
@V02460 V02460 marked this pull request as ready for review June 2, 2025 12:54
Copy link
Member

@sandhose sandhose left a comment

Choose a reason for hiding this comment

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

This is really cool, thank you!
Nice to see some concurrency in the loading, even though this is probably quite a insignificant optimisation :D

@V02460 V02460 force-pushed the secrets-config-refactor branch from 4b44052 to c5b1db7 Compare June 4, 2025 08:27
@V02460 V02460 requested a review from sandhose June 4, 2025 12:54
Copy link
Member

@sandhose sandhose left a comment

Choose a reason for hiding this comment

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

Thanks again for doing this!

@sandhose sandhose merged commit ae71b75 into element-hq:main Jun 5, 2025
19 checks passed
@sandhose sandhose added A-Configuration Related on what is configurable and how it can be configured T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. labels Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Configuration Related on what is configurable and how it can be configured T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants