Commit Graph

907 Commits

Author SHA1 Message Date
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
Martin Weinelt
0026f50279 buildMozillaMach: migrate into build-support
The builder has multiple consumers, so it is fine to separate it from
Firefox, but the main motivation is to separate code ownership between
the builder and individual firefox versions.
2025-07-29 18:43:21 +02:00
Wolfgang Walther
4fbb23ef4e top-level/release-attrpaths-superset: remove __attrsFailEvaluation (#428015) 2025-07-24 19:45:36 +00:00
Wolfgang Walther
30f19cce69 ci/eval: fail on asserts when generating attrpaths
This doesn't fail on *all* asserts, yet, because nix-env still ignores
these in the main eval step. But it already gives some converage during
the attrpath generation.
2025-07-24 15:31:08 +02:00
Wolfgang Walther
6f5663940c ci/pinned: update
This gives us Nix 2.30 and nixfmt 1.0.0.

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

Changes for treefmt-nix:
a05be418a1...421b56313c
2025-07-24 13:55:37 +02:00
Wolfgang Walther
ea970ff3be ci/parse: raise minimum test to Nix 2.24
Nix 2.3 is marked as insecure and thus not cached anymore.

We'll either need to patch it and cache it again or drop it.
2025-07-24 13:52:37 +02:00
Wolfgang Walther
bfb20b9fea workflows/build: build nixpkgs tarball
This adds a build job for the tarball, which might help uncover eval
issues on attributes not normally touched by Eval, aka those added in
`pkgs/top-level/packages-config.nix`.
2025-07-24 09:50:39 +02:00
Wolfgang Walther
4ad7d21c88 top-level/release-outpaths-parallel: rename from top-level/release-attrpaths-parallel
This file takes attrpaths as input and returns chunks of derivations,
aka a subset of release-outpaths - while release-attrpaths-superset
returns only an attrpath, not any derivations.

Thus, as a specialization of release-outpaths, the name
release-outpaths-parallel matches much better.
2025-07-23 18:13:35 +02:00
Wolfgang Walther
0d6945991c ci/github-script/labels: limit cutoff to max 1 day (#426946) 2025-07-21 06:13:11 +00:00
Wolfgang Walther
7f9f7a20b0 ci/github-script/labels: limit cutoff to max 1 day
It has only happened once, but the GitHub API suddenly returned a
workflow run from a few weeks back. This lead to quickly hitting the
rate limit for search requests.

Prevent this from happening by going back a day max for the "recently
updated" case. After roughly a day, every PR will have been touched by
the regular batch processing anyway.

Also save a few API requests, by taking bigger chunks of the search
result.
2025-07-20 21:53:21 +02:00
Wolfgang Walther
524a47b2b4 ci/github-script/commits: harden code block rendering
To avoid rendering issues when diffing a markdown file with these
markers in context, just increase the markers length.
2025-07-20 16:06:25 +02:00
Wolfgang Walther
4a0c2c58a2 Revert "ci/github-script/commits: keep formatting for diffs of markdown blocks"
This reverts commit b19798c8b0.

It lead to messed up formatting of the diff.
2025-07-20 16:04:23 +02:00
Wolfgang Walther
78790dabd9 nixfmt[-rfc-style]: unstable -> 1.0.0 (#425068) 2025-07-18 17:40:43 +00:00
Wolfgang Walther
fa0ef8a6bb ci/github-script/commits: various fixes and improvements (#425789) 2025-07-17 10:11:59 +00:00
Wolfgang Walther
486756d85c ci/github-script/commits: shorten and clarify review comment
Also following the one-sentence-per-line rule now.
2025-07-16 15:47:19 +02:00
Wolfgang Walther
c4496912fd ci/github-script/commits: fix job_url
This broke when we moved the check-cherry-picks workflow into the bigger
PR workflow. At this time, the "workflow run" became the whole PR
workflow, which includes many more than just 1 job, thus the assumption
in `jobs[0]` doesn't hold anymore.
2025-07-16 15:47:18 +02:00
Wolfgang Walther
1fbcad0434 ci/github-script/commits: block on errors
Most of the checks we do for cherry-picks are dismissable warnings, with
one exception: When a commit hash has been found, but this hash is not
available in any of the pickable branches, we raise this with
severity=error. This should also *block* the merge and not be
dismissable. That's because this is a fixable issue in every case.
2025-07-16 15:47:17 +02:00
Wolfgang Walther
182184a00f ci/github-script/commits: init from ci/check-cherry-picks (#425449) 2025-07-16 10:25:30 +00:00
Wolfgang Walther
b19798c8b0 ci/github-script/commits: keep formatting for diffs of markdown blocks
Previously, when the diff contained a context line with ```, this would
end the code block and entirely break the markdown rendering.

Now we use the html code blocks provided by `core.summary` and properly
escape the content, so that it never escapes via html tags.
2025-07-16 12:15:07 +02:00
Wolfgang Walther
40dcbb1483 ci/github-script/commits: ignore whitespace on diff
This reduces noise that the cherry-pick reviews produce when formatting
related conflicts had to be resolved. We only do this in the
length-limited review comment, though. All changes, including
whitespace, can still be double-checked in the job log if needed.
2025-07-16 11:59:28 +02:00
Wolfgang Walther
84925b35c4 ci/github-script/commits: add comment about --creation-factor 2025-07-16 11:58:08 +02: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
Silvan Mosberger
d1a4769b38 treewide: nixfmt-rfc-style -> nixfmt
Except:
- Instances in documentation, because people in older versions
  can't switch to nixfmt yet due to it having pointed to nixfmt-classic
  before
- In code that runs based on a CI Nixpkgs version, which is also a bit
  older still
- In update script shebangs, because many of them don't pin Nixpkgs, and run
  with whatever is in NIX_PATH (and it's not easy to fix this, see
  https://github.com/NixOS/nixpkgs/issues/425551)
2025-07-15 22:14:18 +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