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
nixos/rspamd: worker configuration, socket activation and tests #34562
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Please have a look at the missing description.
description = "The type of this worker"; | ||
}; | ||
bindSockets = mkOption { | ||
type = types.listOf (types.either types.str (types.submodule bindSocketOpts)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are missing a description here. That is also why @GrahamcOfBorg is reporting a build failure:
Option `services.rspamd.workers.<name>.bindSockets' has no description.
``
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now
@GrahamcOfBorg test rspamd |
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
The test errors seem to be because rspamd has subtests so the selection path should be With a selection path for each of |
@GrahamcOfBorg test rspamd.bindports rspamd.deprecated rspamd.ipv4only rspamd.ipv4only-socketActivated rspamd.simple rspamd.simple-socketActivated rspamd.socketActivated |
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Failure on aarch64-linux (full log) Partial log (click to expand)
|
@andir Ups I had inconsistently named the tests. Could I trouble you with redoing the @GrahamcOfBorg test command since the tests are now named consistently. |
@GrahamcOfBorg test rspamd.bindports rspamd.deprecated rspamd.ipv4only rspamd.ipv4only-socketActivated rspamd.simple rspamd.simple-socketActivated rspamd.socketActivated |
Success on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
}; | ||
imports = [ | ||
(mkRenamedOptionModule [ "services" "rspamd" "bindSocket" ] [ "services" "rspamd" "workers" "normal" "bindSockets" ]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add some deprecation deadlin from the beginning? Like saying "with 18.09 this will be removed!" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this more you probably also want to write a brief changelog entry about "breaking" changes in regards to rspamd ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well since this does a rename and is backwards compatible it isn't really a breaking change. It works exactly like before when using the old options it just gives you a warning as well.
I also wouldn't add a deadline for removal since having the old option supported has at the moment no downsides and no other usage of mkRenamedOptionModule
has such a deadline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know.. It was just my personal opinion that we should probably not carry everything for the remaining time of this project. :-)
Motivation for this change
These two commits add first tests for existing rspamd module and then updated the module so that you have more control over workers configuration and add support for socket activation.
Care has been taken for the updated module to stay compatible with existing configurations with tests to verify that this is the case.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)