Commit Graph

333 Commits

Author SHA1 Message Date
Wolfgang Walther
182184a00f ci/github-script/commits: init from ci/check-cherry-picks (#425449) 2025-07-16 10:25:30 +00:00
Wolfgang Walther
b46cb23251 ci/github-script/commits: init from ci/check-cherry-picks
This turns the check-cherry-pick script into a github-script based
JavaScript program. This makes it much easier to extend to check reverts
or merge commits later on.
2025-07-16 11:50:13 +02:00
Wolfgang Walther
2433050fb7 ci/github-script: use real @actions/core
This allows building markdown summaries, which is hard to mock.
2025-07-15 15:09:02 +02:00
Wolfgang Walther
13855a517b ci/github-script: move from ci/labels; allow single PR testing and non-dry mode (#424872) 2025-07-15 12:56:51 +00:00
Wolfgang Walther
cdd1931ace ci/github-script: add gh dependency to dev shell 2025-07-15 12:19:41 +02:00
Wolfgang Walther
d71b8c3680 ci/github-script: allow running without dry mode 2025-07-14 13:49:41 +02:00
Wolfgang Walther
97d4103946 ci/github-script: allow running for single PR
Makes specific tests in the upstream repo easier to do.
2025-07-14 13:49:40 +02:00
Wolfgang Walther
2192c5b6e8 ci/github-script: extract common withRateLimit.js
This can and should be re-used across different scripts.
2025-07-14 13:49:39 +02:00
Wolfgang Walther
d11eba1e1d ci/github-script: default to commonjs
Since all github-scripts need to be written in commonjs, we now default
to it by not setting package.json. Support from editors for .js files is
slightly better than .cjs. To still allow using module imports in the
test runner script, we trick node into loading the script itself as a
module again via `--import ./run`.
2025-07-14 10:35:18 +02:00
Wolfgang Walther
aaaabe0cb7 ci/github-script: add commander CLI interface
This makes it easier to add additional features.
2025-07-14 10:35:17 +02:00
Wolfgang Walther
6f6c625026 ci/github-script: move from ci/labels
This just moves things around to use less specific naming - `labels` is
only *one* script that can potentially be run locally while still being
written in github-script. Later, we can add more.
2025-07-14 10:35:13 +02:00
nixpkgs-ci[bot]
8287b2917e Merge master into staging-next 2025-07-12 18:05:06 +00:00
Wolfgang Walther
acf5bc2417 workflows/labels: label rebuilds immediately
This fixes labeling in the context of the `pull_request` trigger. Of
course, this was supposed to immediately label rebuilds after eval
finishes, but we somehow lost this along the way. Rebuilds are still
labeled fairly soon, because the scheduled trigger will pick up the same
PR within 10 minutes again and then apply the rebuild labels. But of
course, immediate is better.

The reason this happened is, that we're looking at `item.pull_request`
only. This is the correct distinction between "issue items" and "pull
request items", which we both get back from the /issues endpoint. But
the payload for the `pull_request*` event doesn't contain this, so
labeling in this case was treated like an issue and skipped the whole
pull request part.
2025-07-12 15:06:19 +02:00
K900
3c4bd15763 Merge remote-tracking branch 'origin/master' into staging-next 2025-07-09 16:26:35 +03:00
Wolfgang Walther
dd8357185a ci/labels: run in dry mode locally
To avoid mistakes when developing and testing against the upstream repo.
2025-07-08 17:05:22 +02:00
Wolfgang Walther
9936e7d751 ci/labels: run prettier
This is the result of:

  prettier --no-semi --single-quote
2025-07-08 17:05:17 +02:00
Wolfgang Walther
89ee8975ab ci/labels: init from workflows/labels
Moves the labels job into a separate ci/ subfolder to run it locally.
This eases debugging *a lot*.
2025-07-08 17:05:13 +02:00
nixpkgs-ci[bot]
eee21ba9fa Merge staging-next into staging 2025-06-30 12:08:05 +00:00
Alyssa Ross
a61841a597 nixVersions.nix_2_3: add knownVulnerabilities 2025-06-30 10:26:29 +02:00
nixpkgs-ci[bot]
6d1ef78814 Merge staging-next into staging 2025-06-30 00:19:30 +00:00
Wolfgang Walther
60e35e4ded ci/eval/README.md: one sentence per line 2025-06-29 21:14:34 +02:00
Wolfgang Walther
99f2e655d9 ci/README.md: one sentence per line 2025-06-29 21:14:33 +02:00
K900
5985f13b69 Merge remote-tracking branch 'origin/staging-next' into staging 2025-06-27 21:07:44 +03:00
Wolfgang Walther
df5b98a38c ci/check-cherry-picks: fix chained cherry-picks
When backporting a PR from master -> 25.05 -> 24.11 in a chain, the last
cherry-pick will have two references to different commits in it. If
there was conflict resolution in the first step, the diff will show up
again in the last step. This can be fixed by comparing against the right
hash - always the last one.
2025-06-27 16:27:45 +02:00
K900
a10dfa1005 Merge remote-tracking branch 'origin/staging-next' into staging 2025-06-23 21:07:45 +03:00
Alyssa Ross
1fa650463c ci/OWNERS: add kernel team to relevant files
This should prevent situations like
https://github.com/NixOS/nixpkgs/pull/389291 in future where a new
kernel variant was added without any discussion with the kernel team.
2025-06-23 17:25:56 +02:00
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