-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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/bird: rename bird2 to bird, switch to bird3 by default #366190
base: master
Are you sure you want to change the base?
Conversation
d338013
to
26a60a8
Compare
Not sure wheter this should be classified as a |
8ab364a
to
1a6976e
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Defaulting to bird3 will break the configuration of some people. I would suggest to default to bird2 for now and throw a warning when the package option is not explicitly set and |
1a6976e
to
3c500ef
Compare
@snaakey Thanks for taking a look! Having a check requiring Users to set the package option when My worry with keeping bird2 as the default is that it's unclear how long both versions will be maintained. Probably long enough for the rather short stable window of NixOS, but still, i would prefer to do the switch for 25.05 and be done with it. |
89817ad
to
52b10b5
Compare
This comment was marked as outdated.
This comment was marked as outdated.
@@ -68,36 +69,38 @@ in | |||
}; | |||
|
|||
imports = [ | |||
(lib.mkRemovedOptionModule [ "services" "bird" ] "Use services.bird2 instead") | |||
(lib.mkRemovedOptionModule [ "services" "bird6" ] "Use services.bird2 instead") | |||
(lib.mkRemovedOptionModule [ "services" "bird2" ] |
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.
Why not use mkRenamedOptionModule and make package depending on stateVersion?
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.
Using mkRenamedOptionModule
is arguable but it can not give a custom user message.
Depending on stateVersion
is strange as the user has to handle the change anyways and the added package
option seems to be enough.
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.
because its not renamed but actually changed in this case. and having a general services.bird makes more sense in the first place as thats the general practice on nixpkgs in general, this is just bikeshedding imo and preventing useful things from happening on nixpkgs.
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.
Depending on
stateVersion
is strange as the user has to handle the change anyways and the addedpackage
option seems to be enough.
If we are using mkRenamedOptionModule and depend on stateVersion then a user doesn't have to do anything immediately and things just continue to work.
If we do it like the current proposal, any user using any of bird has to rename everything and set package to just have their setup continue to work OR migrate to bird3. Both variants are arguable bad in the sight of a "I'll fix the warning later" option.
because its not renamed but actually changed in this case.
No, you're wrong. If we depend on stateVersion like in many other modules eg: nextcloud or postgresql then there is no change.
having a general services.bird makes more sense in the first place
Yep but that is not my point.
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.
No, you're wrong. If we depend on stateVersion like in many other modules eg: nextcloud or postgresql then there is no change.
If we were to just pin the package there still would be changes:
- The name of the systemd service
- The user/group as which it's executed
- the location of the config file
For most Users this probably isn't relevant, but changing those still could break something somewhere.
One could now attempt to pin all of those values to the stateVersion but that appears to me like enormous complexicty and a testing and validation nightmare going forward.
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.
Depending on the stateVersion also has the drawback that in a fleet of old as well as new systems i would find it unexpected that with the same config (and stable release) one system runs one major version and another the other.
And with bird config i would find it highly likely that users will share config between multiple systems but since config in most cases probably validates with both versions issues may be quite subtle.
I think this should be enough. |
bc87edb
to
b0d9d4d
Compare
This is done to enable us to introduce bird3 without causing confusion.
This is done to allows to easier change which bird package should be used
This is done in view of the Release of the new v3 of Bird. Switch to the bird3 package for the `services.bird.package` option. Switch the `bird` package alias to bird3.
b0d9d4d
to
6e091ec
Compare
|
I'll thought about it again and i think for now we don't need such a check. It's added complexity and during debugging it is sometimes quite helpful to disable it shortly. But since i don't expect the "bird3" default to change anytime soon again it seems unncesary to enforce setting it now already. |
@@ -68,36 +69,38 @@ in | |||
}; | |||
|
|||
imports = [ | |||
(lib.mkRemovedOptionModule [ "services" "bird" ] "Use services.bird2 instead") | |||
(lib.mkRemovedOptionModule [ "services" "bird6" ] "Use services.bird2 instead") | |||
(lib.mkRemovedOptionModule [ "services" "bird2" ] |
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.
Depending on
stateVersion
is strange as the user has to handle the change anyways and the addedpackage
option seems to be enough.
If we are using mkRenamedOptionModule and depend on stateVersion then a user doesn't have to do anything immediately and things just continue to work.
If we do it like the current proposal, any user using any of bird has to rename everything and set package to just have their setup continue to work OR migrate to bird3. Both variants are arguable bad in the sight of a "I'll fix the warning later" option.
because its not renamed but actually changed in this case.
No, you're wrong. If we depend on stateVersion like in many other modules eg: nextcloud or postgresql then there is no change.
having a general services.bird makes more sense in the first place
Yep but that is not my point.
@SuperSandro2000 Posting the same reply twice is a really strange move. Was that intentional? I replied to you here: #366190 (comment) |
Now that there is a version 3 of bird i think we should cleanup some bird2 stuff and change the default bird package to v3.
In light of that i'm proposing to do a couple of things:
bird
package tobird2
bird3
packagebird
package alias which points tobird3
services.bird2
options toservices.bird
services.bird.package
option to allow changing the new bird3 defaultI would still keep bird2 around because as of now it seems to have a lower memory footprint and users could be required to adjust their config. And with both versions beeing supported officially (as of now, no word yet how long this will last), we might as well have both for the time beeing to enable a smooth transition.
The bird project has some notes on the migration to v3 here:
https://gitlab.nic.cz/labs/bird/-/blob/v3.0.1/doc/migration-bird3.md
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.