Skip to content

.github/workflows: reduce check-labels triggering#22241

Merged
crasbe merged 2 commits intoRIOT-OS:masterfrom
crasbe:pr/check_labels
May 5, 2026
Merged

.github/workflows: reduce check-labels triggering#22241
crasbe merged 2 commits intoRIOT-OS:masterfrom
crasbe:pr/check_labels

Conversation

@crasbe
Copy link
Copy Markdown
Contributor

@crasbe crasbe commented May 5, 2026

Contribution description

Currently the check-labels test creates a lot of noise as it is triggered with every push when a label is present that prevents the test from succeeding.

This can be annoying for core development, when the needs >1 ACK label is present.

The proposed change removes the synchronize trigger. This might lead to side effects where the check-labels test is not executed and therefore prevents a merge, that's why I added auto-merge-enabled as a trigger. That might affect @maribu who likes to enable Auto Merge when opening a PR :D

Perhaps one of you has a better idea of what to use additionally? https://docs.github.com/de/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target

enqueued won't help because it can't be queued without the check.

Testing procedure

I'll play around with it in this PR.
Trust me, bro.

Issues/PRs references

Fixes #21099.

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • none

@crasbe crasbe requested a review from kfessel May 5, 2026 12:23
@crasbe crasbe added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels May 5, 2026
@github-actions github-actions Bot added the Area: CI Area: Continuous Integration of RIOT components label May 5, 2026
@crasbe crasbe added the State: waiting for other PR State: The PR requires another PR to be merged first label May 5, 2026
@github-actions github-actions Bot added the Area: doc Area: Documentation label May 5, 2026
@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented May 5, 2026

Okay, this can't be tested in RIOT-OS/RIOT, because the test run from on the master version for safety reasons (it uses pull_request_target).

Therefore I tested it in my local fork crasbe#1 and it works as expected.

You can see that the label test was not run after adding the last commit:

image

It was run when removing the label:
image

@crasbe crasbe force-pushed the pr/check_labels branch from 9956abd to 9988c8e Compare May 5, 2026 12:42
@crasbe crasbe removed the State: waiting for other PR State: The PR requires another PR to be merged first label May 5, 2026
@github-actions github-actions Bot removed the Area: doc Area: Documentation label May 5, 2026
@maribu maribu enabled auto-merge May 5, 2026 13:22
@riot-ci
Copy link
Copy Markdown

riot-ci commented May 5, 2026

Murdock results

✔️ PASSED

f5e327d dist/tools: add GitHub workflows to can_fast_ci_run

Success Failures Total Runtime
1 0 1 01m:41s

Artifacts

@maribu maribu added this pull request to the merge queue May 5, 2026
@maribu
Copy link
Copy Markdown
Member

maribu commented May 5, 2026

Could you try sneaking in this change:

diff --git a/dist/tools/ci/can_fast_ci_run.py b/dist/tools/ci/can_fast_ci_run.py
index 8880314ef8..9f319c50b6 100755
--- a/dist/tools/ci/can_fast_ci_run.py
+++ b/dist/tools/ci/can_fast_ci_run.py
@@ -22,7 +22,7 @@ OTHER_CLASSIFIERS = [
     [re.compile(r"^(drivers\/include\/.*|sys\/include\/.*)$"), "public-headers"],
     [re.compile(r"^(Kconfig|kconfigs\/.*|pkg\/Kconfig|sys\/Kconfig|drivers\/Kconfig)$"), "kconfig"],
     [re.compile(r"^(.*\.cff|doc\/.*|.*\.md|.*\.txt)$"), "doc"],
-    [re.compile(r"^(CODEOWNERS|\.mailmap|\.gitignore|\.github|\.gitattributes)$"), "git"],
+    [re.compile(r"^(CODEOWNERS|\.mailmap|\.gitignore|\.github.*|\.gitattributes)$"), "git"],
     [re.compile(r"^(\.murdock|dist\/ls\/.*|\.drone.yml)$"), "ci-murdock"],
     [re.compile(r"^(\.bandit|\.drone.yml)$"), "ci-other"],
     [re.compile(r"^(dist\/.*|Vagrantfile|\.clang-format|\.clang-tidy)$"), "tools"],

That way it would directly test if the fixed regex would no match .github/workflows.

@crasbe crasbe removed this pull request from the merge queue due to a manual request May 5, 2026
@maribu
Copy link
Copy Markdown
Member

maribu commented May 5, 2026

Or maybe even

diff --git a/dist/tools/ci/can_fast_ci_run.py b/dist/tools/ci/can_fast_ci_run.py
index 8880314ef8..77d66754e3 100755
--- a/dist/tools/ci/can_fast_ci_run.py
+++ b/dist/tools/ci/can_fast_ci_run.py
@@ -22,7 +22,8 @@ OTHER_CLASSIFIERS = [
     [re.compile(r"^(drivers\/include\/.*|sys\/include\/.*)$"), "public-headers"],
     [re.compile(r"^(Kconfig|kconfigs\/.*|pkg\/Kconfig|sys\/Kconfig|drivers\/Kconfig)$"), "kconfig"],
     [re.compile(r"^(.*\.cff|doc\/.*|.*\.md|.*\.txt)$"), "doc"],
-    [re.compile(r"^(CODEOWNERS|\.mailmap|\.gitignore|\.github|\.gitattributes)$"), "git"],
+    [re.compile(r"^(CODEOWNERS|\.mailmap|\.gitignore|\.gitattributes)$"), "git"],
+    [re.compile(r"^\.github/.*$"), "github"],
     [re.compile(r"^(\.murdock|dist\/ls\/.*|\.drone.yml)$"), "ci-murdock"],
     [re.compile(r"^(\.bandit|\.drone.yml)$"), "ci-other"],
     [re.compile(r"^(dist\/.*|Vagrantfile|\.clang-format|\.clang-tidy)$"), "tools"],

?

Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
@maribu
Copy link
Copy Markdown
Member

maribu commented May 5, 2026

Locally it does work:

master:

./dist/tools/ci/can_fast_ci_run.py --debug --explain
Couldn't classify changes: File ".github/workflows/check-labels.yml" doesn't match any known category

with above diff:

./dist/tools/ci/can_fast_ci_run.py --debug --explain
Other
=====

github
------

- .github/workflows/check-labels.yml

@github-actions github-actions Bot added the Area: tools Area: Supplementary tools label May 5, 2026
@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented May 5, 2026

Yes, seems to work as intended 👍

@crasbe crasbe enabled auto-merge May 5, 2026 15:20
@crasbe crasbe added this pull request to the merge queue May 5, 2026
Merged via the queue into RIOT-OS:master with commit b63c8ab May 5, 2026
26 checks passed
@crasbe crasbe deleted the pr/check_labels branch May 5, 2026 15:28
@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented May 5, 2026

Thanks and thanks for the quick fix too! :)

@crasbe
Copy link
Copy Markdown
Contributor Author

crasbe commented May 6, 2026

Just tested this with #22240 and hitting auto merge indeed does trigger the check-labels workflow and enables the merge process. It works as expected :)

@kfessel
Copy link
Copy Markdown
Contributor

kfessel commented May 6, 2026

many Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CI Area: Continuous Integration of RIOT components Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github workflow: failing check-labels action generates a lot of notification noise

4 participants