No team was using the feature of having multiple GitHub teams, and this
would make it tricky to try to sync maintainer teams with GitHub teams.
(cherry picked from commit 1ea51e1f1a)
This has been broken for months, since all the interface to `ci/eval`
changed. Nobody noticed, so nobody is using it.
(cherry picked from commit 44e4c1ba9f)
The script is part of CI and changes to it should be reviewed by the CI
owners. Thus moving it to ci/ is the most sensible thing to do.
(cherry picked from commit ad4b36d2d2)
The CI job calls this as trusted/maintainers/..., i.e. with a working
directory outside the checkout. The git commands inside the script
assume to be inside the checkout, though, so let's force that.
(cherry picked from commit 642de212a6)
Bash will not propagate the exit code from a subshell within a
herestring, so the script silently passes when git throws an error
there. Re-arranging things a bit and an error will now be thrown.
(cherry picked from commit d283c3b36f)
When updating GNOME packages in reverse topological order using the following command:
nix-shell maintainers/scripts/update.nix --arg predicate '(path: pkg: builtins.any (team: team.shortName == "GNOME") pkg.meta.teams or [])' --argstr order reverse-topological
the `update.py` script would crash with `ValueError` on calling `ordered.index("adwaita-fonts")`.
This happened because the `adwaita-fonts` does not depend on any other GNOME package, nor it is depended upon by one.
As a result, it had been discarded by the `reverse_edges` function.
Co-authored-by: Philip Taron <philip.taron@gmail.com>
We already have a generic keep-sorted workflow, so we don't need to roll
our own for the maintainers list.
This will result in a slightly different order, because the nix script
ignored "-" and "_", while keep-sorted sorts them first. But, the order
is consistent and that's what matters.
I've added the tests because I like the ability to check the behavior of
the plugin when run in the sandbox without my crazy config.
It also helps documenting how to check the plugin when running updates.
Previously, when updating multiple packages, we just updated them in arbitrary order. However, when some of those packages depended on each other, it could happen that some of the intermediary commits would not build because of version constraints on dependencies.
If we want each commit in the history to build when feasible, we need to consider four different scenarios:
1. Updated dependant is compatible with both the old and the new version of the dependency. Order of commits does not matter. But updating dependents first (i.e. reverse topological order) is useful since it allows building each package on the commit that updates it with minimal rebuilds.
2. Updated dependant raises the minimal dependency version. Dependency needs to be updated first (i.e. topological order).
3. Old dependant sets the maximal dependency version. Dependant needs to be updated first (i.e. reverse topological order).
4. Updated dependant depends on exact version of dependency and they are expected to be updated in lockstep. The earlier commit will be broken no matter the order.
This change allows selecting the order of updates to facilitate the first three scenarios. Since most package sets only have loose version constraints, the reverse topological order will generally be the most convenient. In major package set updates like bumping GNOME release, there will be exceptions (e.g. libadwaita typically requires GTK 4 from the same release) but those were probably in broken order before as well.
The downside of this feature is that it is quite slow – it requires instantiating each package and then querying Nix store for requisites.
It may also fail to detect dependency if there are multiple variants of the package and dependant uses a different one than the canonical one.
Testing with:
env GNOME_UPDATE_STABILITY=unstable NIX_PATH=nixpkgs=$HOME/Projects/nixpkgs nix-shell maintainers/scripts/update.nix --arg predicate '(path: pkg: path == ["gnome-shell"] || path == ["mutter"] || path == ["glib"] || path == ["gtk3"] || path == ["pango"] || path == ["gnome-text-editor"])' --argstr order reverse-topological --argstr commit true --argstr max-workers 4