Commit Graph

603 Commits

Author SHA1 Message Date
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
Wolfgang Walther
067ca97d1d ci/nixpkgs-vet: use Nix 2.30+ inside sandbox
This should fix the random symlink creation errors.
2025-08-21 09:22:15 +02:00
Gaétan Lepage
13b9a48210 maintainers: drop drupol (#435310) 2025-08-21 08:58:35 +02:00
Philip Taron
3ebaea3e61 maintainers: donteatoreo -> FlameFlag, treewide: donteatoreo -> FlameFlag (#435327) 2025-08-20 10:25:45 -07:00
FlameFlag
31e7a5516e treewide: donteatoreo -> FlameFlag 2025-08-20 20:17:00 +03:00
Wolfgang Walther
d20a6a3f8f ci/github-script/prepare: move more steps from workflow (#435302) 2025-08-20 16:57:23 +00:00
Wolfgang Walther
4d996cfb2f ci/nixpkgs-vet: ignore .github/ and ci/ folders
nixpkgs-vet doesn't care about our CI infrastructure, so ignoring these
files will lead to more cache hits when iterating on CI related PRs.
2025-08-20 18:08:16 +02:00
Wolfgang Walther
c4fa63da49 ci/nixpkgs-vet: memoize filesets
Speeds up evaluation a bit, because `filtered head` doesn't need to be
evaluated 3x.
2025-08-20 18:08:14 +02:00
Wolfgang Walther
f94fd64d53 ci/github-script/prepare: fix logging of branch classification
Logging objects to stdout is not possible with `core.info`, so we
fallback to `console.log` instead. There's no functional difference for
these anyway.
2025-08-20 17:59:27 +02:00
Pol Dellaiera
cabc16dc59 maintainers: drop drupol from the PHP team and packages 2025-08-20 17:54:33 +02:00
Wolfgang Walther
46a1b0a7bc ci/github-script/prepare: determine changed files 2025-08-20 17:18:36 +02:00
Wolfgang Walther
4220a03df8 ci/github-script/prepare: classify branches 2025-08-20 17:18:25 +02:00
Wolfgang Walther
9caf455441 ci/github-script/prepare: load systems 2025-08-20 17:17:12 +02:00
Wolfgang Walther
f668934bfd ci/treefmt: enable biome for doc/ 2025-08-20 15:41:50 +02:00
Wolfgang Walther
9d5164bdb8 ci/treefmt: add biome for .js files
This excludes doc and pkgs folders, because there are way too many files
to fix at the moment.
2025-08-20 15:41:29 +02:00
Wolfgang Walther
23b82b3228 ci: apply unsafe fixes with biome 2025-08-20 15:41:28 +02:00
Wolfgang Walther
1fa55d3900 ci: apply safe formatting with biome 2025-08-20 15:41:24 +02:00
Wolfgang Walther
a8cb53611b ci/github-script/prepare: refactor
Using core.info instead of console.log and simplifying the arguments for
API calls a bit.
2025-08-20 15:16:20 +02:00
Wolfgang Walther
f5d3e43368 ci/github-script/prepare: run biome
This will be added to treefmt in a different commit / PR.
2025-08-20 15:16:20 +02:00
Wolfgang Walther
c787c66de6 ci/github-script/prepare: init from actions/get-merge-commit
This just moves the code over to ci/github-script to make it easy to
test and iterate on locally.

The name `prepare` is chosen, because the script will be extended with
the other steps from "PR / prepare" next.
2025-08-20 15:16:15 +02:00
Wolfgang Walther
91fd9b10ac ci/github-script/commits: conditionally show comments
This only shows *some* of the additional hints, depending on what the
checks resulted in. Should hopefully reduce confusion a bit.
2025-08-14 18:29:50 +02:00
Wolfgang Walther
2f8ed18c97 ci/github-script/commits: clarify comments
Splits the "occasionally" case into two, depending on whether the commit
has a diff or was not cherry-picked at all. Prepares the next commit,
where these are conditionally shown only.
2025-08-14 18:29:16 +02:00
Wolfgang Walther
bf3607aa87 ci/github-script/commits: allow reason for not cherry-picking
This change allows giving a reason via footer of the commit message for
why this commit is not cherry-picked. This avoids having to "explain"
the automated review comment afterwards - instead, this explanation can
be given immediately when writing that commit.

For example, for an update of `xen` on the stable branch, this could be:

```
xen: 4.19.3-unstable-2025-07-09 -> 4.19.3

[... commit message ...]

Not-cherry-picked-because: unstable is on a different minor version
```

This would then be shown as part of the automated review. The severity
of this will be downgraded from "warning" to "important". We still treat
the review as "changes requested", because it would be very complicated
and noisy to handle two different categories of reviews, some with
requested changes and some with comments only.

An alternative would be to not show this review at all. However, given
that the reviewers expectation on backports should already be "if it's
not a clean backport, the automated review will tell me what to look
at", it seems better to show these and have the committer confirm by
dismissing the review. Otherwise we risk merging actually unreviewed
commits.
2025-08-14 18:28:30 +02:00
Wolfgang Walther
0dff5ad6c5 workflows/check: use regular checkout
The filtered checkout we used before was a nice idea, but only worked
for small numbers of commits in a PR. It would fetch the whole history
initially, but only fetch objects on demand. This turns out to be much
too slow in a PR with 18 commits, regularly hitting the 10 minute
timeout, even when running it locally.

The new approach uses regular checkouts again. In contrast to the old
style, before we switched to the filtered checkout, this only fetches
exactly the commits we need - and all of them at once. This is
significantly faster than both other approaches, and scales much better.
A bigger number of commits doesn't have much of an effect, if any at
all.
2025-08-13 14:02:39 +02:00
Wolfgang Walther
fa0cba1c39 nix_2_3: drop
This has been marked insecure a while ago, as some CVEs have not been
backported. Even if *some* CVEs are fixed, we'd need **all** of them to
be, to get it back into the cache.

Not having it in the cache means, we can not test it in CI. This means
we can't make sure to actually support this version to evaluate Nixpkgs.
2025-08-12 11:28:40 +02:00
Wolfgang Walther
cc3d2295b6 nixVersions.minimum: drop
The concept of this alias becomes questionable once we move past 2.18,
where Lix was forked. We should probably move to a feature-detection
based approach for lib/minver.nix eventually, too.
2025-08-12 11:28:38 +02:00
Wolfgang Walther
14a6d9de46 ci/pinned: update
This gives us a fixed `lixPackageSets.git`.

From the nixpkgs-unstable channel:
https://hydra.nixos.org/build/304569381#tabs-buildinputs

Changes for treefmt-nix:
58bd4da459...7d81f6fb2e
2025-08-12 10:14:01 +02:00
Wolfgang Walther
b523f257ac workflows/eval: test all available versions
With this change, we start running Eval on all available Lix and Nix
versions. Because this requires a lot of resources, this complete test
is only run when `ci/pinned.json` is updated.

The resulting outpaths are checked for consistency with the target
branch. A difference will cause the `report` job to fail, thus blocking
the merge, ensuring Eval consistency for Nixpkgs across different
versions.

This implements a kind of "ratchet style" check: Since we originally
confirmed that the versions currently in Nixpkgs at the time of this
commit match Eval behavior of Nix 2.3, we can ensure consistency with
Nix 2.3 down the road, even without testing for it explicitly.

There had been one regression in Eval consistency for Nix between 2.18
and 2.24 - two tests in `tests.devShellTools` produce different results
between Lix 2.91+ (which was forked from Nix 2.18) and Nix 2.24+. I
assume it's unlikely that such a change would be "fixed" by now, thus I
added an exception for these.

As a bonus, we also present the total time in seconds it takes for Eval
to complete for every tested version in a summary table. This allows us
to easily see performance improvements for Eval due to version updates.
At this stage, this time only includes the "outpaths" step of Eval, but
not the generation of attrpaths beforehand.
2025-08-12 10:14:01 +02:00
Wolfgang Walther
f05895fb3c ci/eval/compare: reorder step summary
Move "Packages" up, because it's much shorter and easier to scroll past.
This way both Packages and Performance are visible immediately.
2025-08-12 10:13:56 +02:00
Wolfgang Walther
8a9f0b8a47 workflows: checkout pinned nixpkgs explicitly
This is slightly faster than downloading and extracting a tarball and
additionally allows a sparse checkout. No need to download docs or nixos
for our purpose.

The data is quite noisy, but suggests improvements from anywhere between
5-15 seconds for each job using the pinned nixpkgs.
2025-08-11 17:57:11 +02:00
Wolfgang Walther
75f40a150c ci/eval: use sane defaults
Using these defaults makes it possible to just run `nix-build ci -A
eval.singleSystem` without passing additional arguments and get a sane
result back. Especially helpful when testing or debugging.

A `chunkSize` of 5000 is conservative to be able to run on systems with
less memory as well. Run-time is not impacted by that, as recent
benchmarks show.
2025-08-09 11:55:04 +02:00
Wolfgang Walther
5c697b8aea ci/eval: reduce closure size
`procps` pulls in 180 MB of systemd, but busybox also provides `kill`.
`busybox` also ships `time`, so no need for that extra dependency.

Using `nativeBuildInputs` pulls in all the -dev outputs of the listed
packages - which we don't need. We only need to run these tools, thus
map to their bin outputs.

Brings down the closure size from 500+ MB to 193 MB for the Eval job.
This probably saves ~10 seconds for the job.
2025-08-09 11:55:03 +02:00
Wolfgang Walther
cb527a04e0 ci/eval: return min memory in megabyte
No need to return bytes in these files. Also busybox has problems to
render `free -b` with sizes > 100 GB properly in the next commit,
leading to extraction errors with awk.
2025-08-07 17:14:05 +02:00
Wolfgang Walther
0a59445722 ci/eval: fix min-free-swap report
This was checking the wrong condition, likely from a copy&pasto.
2025-08-07 17:14:03 +02:00
Wolfgang Walther
c5c7cd5bc7 ci/eval/compare: don't treat renames as rebuilds
When a package's attrpath is renamed it is currently treated as a
rebuild, even though the outpath already exists and is already cached.

This also happens when adding new names for packagesets that already
exist, for example when starting to eval `perlPackages` in CI, which is
just the same as `perl540Packages` currently. It would also happen when
`perlPackages` is switched from `perl540Packages` to `perl999Packages`.
Assuming that `perl999Packages` had already been built before, this
doesn't really cause any rebuilds.
2025-08-06 18:18:35 +02:00
Robert Hensing
dcc0ee9ea1 nixos/documentation: Allow the inclusion of a nixpkgs/modules directory 2025-08-06 14:58:50 +02:00
Wolfgang Walther
a7b3b2584a ci/treefmt: add markdown-code-runner
This was run as a test in `doc/tests/check-nix-code-blocks.nix` before,
but its DX can be improved: By including it in `treefmt` we get better
error reporting and auto-fixing, as well as running it on *all* markdown
files (including READMEs etc.) for free.
2025-08-05 17:30:41 +02:00
Wolfgang Walther
6884dd65da ci/tarball: build with Nix 2.30
We had to avoid 2.28 / 2.29 due to performance regressions, but this
should work well again with Nix 2.30.
2025-08-05 11:16:37 +02:00
Wolfgang Walther
492225f4f7 ci/pinned: update
This gives us Nix 2.30 as `nixVersions.latest`, which enables it for
Eval in CI automatically.

It also gives us markdown-code-runner 0.2.0, which allows it to run with
treefmt.

From the nixpkgs-unstable channel:
https://hydra.nixos.org/eval/1817362#tabs-inputs

Changes for treefmt-nix:
421b56313c...58bd4da459
2025-08-05 11:13:49 +02:00
Martin Weinelt
4a59c529e5 ci/OWNERS: reduce firefox package ownership
This reduces my codeownership to Firefox Rapid, ESR and the update
script. My hope is that will reduce my notification fatigue on Firefox
Beta/Devedition PRs that I needlessly get requested to.
2025-07-29 19:18:15 +02:00