nixos/rspamd: Allow worker type to be proxy again#51012
nixos/rspamd: Allow worker type to be proxy again#51012infinisil merged 1 commit intoNixOS:masterfrom
Conversation
infinisil
left a comment
There was a problem hiding this comment.
LGTM. Eventually I'd like to implement a warning and assertion system into the module system directly, so it should be easier to issue warnings from submodules.
|
@infinisil if you need help building that I am willing. |
There was a problem hiding this comment.
How about using apply in the option declaration instead?
There was a problem hiding this comment.
Ohhh nice, would be a lot easier. Would need a builtins.trace in it though and couldn't use the NixOS warnings options, but that's fine by me.
There was a problem hiding this comment.
I mostly didn't use apply in order to use config.warnings which seems the standard way of handling warnings.
There was a problem hiding this comment.
I'll argue that having so much code just for this is not worth it just for being more conventional. And actually I think that other modules are also not using config.warnings for submodules for the same reason.
When reworking the rspamd workers I disallowed `proxy` as a type and instead used `rspamd_proxy` which is the correct name for that worker type. That change breaks peoples existing config and so I have made this commit which allows `proxy` as a worker type again but makes it behave as `rspamd_proxy` and prints a warning if you use it.
4beca89 to
0d753af
Compare
|
Commit has now been rewritten to use |
Motivation for this change
When reworking the rspamd workers I disallowed
proxyas a type andinstead used
rspamd_proxywhich is the correct name for that workertype. That change breaks peoples existing config and so I have made this
commit which allows
proxyas a worker type again but makes it behaveas
rspamd_proxyand prints a warning if you use it.Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)