1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-08 02:38:11 +09:00
Commit graph

287 commits

Author SHA1 Message Date
Philip Taron
a6923016c9
ci/nixpkgs-vet: fix random errors (#413239) 2025-06-02 12:49:27 -07:00
Philip Taron
200cca18f1
ci: update pinned nixpkgs & treefmt-nix and manage via npins (#412758) 2025-06-02 08:54:36 -07:00
Pol Dellaiera
85483670ef
librewolf-unwrapped: 139.0-1 -> 139.0.1-1; add owners (#412343) 2025-06-02 16:25:47 +02:00
Peder Bergebakken Sundt
c106a5bc27 ci/codeowners-validator: fix typo in comment
split of from https://github.com/NixOS/nixpkgs/pull/413240 to avoid backporting that PR
2025-06-02 16:06:16 +02:00
Wolfgang Walther
3dd14d8a51
ci/nixpkgs-vet: fix random errors
Every now and then, the nixpkgs-vet CI job currently fails with one of:

  error: creating symlink
'/build/.local/share/nix/root/nix/var/nix/gcroots/profiles' ->
'/build/.local/share/nix/root/nix/var/nix/profiles': File exists

  error: SQLite database
'/build/.local/share/nix/root/nix/var/nix/db/db.sqlite' is busy

It's hard to reproduce for me, so just taking a guess with the required
changes.
2025-06-02 15:50:32 +02:00
Wolfgang Walther
f0923df7f5
ci/pinned: update
From the nixpkgs-unstable channel:
https://hydra.nixos.org/eval/1815701#tabs-inputs
2025-06-02 09:13:16 +02:00
Wolfgang Walther
f7c25f0bf9
ci/pinned: manage nixpkgs and treefmt-nix with npins
Instead of rolling our own update script which only works for a single
pin, let's use npins. We can then use it for the treefmtNix pin as well,
which was mostly unmaintained, so far.
2025-06-02 09:13:11 +02:00
Wolfgang Walther
f2479721e4
ci/nixpkgs-vet: remove left-over pin
We're now consuming nixpkgs-vet from the pinned-nixpkgs, but apparently
forgot to remove all of this.
2025-06-02 09:13:08 +02:00
Wolfgang Walther
9e2e91b737
OWNERS: simplify workflow/ci owners (#412688) 2025-06-02 07:09:34 +00:00
Wolfgang Walther
b429336d37
workflows: replace API calls from bash with github-script (#412659) 2025-06-01 10:05:31 +00:00
Wolfgang Walther
856792f93e
workflows/check-cherry-picks: truncate long diffs after 10k characters
GitHub comments have a length limit, so we can't just dump everything.
The 10k limit is arbitrary, but the assumption is that reviewing the
range-diff is not the sensible thing to do once it becomes a certain
size - reviewing the regular diff and treating the commit as "new" is
easier to do in that case. Thus, truncating should work out fine,
especially when the full range-diff is still available in the runner
log.

This could still end up in with an error, if a PR has multiple commits,
which all hit the limit. Let's get there first, before we try to fix
that hypothetical case, too.
2025-06-01 09:35:51 +02:00
Wolfgang Walther
515b174c42
workflows/check-cherry-picks: post review comments
Instead of failing the job, the workflow will now post review comments
as "Request Changes". This makes the feedback more readily visible and
avoids having to merge despite a failing CI job. It is also a
pre-requisite to enable required status checks / required workflows in
the future.

Committers are asked to confirm the differences by explicitly dismissing
the generated review. After dismissal, the related review comment will
automatically be marked as "resolved".

The comments only report warnings and errors. Reviews are automatically
dismissed when they have been addressed by the author and no problems
remain. If problems remain, existing, still pending, review comments
will be updated. If the same problems had already been dismissed
earlier, no new review comment will be created either.
2025-06-01 09:35:47 +02:00
Wolfgang Walther
3dff9c34c0
ci/check-cherry-picks: improve formatting of failure reports 2025-06-01 09:35:46 +02:00
Wolfgang Walther
6054a8f217
ci/check-cherry-picks: refactor output / logging
This way it's a bit more centralized and easier to extend.
2025-06-01 09:35:45 +02:00
Wolfgang Walther
30600ac6d1
ci/check-cherry-picks: set -u 2025-06-01 09:35:44 +02:00
Wolfgang Walther
4c345b2fb4
ci/check-cherry-picks: remove unused condition
The command substitution style we recently switched to strips trailing
newlines, so we don't need to check for empty lines anymore.
2025-06-01 09:35:42 +02:00
Wolfgang Walther
b98e7bb95a
OWNERS: simplify workflow/ci owners
The current setup causes the Security team and the other owners of
.github/workflows to **not** be pinged for the
check-format/codeowners-v2/nixpkgs-vet workflows. This was highly likely
unintended when adding those additional rules, so removing them.

Also, we have some owners looking after `workflows/`, but not `ci/` -
and some the other way around. This doesn't make much sense to me, since
both parts depend on each other very much.
2025-05-31 17:04:54 +02:00
Wolfgang Walther
4b31cabd6c
workflows/eval: add header for packages in summary
After the stats were added with a header, the list of packages now
appeared directly below it, without any separation.
2025-05-31 14:35:05 +02:00
Jörg Thalheim
db4bff05d5
workflows/manual-nixpkgs: build nixpkgs on staging and stable branches (#412102) 2025-05-31 09:21:20 +02:00
Andrew Marshall
fa7b5cc939 librewolf-unwrapped: add owners
Since the bot does not seem to pick up maintainers for changes to e.g.
`src.json` and so manual review is needed. This should resolve that.
2025-05-30 20:40:27 -04:00
Wolfgang Walther
6b0d494178
ci/check-cherry-picks: add staging-next as pickable branches (#412306) 2025-05-30 11:15:42 +00:00
Wolfgang Walther
802f353d05
ci/check-cherry-picks: add staging-next as pickable branch
Even though there is only a small window where a commit is not on
staging, but already on staging-next, it is technically valid to
backport commits from staging-next, too.
2025-05-30 13:04:31 +02:00
Wolfgang Walther
ef1077013b
workflows/manual-nixpkgs: build nixpkgs manual on staging and stable branches
By using the pinned nixpkgs we have for CI, we can lift the restriction
of building the nixpkgs manual only in PRs targeting master.

At the same time, this uses the pinned nixpkgs for the doc/ folder's dev
shell. This allows entering that shell while working on a staging-based
branch and write documentation.

Why should staging be un(der)documented, after all?

Note: The package that is available in nixpkgs as pkgs.nixpkgs-manual
will still be built with the current nixpkgs checkout, not the pinned
version. This is the same that hydra builds.
2025-05-29 17:06:40 +02:00
Wolfgang Walther
2f097cae61
ci: Update pinned Nixpkgs
From the nixpkgs-unstable channel:
https://hydra.nixos.org/eval/1815639#tabs-inputs
2025-05-29 16:27:56 +02:00
Wolfgang Walther
6847270de2
ci/check-cherry-picks: add staging as pickable branch again
This was accidentally removed in
ea636d1728, left-over from debugging.
2025-05-29 13:22:49 +02:00
Nicolas Mémeint
c599075cba OWNERS: add owners for authelia files 2025-05-28 21:49:14 +02:00
John Titor
1dbd102380 OWNERS: take ownership of androidenv, android-studio and related packages and documentations
request-maintainers.sh script can be a bit unreliable, declaring ownership of certain paths allows
notification even when it is misbehaving. https://github.com/NixOS/nixpkgs/pull/404791#issuecomment-2856635870

wildcard paths are used intentionally so we don't have to change this often
if new packages are added/removed

Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
2025-05-28 23:26:23 +05:30
Jörg Thalheim
425237e23b
ci/check-cherry-picks: fail without proper cherry-pick (#411709) 2025-05-28 15:55:16 +02:00
Wolfgang Walther
ea2ba8b5c1
ci/eval: don't evaluate packages marked as broken (#409867) 2025-05-28 13:36:19 +00:00
Wolfgang Walther
dfaefc0535
ci/check-cherry-picks: fail without proper cherry-pick
When cherry-picking without -x or not cherry-picking at all, the
check-cherry-picks job would usually remain green. This is annoying to
deal with for reviewers, because "all green" still needs attention -
have all commits been cherry-picked properly?

If a commit was not cherry-picked correctly, either without -x or not at
all, because it's a genuine commit to begin with, the reviewers
attention is required anyway. Thus we can also let the job fail in this
case.
2025-05-28 15:31:32 +02:00
Wolfgang Walther
a9b718b796
ci/check-cherry-picks: never check older stable branches
This makes the job significantly faster when the commit can't be found
on master or staging directly. Before this change, the script would have
had to iterate through 20+ release branches before finding the latest
one. With lazy fetching for git enabled, this would take a few minutes.
2025-05-28 15:31:31 +02:00
Wolfgang Walther
ea636d1728
ci/check-cherry-picks: allow cherry-picking from haskell-updates and python-updates
Those are protected branches, which can't be force pushed to - so the
commits will remain. Thus, we can also backport from them.
2025-05-28 15:31:28 +02:00
Wolfgang Walther
e575364ae6
workflows/check-cherry-picks: reduce checkout time
Using a `tree:0` filter instead of `blob:none` reduces the checkout time
from over 3 minutes to about 45 seconds. The required trees/blobs will
then be fetched on-demand.

This on-demand fetching creates additional output for `git range-diff`
on stderr, so we hide that. This only happens the first time it's run,
so we don't need to adjust the other calls - which will still return any
real errors, should they happen.
2025-05-28 14:56:55 +02:00
Wolfgang Walther
245b1c1c48
ci/check-cherry-picks: never use a pager
In a small terminal window this would just stop running after each
commit until you exit the pager. That's not what we want when running it
locally.
2025-05-28 14:56:55 +02:00
Wolfgang Walther
2fea2bbf52
ci/check-cherry-picks: support different remotes than "origin"
The default is to checkout a contributors fork as "origin", thus the
NixOS/nixpkgs remote is most likely named differently. But not everybody
keeps their fork's main branches up-to-date all the time. Thus the
script would fail locally.
2025-05-28 13:26:42 +02:00
Wolfgang Walther
6cf5f9e83b
ci/check-cherry-picks: run shellcheck 2025-05-28 12:52:40 +02:00
Wolfgang Walther
e2a3792169
ci/check-cherry-picks: improve error handling
We recently moved the $commits variable out of a "subshell in a
herestring", let's do the same for the list of branches, where errors
would be silently swallowed as well.

Also reformat the expressions slightly, we have enough line-length.
2025-05-28 12:52:39 +02:00
Wolfgang Walther
ad4b36d2d2
ci/check-cherry-picks: move from maintainers/scripts
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.
2025-05-28 12:52:36 +02:00
Wolfgang Walther
8a39ce4a48
workflows/eval: diff outpaths immediately
This moves the diff of outpaths into the outpaths job, mainly as a
preparation to allow future improvements. For example, this will allow
running the purity release checks only on changed outpaths instead of
the whole eval.

This also removes the inefficiency introduced in the last commit about
uploading the intermediate paths twice. Now, only the diff is passed on.

Also, technically, the diff is now run in parallel across 4 jobs. This
should be *slightly* faster than before, where outpaths from all systems
were combined first and then diffed. It's probably only a few seconds,
though.
2025-05-25 19:26:08 +02:00
Wolfgang Walther
b2579d36ff
workflows/eval: consistently avoid "result" in arguments
Everything is a result, especially when nix-build uses "result" as its
default output. This becomes confusing, when re-wiring the different
parts later.

Thus, consistently name those things after some of their properties and
avoid the term result.
2025-05-25 19:23:12 +02:00
Wolfgang Walther
942c377476
workflows/nixpkgs-vet: use nixpkgs-vet from pinned nixpkgs
We have added nixpkgs-vet as a regular package to nixpkgs a while ago,
so we can now use it from pinned nixpkgs. This avoids pulling a
platform-specific binary version from upstream.

This change also allows to run the tool easily locally, the same way as
other tools:

  nix-build ci -A nixpkgs-vet

This will do a full check of the repo with the exception of
nixpkgs-vet's "ratchet" checks: Those depend on having two branches to
compare, but the default is to only look at the head branch. Those
ratchet checks will still be run in CI, though.
2025-05-25 15:01:42 +02:00
Aleksana
1783268cc4
OWNERS: add myself to lib/licenses.nix (#410456) 2025-05-24 19:13:29 +08:00
Wolfgang Walther
138393e0ba
ci/eval.combine: avoid parsing of plain text file into JSON
Instead of parsing a plain text file with jq, we can make nix-env output
JSON directly, which is significantly faster.

This saves about 8 out of 10 seconds for the combine step.
2025-05-24 12:36:15 +02:00
Wolfgang Walther
d87d760dfa
ci/eval.compare: use lib from pinned nixpkgs
compare/maintainers.nix needs to access the current checkout to check
attrpaths, but makes the mistake of using lib from that checkout as
well. All other code in ci/ uses the pinned nixpkgs instance, so
maintainers.nix should do so as well.
2025-05-24 12:36:15 +02:00
Wolfgang Walther
eccd9564ab
ci/eval: improve api when calling in steps
Previously, `eval.full` organized the results for the supported systems
in a specific layout, i.e. with a folder with one subfolder per system.
Then, `eval.combine` relied on that.

When using `eval.singleSystem` and `eval.combine` directly, the caller
was responsible to recreate the same layout. This is annoying and
error-prone to do, when downloading artifacts from CI to recreate some
steps locally.

With this change, all the artifacts can be downloaded and extracted into
the same folder - because the result from `eval.singleSystem` already
contains the <system-name>/ subfolder.
2025-05-24 12:36:14 +02:00
Jörg Thalheim
b29abce2e6
workflows/get-merge-commit: support merge conflicts, run as step in main jobs (#410430) 2025-05-24 12:25:02 +02:00
Emily
856cb3108a OWNERS: add myself to lib/licenses.nix
As one of the resident Nixpkgs licensing pedants and reviewer of
several recent changes to this file I think it makes sense to make
the de facto the de jure.
2025-05-24 10:22:00 +01:00
Wolfgang Walther
e48d9d6174
workflows/get-merge-commit: move to composite action
We don't need a separate workflow anymore, because we don't need to skip
dependent jobs on failures anymore. The biggest failure mode was
"conflict" previously, but we resolved that on the last commit. The
remaining failure modes are so rare, that it's OK to just fail the jobs
in this case instead of marking them as "skipped". Especially, because
the resolve-merge-commit job would have previously failed anyway.

By moving this to an action we avoid running separate jobs each time we
need the merge commit. This also makes the check list in PRs much
cleaner.
2025-05-23 23:06:20 +02:00
Wolfgang Walther
277f7b998c
workflows/get-merge-commit: inline get-merge-commit.sh script as github-script
The reason this was a separate shell script was, that this would be
included in multiple workflows separately. But a while ago this had been
changed to a re-usable workflow, so we can just as well inline the
script.

This also allows us to use actions/github-script, which makes for a much
more readable script than the bash script before.
2025-05-23 23:05:26 +02:00
Philip Taron
d2860c9744
limine, nixos/limine, nixosTests.limine: inherit pkgs.limine maintainers, add johnrtitor (#410094) 2025-05-23 08:26:15 -07:00