[Backport release-24.11] workflow/labels: switch to a scheduled trigger#417232
Merged
wolfgangwalther merged 7 commits intorelease-24.11from Jun 16, 2025
Merged
[Backport release-24.11] workflow/labels: switch to a scheduled trigger#417232wolfgangwalther merged 7 commits intorelease-24.11from
wolfgangwalther merged 7 commits intorelease-24.11from
Conversation
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)
2 tasks
(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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bot-based backport to
release-24.11, triggered by a label in #416808.