Skip to content

[Backport release-24.11] workflow/labels: switch to a scheduled trigger#417232

Merged
wolfgangwalther merged 7 commits intorelease-24.11from
backport-416808-to-release-24.11
Jun 16, 2025
Merged

[Backport release-24.11] workflow/labels: switch to a scheduled trigger#417232
wolfgangwalther merged 7 commits intorelease-24.11from
backport-416808-to-release-24.11

Conversation

@nixpkgs-ci
Copy link
Contributor

@nixpkgs-ci nixpkgs-ci bot commented Jun 16, 2025

Bot-based backport to release-24.11, triggered by a label in #416808.

  • Before merging, ensure that this backport is acceptable for the release.
    • Even as a non-committer, if you find that it is not acceptable, leave a comment.

Instead of relying on workflow_run events, we now trigger the labeling
workflow by schedule. This avoids all permission/secrets problems of
running in the pull_request_review context - and also gets rid of the
"waiting for approval to run workflows" button for new contributors that
sometimes comes up right now.

Also, it's more efficient. Previously, the labeling workflow would run
on *any* pull_request_review event, which happens for all comments, too.
So quite a few runs.

This will cause a delay of up to 1 hour with the current settings until
approval labels are set. Depending on how long the job normally runs we
can adjust the frequency. The workflow is written in a way that will
work no matter what the frequency ends up being, even when it's
interrupted by transient GHA failures: It will always look at all PRs
which were updated since the last time the workflow ran successfully.

We also add the ability to run it manually via UI. This is useful:
- When fixing bugs in the labeler workflow to run it all the way back to
where the bug was introduced.
- When introducing new labels, to get a head start for a reasonable
amount of PRs immediately.

Of course, the workflow is also still run directly after Eval itself.
This is also the only case that the actions/labeler steps will run,
since they depend on the `pull_request` context.

(cherry picked from commit 6f12f66)
With the previous commit we now have the `before` labels available
already, which allows some simplification.

(cherry picked from commit 4d53700)
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 4.workflow: backport This targets a stable branch 6.topic: policy discussion Discuss policies to work in and around Nixpkgs labels Jun 16, 2025
(cherry picked from commit 2f3970c)
This would fail, because no previous workflow can be found.

(cherry picked from commit 4425979)
This runs all PRs in scope to completion, before reporting errors.

(cherry picked from commit c12c91f)
Previously, the artifacts of different PRs would overwrite each other,
thus leading to odd JSON parsing errors.

(cherry picked from commit 7efbed4)
The original error is kept, but the PR number is printed as well. Makes
debugging much easier.

(cherry picked from commit 97130d0)
@wolfgangwalther wolfgangwalther merged commit cef0f23 into release-24.11 Jun 16, 2025
13 of 16 checks passed
@wolfgangwalther wolfgangwalther deleted the backport-416808-to-release-24.11 branch June 16, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.workflow: backport This targets a stable branch 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant