What should stable NixOS prioritize?

Yes! Shorter time between branch-off and release but with a freeze period for core changes before it.

Of course at that point those running master/unstable will be more affected.

2 Likes

Ideally master would be ā€œwell polishedā€ at that point. Do you mind clarifying how unstable users would be more affected?

I also think that stability is more important, especially in nixos: if I really want one recent software, I can still install that software from unstable and keep my system on stable. Also, Iā€™m curious to know: is there enough man power to deal with two releases per year? Iā€™ve the feeling that it takes quite some energy to release and maintain a stable branch (needs backports, but the backports cannot usually be done without some changesā€¦), and I donā€™t know if it is really important to have two releases per year. And if this energy could be used to maintain a more stable unstable branch, I would say it could be interesting.

The branches diverge over time, at a certain point, it becomes non-trivial to backport changes from master into the release branch. This is also why NixOS will probably never do a 4-5 yr LTS. Thatā€™s just too much upkeep, and probably making in-house patches for stuff to still build.

Yes, but I think we just have to do the practical thing about what we are supporting. Most distros donā€™t ship with 17 desktop managers, 34 window managers, and 60k+ packages. One of the reasons why I was proposing the delay to YY.05 and YY.11 release dates was to help align the releases with ā€œgood points in timeā€ for desktop managers on unstable. Which constituted the most ā€œin-houseā€ work for 20.09. In this last release, plasma was the biggest pain, as we were shipping systemd 246, a mix of qt 5.12, 5.14, and 5.15 with plasma 5.18.5 which really shouldnā€™t exist together.

Shipping plasma 5.19 could have been an option, but it would have been EOL a week or two after the original target release date, and thatā€™s awkward in case there is security issues, 5.18 is an LTS so we can rely on upstream for providing patches, but not for being compatible with things like the latest systemd. Moving the release date to november would mean that we could have packaged plasma 5.20, and kdeApplications on master before ZHF would start; and the 5.20 plasma release would have been supported for the majority of the 20.09 NixOS release. For gnome, we would just be lagging behind their releases by 4-6 weeks, which should be enough time for them to be packaged in nixpkgs.

2 Likes

A freeze period means certain changes wonā€™t come in for a while which people running a ā€œrolling distroā€ may expect.

cadence for staging is roughly 2 weeks when we arenā€™t ā€œcrammingā€. It would a single ~2 week cycle skipped. PRs for bumps would still be allowed into master as long as they wouldnā€™t cause any regressions.

1 Like

Make sense, thanks a lot for the clarification! For me any release time is good, even if itā€™s not always the same month depending on whatā€™s practical for you. And thanks everybody for the great work, youā€™re amazing :wink:

1 Like

I know others have chimed in already, but Iā€™d like to repeat that from my perspective shifting to NixOS 20.05 and 20.11 is essentially zero cost / downside, aside from the initial one-time churn and confusion. If @jonringer and other release managers think this simple shift will make a big positive difference Iā€™d say we should do it. It sounds like thereā€™s a lot of other stuff we can and should improve, too; but a simple +2m shift is a really easy hack.

9 Likes

