Commit Graph

907 Commits

Author SHA1 Message Date
Philip Taron
2fe7b1cec2 ci.eval.compare: extract a derivation for cmp-stats
It's not very useful yet.
2025-09-17 14:04:27 -07:00
Philip Taron
4c2c6d9c43 ci.eval.compare: extract main function in cmp-stats.py 2025-09-17 14:04:27 -07:00
Philip Taron
6900cf62ee ci.eval.compare: sort imports in cmp-stats.py 2025-09-17 14:04:27 -07:00
Philip Taron
a3c01782d3 ci.eval.compare: format cmp-stats.py with ruff 2025-09-17 14:04:27 -07:00
nixpkgs-ci[bot]
6ec57b45c7 Merge staging-next into staging 2025-09-15 16:09:34 +00:00
Wolfgang Walther
e5ce5c2500 ci/eval/compare: add 10.rebuild-nixos-tests label (#439255) 2025-09-15 14:29:47 +00:00
nixpkgs-ci[bot]
85b587287b Merge staging-next into staging 2025-09-15 12:07:44 +00:00
Ryan Omasta
4c6b9993e6 ci/github-script/labels: don't add stale if issue was mentioned
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-09-15 02:07:27 -06:00
nixpkgs-ci[bot]
96acd252c7 Merge staging-next into staging 2025-09-12 00:16:59 +00:00
Wolfgang Walther
b9d4098221 ci/eval: fix local full eval
The change to use `builtins.storePath` was good - for when the store
path *is* already part of the nix store. In all my tests so far, that
was already the case, because I was iterating on the solution and the
Eval results stayed the same.

But when this is run on a entirely new commit, these the values for
`afterDir` and `combinedDir` are *not* in the store, yet. As part of
running `eval.full` on a new commit they will be created. `eval.full` is
linked up, so that the values passed around there will actually be
derivations, which might not be realized, yet.

Checking whether the input is a path or not fixes this for both cases.
2025-09-11 20:18:48 +02:00
nixpkgs-ci[bot]
3e0c2daff8 Merge staging-next into staging 2025-09-10 18:06:27 +00:00
Wolfgang Walther
45a765a282 ci/eval: fix local comparison with baseline
Due to how we pass in existing store paths via CLI arguments for the
diff and combine scripts, Nix didn't register a dependency on the store
paths properly. This meant that some of the derivations that were built,
didn't have the right store paths made available in the sandbox -
leading to all kinds of "not found" errors.

We worked around this in CI by resolving the symlinks to the nix store
beforehand. We tried to work around this locally by storing the nix
store path in BASELINE, but this didn't fully work. By explicitly
registering these store paths as dependencies, this should work across
the board - without any magic required by the caller.
2025-09-10 14:35:46 +02:00
nixpkgs-ci[bot]
1899bbae51 Merge staging-next into staging 2025-09-09 12:07:40 +00:00
Wolfgang Walther
b9ec8bed14 treewide: fix typos in md files (#439306) 2025-09-09 08:03:31 +00:00
Ben Siraphob
807ce4b7b3 ci/eval/README.md: adjust wording 2025-09-09 13:14:36 +07:00
Ryan Omasta
32373aff1c ci/github-script/labels: keep "needs reviewer" if only automated reviews 2025-09-08 21:55:43 -06:00
JuliusFreudenberger
e29fa9b0fe Add pkgs/build-support/teleport to teleport codeowners
Because this directory was not added before, @philiptaron's review was
also requested per the rule for `pkgs/build-support`.
2025-09-08 16:18:23 +02:00
Philip Taron
07916fc3fd ci: have eval.full return the report as displayed in CI
Update the README.md to document what gets returned.
We might in the future split these up into other attrsets but I don't see a usecase for that at the moment.
2025-09-08 06:58:24 -07:00
Emily
f221aaf60f OWNERS: remove redundant owners from LLVM files
Alyssa and Tristan are already in the GitHub team.
2025-09-08 09:59:24 +02:00
6543
92d5ef9768 services.libvirtd.autoSnapshot: init 2025-09-07 12:17:56 +02:00
Wolfgang Walther
63e6fc4c43 ci/eval/compare: add 10.rebuild-nixos-tests label
This indicates that the NixOS test-driver changed and all NixOS tests
have to be rebuilt. It can be used to either re-target to staging or to
batch this with other similar changes, at least.
2025-09-04 21:27:30 +02:00
Dmitry Ivankov
036ae348e3 bazel, bazel_7: move to pkgs/by-name/ba/ 2025-09-04 18:02:17 +02:00
Wolfgang Walther
e3f583c5bf ci/eval: eval nixosTests.simple
We can't eval all nixos tests, this would be way too expensive. But we
can evaluate `nixosTests.simple` as an indication whether the nixos test
driver has changed. If that's the case, this means that *all* NixOS
tests need to be rebuilt.
2025-09-03 18:35:01 +02:00
Wolfgang Walther
5c4608656e top-level/release-outpaths: move to ci/eval & refactor (#439221) 2025-09-03 16:27:37 +00:00
Wolfgang Walther
f2ca5796de ci/eval/compare: handle missing packages
Not all packages that are reported as changed will actually exist on the
platform that the maintainers are colleted on.

This is the case for some attributes that are only available on Darwin
or explicitly set to `null` on Linux. By filtering out packages without
maintainers, these are ignored - and we should potentially get a small
performance improvement as well.
2025-09-01 15:50:05 +02:00
Wolfgang Walther
011f775976 ci/eval/compare: ping maintainers of removed packages (#438652) 2025-09-01 10:18:54 +00:00
Wolfgang Walther
8104100101 ci/eval/attrpaths: update cross stdenvs
`pkgsArocc` and `pkgsZig` had been added to `release.nix`, so should be
listed here as well.
2025-08-31 21:09:31 +02:00
Wolfgang Walther
d0c0b875f7 treewide: remove __recurseIntoDerivationForReleaseJobs
This attribute was supposed to be set on derivations, to make the
release tools recurse into them. The remaining uses were all on regular
attrsets, though, so this is safe to remove.
2025-08-31 20:54:49 +02:00
jopejoe1
d97fd70cc7 ci/OWNERS: add jopejoe1 to /lib/licenses.nix
So that i can check new licenses against spdx when they get added and
not at some later point in time like i currently do ~1 a year
2025-08-31 16:19:22 +02:00
Wolfgang Walther
b627d181e9 ci/eval: remove unused checkMeta argument
This should always be set anyways.
2025-08-31 12:16:28 +02:00
Wolfgang Walther
04fcbb45e1 ci/eval/attrpaths: refactor
The following changes were made:
- Using `lib.` instead of `builtins.`
- Using `mapAttrsToList` instead of `mapAttrs` + `attrValues`
- Joining two of the if conditions with the same return value
- Using `traceIf` instead of `if` / `else`
- Using `showAttrPath` instead of `concatStringsSep`
2025-08-31 12:16:27 +02:00
Wolfgang Walther
9524a21fe0 ci/eval/attrpaths: remove left-over condition
This condition doesn't make a difference anymore, ever since we removed
the tryEval code from this file and had already enabled unfree packages
earlier anyway.
2025-08-31 12:15:11 +02:00
Wolfgang Walther
2aae142529 ci/eval: remove ofborg references
By now, these files have been changed enough to not need the "vendored
from" notes anymore. These links would still be there when going through
the history of the file, but today GHA CI has not many similarities
anymore to what ofborg did, so these are not really helpful.
2025-08-31 12:15:06 +02:00
Wolfgang Walther
0d51e920d3 top-level/release-outpaths: move to ci/eval
These files are tightly coupled with the code in ci/eval and not used
anywhere else. They are subject to the same backporting requirements as
the remaining CI code. They are better placed next here.
2025-08-31 12:15:02 +02:00
Wolfgang Walther
4126ef7e00 ci/eval/compare: refactor
Simplification after the last step.
2025-08-30 17:56:35 +02:00
Wolfgang Walther
e88dd3a8b2 ci/eval/compare: only check changed attrpaths
It makes no sense to check newly added attrpaths for maintainers on the
target branch - by definition these attrpaths won't exist, yet. We can
avoid falling back to `null` for these etc.
2025-08-30 17:56:30 +02:00
Wolfgang Walther
0753aa4580 ci/eval/compare: remove package validity check
This should not be necessary anymore, because packages that fail to
evaluate should already be filtered out by the attrpath generation step
in main eval.
2025-08-30 17:56:27 +02:00
Wolfgang Walther
540e188796 ci/eval/compare: ping maintainers of removed packages
This change pings maintainers of actually removed packages, aka where
the package's expression is deleted.

This will not ping maintainers of packages that become invisible,
because a (transitive) dependency of them is marked as insecure or
broken.
2025-08-30 15:24:13 +02:00
Wolfgang Walther
b5dee53399 ci/github-script/labels: auto close package request issues
This allows the labels workflow to support issue management in two ways:
- New package request can potentially created with a `4.workflow:
auto-close` label immediately and be closed automatically this way.
- Existing package requests can be bulk-closed by adding this label.
This has the advantage of posting the explanatory comment at the same
time, which is not possible with regular bulk operations.
2025-08-29 21:09:55 +02:00
Wolfgang Walther
ccc12c839b ci/eval.full: allow local comparison with rebuilds
This allows running a full comparison between two commits locally.

What was previously `eval.full` is now called `eval.all`. The new
`eval.full` takes a `baseline` argument for the comparison.
2025-08-28 18:09:02 +02:00
Wolfgang Walther
0e07097947 ci/eval: clarify README with current defaults and memory requirements
We had set a default of 5000 for local evaluation earlier for
`singleSystem`, it makes sense to also use that for `full`.

The README is also a bit outdated, because Nix 2.30 significantly
changed the memory requirements. Rewriting the README to also show the
ability to directly evaluate the current system only.
2025-08-28 18:06:36 +02:00
Jörg Thalheim
d92bfd5feb Nix 2.24 removal (#437039) 2025-08-27 22:28:58 +02:00
Jörg Thalheim
1b7637ff08 nix_2_24: remove 2025-08-27 22:18:31 +02:00
Philip Taron
e6696ddb24 Revert "ci: add myself as a reviewer on anything in maintainers that's otherwise not maintained" 2025-08-26 09:27:25 -07:00
Wolfgang Walther
eb766e2d51 ci/github-script: fix run script
Not a problem for prepare/commits, but the labels comand will remove the
temp directory again, before it actually runs the command. Nothing good
will come out of that!
2025-08-26 13:52:25 +02:00
Wolfgang Walther
41ae23c0e7 ci,workflows: deal with ghost reviews
When a user deletes their account, they appear as a "ghost user". This
user is represented as `null` on API requests. If such a user had posted
a review before, this breaks a few places, which assume to be able to
access `user.login`.
2025-08-25 15:17:01 +02:00
Wolfgang Walther
40d8532c08 ci/github-script/prepare: identify real base branch (#435596) 2025-08-25 12:05:12 +00:00
Wolfgang Walther
956d0a744d workflows/check: allow owners to fail when ci/OWNERS is untouched
The owners check is not reproducible, because it depends on the state of
the NixOS org on GitHub. Owners can rename their accounts or they can
leave the organisation and access to Nixpkgs can be removed from teams.
All of this breaks the owners check for reasons unrelated to the PR at
hand.

This PR makes the check for the owners file conditionally required: Only
when the ci/OWNERS file is actually modified a failed check will block
merging the PR. When that's not the case, the check will still fail
visibily in the checklist, but the failure can be ignored.

This is especially relevant for the Merge Queue, which should not be
entirely blocked whenever any of these events happen.

Also, it allows passing the checks in a fork when testing, where the
owners check will *always* fail, because the respective teams and
members are never part of the "user org" that a fork is.
2025-08-24 20:11:29 +02:00
Wolfgang Walther
87d9b08ffb ci/github-script/prepare: identify real base branch
When a contributor mistakenly sets the wrong target branch for a Pull
Request, this can lead to bad consequences for CI. Most prominent is the
mass ping of codeowners, that is already handled in
`ci/request-reviews/verify-base-branch.sh`. But there are other things
that go wrong:
- After eval, a mass ping of maintainers would still be possible, in
theory. Practically, this doesn't happen, because we have a limit of 10
reviewer requests at the same time.
- This will most often contain a change to `ci/pinned.json`, thus the
full Eval matrix of all Lix/Nix versions will be run, burning a lot of
resources.
- The PR will be labelled with almost all labels that are available.

We can improve on the current situation with some API calls to determine
the "best" merge-base for the current PR. We then consider this as the
"real base". If the current target is not the real base, we fail the
prepare step, which is early enough to prevent all other CI from
running.
2025-08-24 18:09:08 +02:00
Wolfgang Walther
0601cf6fd0 ci/github-script/prepare: avoid running CI when targeting channel branches
This moves the no-channel-base check into the prepare script to exit
early and prevent all of CI to run against those branches. We also
provide better output by posting a "Changes Requested" review, using the
existing infrastructure from the old cherry-picks check.

The review will be dismissed automatically once the branch has been
corrected, because the commits check will run and do it.
2025-08-24 17:58:51 +02:00