Commit Graph

1464 Commits

Author SHA1 Message Date
Wolfgang Walther
b2d1946eb2 workflows/reviewers: request owners and maintainers at once
Instead of requesting owners and maintainer separately, each with their
own limit of 10 review requests, we now run this together. This unties
the logic and allows easier refactoring. Also, it gives us a consistent
threshold of when not to request reviews anymore, which I set to 15.
Before, this could have been anything between 10 and 20, depending on
how the reviewers distributed over owners and maintainers.
2025-11-01 13:44:23 +01:00
Wolfgang Walther
f66a380ea3 workflows/pr: rename to pull-request-target
To be able to disable the pr.yml workflow on GitHub, we need to rename
it to a different name. Let's use the long name for consistency with
merge-group.yml. This only affects the GitHub-internal name, not the
visible name in the PR checklist, which is still "PR". This visible name
is also used by nixpkgs-review, so that won't break.
2025-11-01 12:59:21 +01:00
Wolfgang Walther
9718f2952f workflows/check: run codeowners validator from trusted checkout
In f7d6d11e8e I wrongly assumed that
running from the untrusted checkout should be fine for the codeowners
validator, because we removed all the logic for privileged tokens.
However, this job also contains access to the cachix secret, which could
be used to push malicious code to cachix, which would then be pulled by
a more privileged workflow like reviewers.yml later.
2025-11-01 12:51:27 +01:00
Wolfgang Walther
6b5e6cbbee ci/github-script/labels: set maintainer labels from latest maintainer map
Instead of setting the maintainer-related labels based entirely on Eval
results, this uses the new maintainer map from the target branch. This
allows labeling PRs correctly, that had been created *before* a
contributor became a maintainer of the respective package.
2025-11-01 10:36:23 +01:00
Wolfgang Walther
4061fac135 workflows/eval: upload maintainer list of all packages as artifact (#456965) 2025-10-31 11:28:37 +00:00
Wolfgang Walther
498574f238 workflows/eval: upload maintainer list of all packages as artifact
This creates a simple mapping of all packages to github ids of all their
maintainers. This is uploaded as an artifact and is then available for
download on the latest commit of each branch with a merge queue. This
will allow scheduled jobs to use this information for setting
maintainer-related labels, to request reviewers and to implement the
merge-bot.

The advantage over querying this information directly via Nix in each
case: The scheduled job does not need to install Nix and does not need
to checkout the target branch.

Compared to obtaining the maintainer information just for a single PR
during Eval, this will allow retroactively changing maintainers for a
package: For example, it allows to request a new maintainer as reviewer
for a PR that was created before they became maintainer, but is still
open - and similarly for maintainer labels and merge-bot rights.

None of these extensions are implemented by this PR, yet.
2025-10-31 10:59:01 +01:00
Wolfgang Walther
6ae5f33c85 workflows/merge-group: compare eval against previous queue item
This runs the compare step in the merge queue, to get a combined diff
against the previous queue item. This can be used as a base for multiple
different features in the future, for example preventing accidental mass
rebuilds in the merge queue, or diffing of packages' meta.
2025-10-31 10:58:45 +01:00
Wolfgang Walther
089a29e00f workflows/pr: retry for 422 in prepare
I recently tried to increase retries to 3 to fix the 422 "Sorry, this
diff is taking too long to generate" errors that appear frequently as of
late. Little did I know that, this specific status code would not be
retried by default. Thus, try again.
2025-10-30 13:19:59 +01:00
Wolfgang Walther
67506595ac workflows/test: prefix artifacts
Once we start running similar jobs in the PR and Merge Queue workflows,
the Test workflow will run into a problem: Both nested workflows will
try to upload the same artifacts, which errors out.

By providing a prefix to use for artifact names, this will be a
non-issue when we later run more of Eval in the merge queue or when we
add the build jobs to the queue as well.
2025-10-30 12:16:59 +01:00
Wolfgang Walther
1fdb9eb10e .github/labeler-no-sync: backport changes to github-teams (#456426) 2025-10-28 16:18:06 +00:00
Silvan Mosberger
72d9fc32fe workflows/team: Prefix PR branch with create-pull-request
Allows better scoping of branch creation restrictions
2025-10-28 15:49:42 +01:00
Wolfgang Walther
0ace36a3da .github/labeler-no-sync: backport changes to github-teams
Changes to this auto-generated file need to be backported automatically,
to keep maintainer pings for teams functional on stable branches.
2025-10-28 12:13:54 +01:00
Wolfgang Walther
81005856bb workflows/teams: consistent style with other workflows
These are style-only formatting changes, that are not enforced via
tooling - but used consistently in the other workflow files.
2025-10-28 11:43:07 +01:00
Wolfgang Walther
42de52d21a workflows/teams: rename from team
Keeping the workflow filename in-sync with the visible name.
2025-10-28 11:39:37 +01:00
Wolfgang Walther
b5af85e10e Revert "First-class GitHub team reviews" 2025-10-28 07:38:20 +00:00
Silvan Mosberger
e6c822f51f workflows/reviewers: First-class team package maintainer review requests 2025-10-28 01:35:25 +01:00
Silvan Mosberger
c0c6684257 workflows/team-sync: init
Creates a team sync workflow that pushes the current state of teams to a
JSON file, which can then be ingested by `lib.teams` to expose member
lists.

Co-Authored-By: Alexander Bantyev <alexander.bantyev@tweag.io>
2025-10-27 19:36:57 +01:00
Wolfgang Walther
55f9ab9e87 build(deps): bump actions/download-artifact from 5.0.0 to 6.0.0 (#456178) 2025-10-27 12:13:27 +00:00
dependabot[bot]
cc8b97e2a2 build(deps): bump actions/download-artifact from 5.0.0 to 6.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](634f93cb29...018cc2cf5b)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 12:10:22 +00:00
dependabot[bot]
19d3996ff7 build(deps): bump actions/upload-artifact from 4.6.2 to 5.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](ea165f8d65...330a01c490)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 12:00:55 +00:00
Wolfgang Walther
623b33839a workflows/backport: persist credentials
This was added when introducing zizmor. It appears that the backport
action actually needs these credentials to persist, to be able to push
the branch.
2025-10-27 09:01:17 +01:00
Winter
1a9867167d ci: add zizmor check and configuration
`zizmor` is a tool that uses static analysis to find potential security
issues in GitHub Actions [0]. (Yes, it's a bit absurd that GitHub
made a CI system so complicated that tools like this were created, but
I digress.)

Given our increase in GHA usage recently, I think this is a good step
towards keeping our security posture in tip-top shape. (It also keeps
with the theme of automating as many things as possible!)

The rule related to the usages of dangerous-triggers have been disabled
to avoid false-positives. Explanations about the usage of
`pull_request_target` and expectations around its usage can be found in
`.github/workflows/README.md`.

[0]: https://woodruffw.github.io/zizmor/

Co-authored-by: Thomas Gerbet <thomas@gerbet.me>
2025-10-26 22:03:12 +01:00
Winter
65bb095948 ci: fix issues found by zizmor
Co-authored-by: Thomas Gerbet <thomas@gerbet.me>
2025-10-26 20:19:08 +01:00
Wolfgang Walther
1f494acf7a build(deps): bump korthout/backport-action from 3.3.0 to 3.4.1 (#449106) 2025-10-25 08:42:15 +00:00
Wolfgang Walther
e43a84b674 workflows/eval: fix eval report with formatting changes
The Eval report which tests performance between Nix/Lix versions on
update of `ci/pinned` wrongly returned errors, when only the special
attribute `release-checks` changed. Since this reads in all of Nixpkgs,
it will change with any formatting change that is introduced at the same
time via update of any of `treefmt`'s formatters.
2025-10-24 15:11:41 +02:00
Wolfgang Walther
8edb1fc3c2 workflows/prepare: retry automatically
We have seen API errors in the prepare scripts frequently the last
couple of days. A quick fix should be to retry these requests.
2025-10-22 13:39:38 +02:00
dependabot[bot]
108161b917 build(deps): bump cachix/install-nix-action from 31.8.0 to 31.8.1
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.8.0 to 31.8.1.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](7ab6e7fd29...fd24c48048)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.8.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-20 11:59:36 +00:00
Wolfgang Walther
1c628df319 workflows/eval: remove exception for devShellTools from report
These were fixed recently, so we don't need the exception anymore.
2025-10-16 18:47:51 +02:00
Wolfgang Walther
bc37e667c4 Revert "workflows/eval: run Lix in the merge queue"
This reverts commit 7ed2c7e297.

This breaks the performance report, because it compares Lix vs Nix and
needs more thought before re-application.
2025-10-16 18:46:19 +02:00
Wolfgang Walther
7ed2c7e297 workflows/eval: run Lix in the merge queue
This change runs Lix on the target commit and Nix on the merged commit.
This does two things for us at once:
- We test both Lix and Nix.
- We ensure that both Lix and Nix produce the same output hashes.

If Lix and Nix were to produce different output hashes at some point,
this would show up as rebuilds in every PR.
2025-10-14 19:47:27 +02:00
Wolfgang Walther
593e2467a4 workflows/eval: remove separate attrpaths step
This was only separate to work around possible delays from the target
branch's eval workflow. With the switch to the merge queue, this delay
is impossible - the relevant target commit will only appear once Eval
has completed in the merge queue, so Eval will be guaranteed to have
finished.

By running attrpaths and outpaths in the same step, we share ~10 seconds
of eval time, traversing through all of Nixpkgs.
2025-10-14 19:47:23 +02:00
Wolfgang Walther
17eb6dcb27 workflows: move eval from push to queue
Running eval in the merge queue prevents eval failures after merging
multiple PRs with semantic merge conflicts.

It's also the base for allowing more sophisticated checks about rebuild
counts in the merge queue later.

When branches are directly pushed to, such as for periodic merges, this
will not run Eval immediately. However, the next PR will run it as part
of its Eval step and will cache the results. Any further PR will then
benefit from the same caching again.

This also avoids running Eval twice when pushing to staging-next or
haskell-updates, where a PR is open at the same time. Here, the PR's
Eval still runs on the push, of course.
2025-10-14 19:47:20 +02:00
Philip Taron
6523c0d29f ci/github-script/labels: solve TODOs (#451950) 2025-10-14 13:41:48 +00:00
dependabot[bot]
7fdea47a79 build(deps): bump cachix/install-nix-action from 31.7.0 to 31.8.0
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.7.0 to 31.8.0.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](9280e7aca8...7ab6e7fd29)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 12:01:36 +00:00
Wolfgang Walther
b98ea083be workflows/labels: use Node 24 2025-10-11 13:37:21 +02:00
dependabot[bot]
84fadb88cc build(deps): bump korthout/backport-action from 3.3.0 to 3.4.1
Bumps [korthout/backport-action](https://github.com/korthout/backport-action) from 3.3.0 to 3.4.1.
- [Release notes](https://github.com/korthout/backport-action/releases)
- [Commits](ca4972adce...d07416681c)

---
updated-dependencies:
- dependency-name: korthout/backport-action
  dependency-version: 3.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 11:47:16 +00:00
dependabot[bot]
15a3f2d581 build(deps): bump peter-evans/create-or-update-comment
Bumps [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/peter-evans/create-or-update-comment/releases)
- [Commits](71345be026...e8674b0752)

---
updated-dependencies:
- dependency-name: peter-evans/create-or-update-comment
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-06 11:39:35 +00:00
Wolfgang Walther
d28cc2a2f5 linux: new workflow for kernel changes (#444973) 2025-10-06 06:41:41 +00:00
Maximilian Bosch
9f95c2ace2 linux: new workflow for kernel changes
See https://github.com/NixOS/nixpkgs/issues/437208#issuecomment-3288623669
Depends on https://github.com/NixOS/org/pull/172

As documented below, the idea is to essentially group all changes
rebuilding all VM tests with kernel updates and merge them together into
`master` whenever the Linux kernels get updated.

This documents the workflow of updates in the nixpkgs manual. While at
it, I removed the README from the packages because

* it's horribly outdated
* I didn't even know it exists which confirms that its discoverability
  was very poor

and added the relevant portions into the nixpkgs manual as well.
2025-10-05 22:59:25 +02:00
Wolfgang Walther
b139d62311 workflows/check: don't check github api for owners file (#446937) 2025-09-30 10:34:25 +00:00
dependabot[bot]
edbb51b963 build(deps): bump cachix/install-nix-action from 31.6.2 to 31.7.0
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.6.2 to 31.7.0.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](a809471b5c...9280e7aca8)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-29 14:03:48 +00:00
Wolfgang Walther
f7d6d11e8e workflows/check: don't check github api for owners file
This removes the "owners" check from codeowners-validator. With it, all
tokens and permissions can be removed, because these were only needed to
make these requests.

This solves the problem of codeowners-validator not supporting our new
nested team structure for nixpkgs-maintainers. To make the onboarding of
new teams easier, we moved all teams "under" the nixpkgs-maintainers
team. This makes them inherit the right privileges (triage) for Nixpkgs.

However, this inheritance is not recognized by codeowners-validator,
thus it assumes that these teams don't have access to Nixpkgs. This then
fails the owners check immediately.

Removing the owners check also has a few other advantages:
- This check depends on external state: If a user is renamed or a team
removed, the check will fail. This makes it a bad check for required
status checks or merge queues - the check might fail randomly,
independent of the current PR.
- Running this check in a fork will never work, because the respective
users and teams don't have access to the fork's repo.

Both of this required us to set `continue-on-error: true` most of the
time.
2025-09-28 18:22:01 +02:00
Heitor Augusto
5b1c494eee .github/labeler.yml: add pop-launcher in COSMIC topic 2025-09-28 09:40:32 -03:00
Heitor Augusto
f637813728 .github/labeler.yml: add libcosmicAppHook in COSMIC topic 2025-09-28 09:40:32 -03:00
dependabot[bot]
0bc90bd741 build(deps): bump cachix/install-nix-action from 31.6.1 to 31.6.2
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.6.1 to 31.6.2.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](7be5dee142...a809471b5c)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-22 11:18:24 +00:00
Bobby Rong
c718a7eca4 nixos/pantheon: Default to wayland session (#442810) 2025-09-15 12:57:30 +00:00
dependabot[bot]
83d35a9485 build(deps): bump actions/create-github-app-token from 2.1.1 to 2.1.4
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 2.1.1 to 2.1.4.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](a8d6161485...6701853927)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 2.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 11:42:25 +00:00
Bobby Rong
b9eea40616 nixos/pantheon: Move out of X11
The next few commits will make pantheon-wayland the default.

Note that the Pantheon LightDM greeter option is left untouched
right now since it still runs under X11.
2025-09-14 14:36:05 +08:00
Wolfgang Walther
631be7a18e ISSUE_TEMPLATE/03_bug_report_nixos: remove git blame
This is annyoing advice. I am getting pinged for stuff that I have zero
interest in, just because I do treewides.
2025-09-12 19:49:20 +02:00
Wolfgang Walther
43a8f20d58 workflows/{merge_group,pr}: fail status check explicitly
When the merge queue fails, the workflow currently does not post a
negative result - and GitHub Actions waits for the status check to time
out, which takes 60 minutes.

This, of course, is a waste of time and resources. By explicitly failing
the status check, we boot the PR out of the merge queue immediately.
2025-09-11 19:45:06 +02:00