We use NixOS for business (https://benaco.com) on the server and I use it on the desktop.

My opinions:

  • If shifting the release months reduces work, letā€™s do it. Companies donā€™t care in which months the stable releases are, only that they exist.
  • Heavy -1 on going rolling-release only. This would immediately disqualify NixOS for most companies. OS upgrades are already some of the riskiest things we do, because they change lots of moving parts. There is extreme value of the same upgrade paths being tested by lots of people (from the same versions, to the same versions). By having defined stable releases, it is easy to check that upstream package P actually supports upgrading from version A to version B. The ability to rollback does not address the rolling-release risk: Some stateful software (for example consul) does not support downgrading at all; after rollback, it will not start up. Lots of upstream software supports downgrading only a few versions. Stable OS releases help a lot here.
  • Basic -1 on yearly releases. I think 6-months releases are the sweet spot across the effort to upgrade, easy security patches backporting, and having new enough software for businesses.
21 Likes

@nh2 I strongly agree with all points on your post.

1 Like

Out of curiosity, is the stateful software problem not properly handled
by stateVersion? If not, do you have any idea how we could improve
stateVersion, or what other mechanism we could set up to reduce the
impact stable version upgrades have?

The problem I personally have in mind is, that stateVersion requires one
to bump all the stateful software of the system at the same time without
allowing for component-by-component upgrade. This problem would be
solved by splitting stateVersion into one stateVersion per component
(that would be a required option), but Iā€™m not sure this idea would also
actually alleviate the issues youā€™re seeing.

1 Like

Regarding stateVersion, I see some issues:

  • Itā€™s rarely used in nixpkgs. The postgresql service uses it, but e.g. consul doesnā€™t; weā€™d have to package multiple versions of a lot more software to even make it a possibility. Itā€™d also require providing multiple versions of entire language toolchains. Thatā€™d be quite an effort.
  • stateVersion results in people running old versions. Many projects donā€™t actually provide point releases with security fixes for older versions.
  • Even if the two issues above didnā€™t exist, I believe stateVersion would still not make a rolling release as good as stable releases, simply because stable makes 1000s of users go through the same upgrade from/to versions. This makes it easy to build a knowledge base of what fails during an upgrade, so that:
    1. People doing production stuff can wait a while before the upgrade and get a pretty good idea what is going to work and what isnā€™t, reducing risk;
    2. We can make fixes to the upgrade experience on the stable branch! That is completely impossible on rolling, where having a fixed upgrade experience might easily imply upgrading lots of other software to new major releases (some of which may not be backwards compatible enough; upstream may not allow you to skip a release).
  • In a rolling system, everybody would have to make their own picks between which two commits to upgrade, potentially having to bisect the history to find suitable commits for your own stateVersion in combination with the software you currently use. Thatā€™s quite an effort, and risky (nobody may have tried upgrading across that commit pair).

Not having component-by-component upgrades is a big issues, but thatā€™s not specific to stateVersion; it applies equally for releases. Itā€™d be great to be able to opt into per-component upgrades for heavily stateful services, I like that idea. For our setup we actually have our own Ceph packaging and services instead of using the nixpkgs ones, simply because that allows us to upgrade Ceph and NixOS independently (doing them simultaneously would be too risky for us).

By the way, I think the current description comment on stateVersion in the configuration.nix, isnā€™t good enough. Itā€™s truthful but it should be way more explicit that if you donā€™t update this, you will run e.g. an old postgresql. It refers the user to the manual docs for the option, but I think it should at least directly suggest to the user in that comment that itā€™s an actual good action item to eventually upgrade all services that use it and then bump it; the current wording of the comment sound a lot like ā€œdonā€™t touch itā€ so most people donā€™t even look up the details in the manual.

1 Like

Out of curiosity, is the stateful software problem not properly handled
by stateVersion? If not, do you have any idea how we could improve
stateVersion, or what other mechanism we could set up to reduce the
impact stable version upgrades have?

It is not actually aiming at the problem in question.

For many services it describes NixOS choices like directory layouts, but does not freeze the package or its ideas of state format or whatever.

The idea is that you can keep stateVersion the same roughly forever and still do package updates etc., including for services.

Thank you for this feedback!

FWIW, the issues with using modules from various versions of nixos is
what led me to start experimenting with alternatives to the module
system, which resulted in [1], with an example of how to use it at [2] ā€”
unfortunately, now that the proof-of-concept is done Iā€™ve lost
motivation to move forward with it, until I find a way to not have to
rewrite nixos modules to use them there at least ā€” itā€™d require a
massive effort to do the rewrite alone otherwise. So the project is on
hold for now, but feel free to poke me if youā€™d be interested in talking
about it further!

[1] GitHub - NixtOS/nixtos: NixtOS, the next-generation NixOS that builds on both GuixSD concepts on steroids and nixpkgs.
[2] https://github.com/NixtOS/nixtos/blob/f91a7fdd07cc488ed7cf1d950b2e4c3b2bb80f67/tests/example.nix

Out of curiosity, is the stateful software problem not properly handled
by stateVersion? If not, do you have any idea how we could improve
stateVersion, or what other mechanism we could set up to reduce the
impact stable version upgrades have?

It is not actually aiming at the problem in question.

For many services it describes NixOS choices like directory layouts, but does not freeze the package or its ideas of state format or whatever.

The idea is that you can keep stateVersion the same roughly forever and still do package updates etc., including for services.

Hmmā€¦ I guess opinions vary among maintainers? For instance, postgresql
is a good example of program that you canā€™t upgrade without bumping
stateVersion, but itā€™s true that a number of services donā€™t actually
receive the same amount maintenance work required to do that (and I
plead guilty to most likely have missed places where stateVersion should
have been used, though Iā€™m not sure even if I knew them Iā€™d put in the
sometimes significant amount of work required to change that beyond
writing release notes).

Hmmā€¦ I guess opinions vary among maintainers? For instance, postgresql
is a good example of program that you canā€™t upgrade without bumping

PostgreSQL is special in terms of a single version not even being
sufficient to upgrade from a previous one, you need both binaries or
a text dumpā€¦

For cross-reference.

RFC for changing release months: [RFC 0080] Change NixOS releases to YY.05,YY.11 by jonringer Ā· Pull Request #80 Ā· NixOS/rfcs Ā· GitHub

2 Likes

[RFC 0080] Change NixOS releases to YY.05,YY.11 by jonringer Ā· Pull Request #80 Ā· NixOS/rfcs Ā· GitHub has been accepted.

New release timeline is YY.05 and YY.11

8 Likes

So, after using unstable for my desktop for about a year, this is a much much better experience: I always get the latest version of software, I donā€™t have to re-check when the new version of NixOS is released, and, for me at least, thereā€™s no perceived differences in stability.

It does seem now that unstable is a misnomer, and that itā€™s just a rolling release.

11 Likes

Of borg has helped a lot. But by the same token there must be something that makes releases more, or else why are they so hard to cut?

The work that goes into releases benefit the unstable channel, so itā€™s important to remember (not saying you werenā€™t) that unstable is not a good representation of what weā€™d have if we only had a rolling releases.

3 Likes