Commit Graph

907 Commits

Author SHA1 Message Date
Wolfgang Walther
3d4c1c0d26 .editorconfig: two spaces for .js files
Most other scripting languages we use in tree have the same.
2025-06-23 14:54:45 +02:00
Wolfgang Walther
767223d29d workflows/{check,reviewers}: don't run on staging-like PRs (#418496) 2025-06-23 10:53:34 +00:00
Matt Sturgeon
7c7009a3da ci/eval: fix comparing to null in getLabels
Check if `to` is null _before_ comparing it to `rebuildCount`.
2025-06-22 20:27:41 +01:00
Wolfgang Walther
7763be5a80 workflows/pr: refactor base/head branch decision making
Some jobs purposefully only run on certain base or head branches. By
centralizing the logic, parts of it can easily be re-used later. Also,
this gives them an explicit name and thus makes them easier to
understand.
2025-06-22 14:21:03 +02:00
Wolfgang Walther
5b5b18c875 workflows/labels: manage labels with a single API call
Instead of deleting each label separately and then making another call
to add new labels, this replaces all labels at once, thus saving API
calls in some cases. Also, the labels are now managed in object-style
compared to the array-style before. This allows putting all the
knowledge about each label into a single place instead of in multiple
places. For example, the rebuild labels had to be special cased in the
workflow before - and the nix code to compare had to match that. Also,
the approval labels had to be considered in the `before` and `after`
phases.

The next commit shows how easy it is to add a new label now.
2025-06-22 14:09:04 +02:00
Wolfgang Walther
966bc95a23 workflows/labels: various fixes (#418504) 2025-06-21 11:38:41 +00:00
Wolfgang Walther
19ce5d94bc ci/eval/compare: fix rebuild-stdenv labels
Those have not been working since before the migration from OfBorg.
Those `rebuildsByKernel` are an attrset of lists coming from
`groupByKernel` (also see lengthy comment at the top of the file) - thus
we need `lib.elem` instead.
2025-06-21 13:08:13 +02:00
Wolfgang Walther
1bec402437 teams/ci: init (#416459) 2025-06-20 11:59:16 +00:00
Wolfgang Walther
ec9986a919 teams/ci: init 2025-06-20 13:31:47 +02:00
Wolfgang Walther
a2404e557b OWNERS: drop security team from CI
To reduce the number of notifications.
2025-06-20 13:30:59 +02:00
Wolfgang Walther
8ba5040b9c ci/treefmt: add yamlfmt (#416115) 2025-06-15 10:10:02 +00:00
Wolfgang Walther
a9589ea037 ci/pinned: update
This gives us nixpkgs-review 3.4.0 to support #415006.

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

Changes for treefmt-nix:
1f3f7b7846...a05be418a1
2025-06-14 16:32:15 +02:00
Emily
53c0fdfee8 OWNERS: add more standard environment–related libraries (#410455) 2025-06-12 21:26:59 +01:00
Wolfgang Walther
36b76b4141 ci/nixpkgs-vet.sh: fix passing arguments
It currently fails with this:

```
error: lib.fileset.toSource: `root`
(/tmp/nix-shell-19054-0/tmp.MB62qzBqsj/base) is a string-like value, but
it should be a path instead.
   Paths in strings are not supported by `lib.fileset`, use
`lib.sources` or derivations instead.
```

Resolves #416175
2025-06-12 20:30:36 +02:00
Wolfgang Walther
8ec23df6f6 ci/treefmt: add yamlfmt
Most workflow files are already well formatted, but to make it easier to
keep it that way, we can add yamlfmt.

I personally have a preference for non-indented arrays for YAML, but
wanted to avoid bigger diffs here - the status-quo clearly are indented
arrays.

Some changes are made manually to the get-merge-commit action and the
issue templates. Those would otherwise make yamlfmt misbehave on those.
2025-06-12 14:47:42 +02:00
Connor Baker
38a8232461 arrayUtilities: init
Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
2025-06-11 17:08:13 +00:00
Jade Lovelace
332bc64369 ci/eval: accept nix directly
Previously we were taking nixVersions and this made external use from
the Lix repo's CI annoying.

We should probably also test other nix versions than stable (i.e. also
latest and Lix), but this involves writing GitHub Actions about it and
maybe not running it on every single PR. Future work.
2025-06-10 16:04:38 -07:00
Wolfgang Walther
247d562379 ci/nixpkgs-vet: add badFiles and conflictingPaths checks
Those checks are part of top-level/nixpkgs-basic-release-checks.nix, but
can be run in CI already to prevent regressions. The idea is to upstream
them into nixpkgs-vet eventually, but we can just as well run them as-is
in the same derivation already.
2025-06-10 15:10:52 +02:00
Wolfgang Walther
ca5775952e ci/check-cherry-picks: fix indent of truncation marker
This needs to be indented the same way as the remaining code-block,
otherwise the `</details>` is not rendered correctly.
2025-06-09 09:44:36 +02:00
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