Commit Graph

442 Commits

Author SHA1 Message Date
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
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
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
Dmitry Ivankov
036ae348e3 bazel, bazel_7: move to pkgs/by-name/ba/ 2025-09-04 18:02:17 +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
Wolfgang Walther
c96b0e6d3d ci/github-script/commits: split review function into separate file
This allows re-using postReview in the next commit.
2025-08-24 12:14:54 +02:00
Wolfgang Walther
b6bbf7b250 workflows/check: always run commits job
This is the very first step to extending the commits job to do more than
just cherry-picks in the future: It could check reverts or merge
commits, but also the commit message format and more.

Of course, cherry-picks are still just checked on the stable branches as
before. For now, this allows us to run the part that dismisses automated
reviews automatically. This helps us when we do branch related checks in
the prepare step, which would also create such a review. To avoid
cluttering multiple reviews across a PR, we'll want all of these reviews
to be handled by the same code, thus this change.
2025-08-24 12:14:50 +02:00
Wolfgang Walther
0b91796923 workflows/test: init (#435547) 2025-08-24 10:14:26 +00:00
Wolfgang Walther
443f30f811 workflows/test: init
This workflow runs the PR and Push workflow files on a `pull_request`
trigger. The intent is to test changes to the workflow files
immediately. Previously, these were run directly from the respective
workflow files.

The new approach allows us to move the logic to run this only when
workflow files changed from the pull_request trigger into a job. This
has the advantage that older jobs are cleaned up, when the PR changes
from a state of "workflow files changed" to "no workflow files changed".
This can happen when changing a PR's base from staging to master, in
which case changes from master would temporarily appear in the PR as
changes. When these include changes to workflow files, this would
trigger the PR workflow via `pull_request`. Once the base is changed,
the PR is closed and re-opened, so CI runs again - but since it's on the
same commit and the new run doesn't trigger `pull_request`, the results
of the previous run are still kept and displayed. These results may
include cancelled or failed jobs, which are impossible to recover from
without another force-push.

Checking this condition at run-time is only possible, because we move it
into a separate workflow, turning the `pr.yml` workflow into a re-usable
workflow. This will make sure to skip the whole workflow at once, when
no change was detected, which will prevent the "no PR failures" job from
appearing as skipped - which would imply "success" and make the PR
mergeable immediately. Instead the "no PR failures" job is not shown at
all for this trigger, which is generally what we want.

Do the same for `push.yml` for consistency.
2025-08-24 12:07:39 +02:00
Philip Taron
9fd881d31d ci: add @philiptaron as a reviewer on anything in maintainers that's otherwise not maintained
> Anyway, I keep picturing all these little kids playing some game in this big field of rye and all. Thousands of little kids, and nobody’s around―nobody big, I mean―except me. And I’m standing on the edge of some crazy cliff. What I have to do, I have to catch everybody if they start to go over the cliff―I mean if they’re running and they don’t look where they’re going I have to come out from somewhere and catch them. That’s all I’d do all day. I’d just be the catcher in the rye and all. I know it’s crazy, but that’s the only thing I’d really like to be. I know it’s crazy.
2025-08-22 15:02:18 -07:00
Wolfgang Walther
55b046451c ci: remove python-updates from development branches
The python-updates branch is not a "development" branch in the sense of
ci/README.md's classification. That's because it allows force pushes.
When rewrites are possible, cherry-picking from this branch should not
be allowed, because the commit references will potentially end up out of
sync.

These kind of branches are now termed "Work-in-Progress" branches. Up
until recently these branches didn't work well for Pull Requests
targeting them, because Eval wouldn't run on them with a push event and
thus, Eval in the PR couldn't succeed either. That's now fixed, PRs
towards *any* WIP branch should work correctly.
2025-08-22 17:18:08 +02:00
Wolfgang Walther
c1b06db57b workflows/eval: pass outpaths via cachix instead of artifacts
Instead of uploading the outpaths as artifact, this uploads them via
cachix. Most of all, this makes CI less brittle, because Eval in PRs
will still be able to succeed, even if no workflow run for the push
event could be found on the target branch. It will just take longer.

This also makes moving Eval into the Merge Queue easier to do: When
downloading artifacts from a different run, these would always have to
match on the right event, too. By pulling from cachix, the same workflow
can support target branches with merge queue and without merge queue at
the same time. The latter would still use the push event, while the
former could use the merge_group event.

Last but not least, this should fix Eval on PRs targeting `wip-`
branches and any other branches that the push event doesn't trigger on.
These would never find an Eval result from the target branch and could
never show rebuilds accurately. Now these PRs should work at a slightly
higher runtime cost.
2025-08-22 13:01:20 +02:00
Wolfgang Walther
2257beb1d0 ci/github-script/commits: fix logging no-cherry-pick message
This has severity "important", which is not a `core` function. Falling
back to `core.info` for all unknown values now.
2025-08-22 09:24:41 +02:00
Wolfgang Walther
8ec348d644 ci/github-script/commits: fix not-cherry-picked-because regex
This needs the multiline flags, which enables `^` and `$` to match line
start and line end, not start and end of the whole string.

Not sure how this got past testing when initially merged.
2025-08-22 09:18:32 +02:00
K900
7c491d6739 ci: drop codeowners/labeler config for Plasma 5 2025-08-21 22:31:18 +03:00
Matt Sturgeon
f646e56d7a ci: disable aliases in CI's pkgs instance
This ensures we don't accidentally use aliases in the nixpkgs shell or
other places that depend on the CI-pinned pkgs instance.

Nixpkgs generally — and CI specifically — do not use aliases, because we
want to ensure they are not load-bearing and can be removed safely.

See: https://github.com/NixOS/nixpkgs/blob/ce9979ec1c/pkgs/top-level/release-outpaths.nix#L28
2025-08-21 18:13:04 +01:00
Matt Sturgeon
e981b17a96 ci: explicitly define programs.nixfmt.package
Currently treefmt-nix is still defaulting `programs.nixfmt.package` to
the `nixfmt-rfc-style` alias. This makes sense, as they do not know for
certain which revision of nixpkgs is in use.

We do know, however, so we can explicitly use the non-alias name.
2025-08-21 16:29:32 +01:00
Matt Sturgeon
1974b7e30c ci: reformat comment
Use one sentence per line.
2025-08-21 16:28:35 +01:00
Philip Taron
d8f5a49807 ci/nixpkgs-vet: use Nix 2.30+ inside sandbox (#435499) 2025-08-21 06:00:56 -07:00
Robert Hensing
4d3eb9460a Factor out the NixOS meta.maintainers module (#431450) 2025-08-21 10:11:08 +02:00