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

Add a non breaking feature for module configs to support validation & rejection of config sets #144

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

KarthikSubbarao
Copy link
Member

@KarthikSubbarao KarthikSubbarao commented Dec 4, 2024

Add a non breaking feature for module configs to support validation & rejection of config sets

Also added integration testing for validation of new functionality and to ensure it is non breaking

Implements #123

… rejection of config sets

Signed-off-by: Karthik Subbarao <[email protected]>
@dmitrypol
Copy link
Collaborator

dmitrypol commented Dec 6, 2024

nit: @KarthikSubbarao could you please rebase with PR I just merged run cargo fmt?

@@ -61,19 +115,23 @@ valkey_module! {
configurations: [
i64: [
["i64", &*CONFIGURATION_I64, 10, 0, 1000, ConfigurationFlags::DEFAULT, Some(Box::new(on_configuration_changed))],
["reject-i64", &*CONFIGURATION_REJECT_I64, 10, 0, 1000, ConfigurationFlags::DEFAULT, Some(Box::new(on_configuration_changed)), Some(Box::new(on_i64_config_set::<ValkeyString, ValkeyGILGuard<i64>>))],
Copy link
Collaborator

Choose a reason for hiding this comment

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

tiny nit: could you stick to snake_case just to be consistent in all 4 examples

Signed-off-by: Karthik Subbarao <[email protected]>
@KarthikSubbarao
Copy link
Member Author

Thank you for helping review this, @dmitrypol. I addressed the comments in this commit: 809af26

@dmitrypol dmitrypol merged commit 0a1fb4e into valkey-io:main Dec 6, 2024
1 check passed
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.

2 participants