Stable branch backporting criteria

Hi all,

I want to clarify interpretation of packages Backporting criteria documented in CONTRIBUTING file.

One of the (many) features of nixpkgs which got me interested was the policy for stable branches backports - the fact that there is no fear to backport packages bug fix releases. But the real world experience is not that straightforward. There where different opinions and two of such backporting PRs where rejected.

My view on backporting bug fix releases is following:

  1. Yes, there is always a chance that they will introduce new issues and it happens from time to time
  2. But they usually fix much more issues than they introduce
  3. I would very much prefer taking the risk and have version X.Y.5 with 50 bugs fixed + potentially very few new ones introduced, comparing to have X.Y.0 with 50 already known bugs.
  4. We can always roll back

What’s your opinion ?

This post was written with best intentions to clarify the process, I really don’t want to blame anybody and I very much appreciate all comments. Thank you

2 Likes

That’s changing the ā€œpatchā€ part of version, falling under the ā€œpatch updatesā€ in criteria. But I’d say the tradeoffs depends on the particular package, e.g. some don’t follow a scheme close to semver, etc.

Thanks @vcunat , I am talking about packages which mostly semver scheme.

Any more opinions ?

Do we guarantee the <pkg>.overrideAttrs interface stability when backporting to the release branch?

Specifically, does changes like ā€œtreewide Python package pytestFlagsArray → enabledTestPathsā€ allowed to backport even if pytestFlagsArray is already deprecated documentation-wise on the release branch?

There aren’t rules for such particular details. People have do judge how disruptive a change (probably) is :person_shrugging:

1 Like

There actually is mention of this in the pkgs/by-name/README.md, it doesn’t seem to get followed all too much though, especially because it’s seemingly only mentioned here and not as a standard guideline. I agree with it being a backwards-incompatible change but again, it’s not very clear whether this guidelines should apply to everything, or just by-name migrations.

IIUC, pkgs/by-name/README.md only mentions <pkg>.override, not <pkg>.overrideAttrs. Backward-incompatible changes to the <pkg>.override interface is currently considered a backward-incompatible change to Nixpkgs, but it doesn’t apply to the <pkg>.overrideAttrs interface.

Huh, I definitely misread the comment as .override and not .overrideAttrs, my mistake.

There’s been a couple of times where I’ve seen this sort of thing PR’d and merged, despite having been advised against it. Is there any due process to follow on how to handle that?

I haven’t seen an explicit documentation of the policy despite the frequent occurrence of the term ā€œoverride interfaceā€ in the release notes. Maybe this is yet another example of the unspoken rules of Nixpkgs contribution.

Seems so. Think it would be nice if it was standard, would help formally reject someone’s PR until they fix the aforementioned issue.