-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Fix bugs in CONFIG REWRITE, omitting rename-command and include lines, and inserting comments around module and acl configs #10761
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
Conversation
|
What about configs like |
|
I thought we had a test for this (config rewrite of loaded modules added here #4848), can you look into it, and add what's needed to make it fail on that bug? |
|
@oranagra The This PR is mainly to avoid the following situation where there is an extra line of comment. |
|
Ohh got it. So it adds warning comments when trying to read the old file, but it doesn't prevent it from injecting them to the new file (not commented) so the test passes. So that means that this regression is harmless? (other than looking bad) |
@oranagra Correct. Just something that can cause users' confusion. Don't have any negative effects on redis runtime. |
|
looking more at the history of that block and the recent changes to it, the relevant discussions i could find are:
i may be missing something so i'd like to call @nichchun and @yoav-steinberg to take a look. in retrospect, i think i'd like to revert that condition to the same as it was originally (i.e. the alternative would be to keep the current code, but extend it with more exceptions, i.e. everything that's explicitly supported at the bottom of |
|
@zhugezy can you check why the tests are failing and report? |
|
@zhugezy are you gonna pick this up? prints: probably because that test involves two modules, and after the rewrite only one survives... additionally, i'd like to make sure it properly handles the other special configs lines (rename-command, include, user, sentinal) |
|
apparently the reason the tests fail is because the fix was broken (negated). more importantly, this bug was not harmless, a CONFIG REWRITE would have removed would someone review my changes, so that i can merge them? |
|
i also updated the top comment and description, please validate that. |
@oranagra Looks fine. thanks! |
…, and inserting comments around module and acl configs (redis#10761) A regression from redis#10285 (redis 7.0). CONFIG REWRITE would put lines with: `include`, `rename-command`, `user`, `loadmodule`, and any module specific config in a comment. For ACL `user`, `loadmodule` and module specific configs would be re-inserted at the end (instead of updating existing lines), so the only implication is a messy config file full of comments. But for `rename-command` and `include`, the implication would be that they're now missing, so a server restart would lose them. Co-authored-by: Oran Agra <oran@redislabs.com>
A regression from #10285 (redis 7.0).
CONFIG REWRITE would put lines with:
include,rename-command,user,loadmodule, and any module specific config in a comment.For ACL
user,loadmoduleand module specific configs would be re-inserted at the end (instead of updating existing lines), so the only implication is a messy config file full of comments.But for
rename-commandandinclude, the implication would be that they're now missing, so a server restart would lose them.