From 370e0882cbadf4f603f5d41834e34e9282546b64 Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Wed, 23 Apr 2025 11:14:25 +0100 Subject: [PATCH] ci: workflows: check for manifest dnm in the manifest workflow The current CI setup sets the manifest DNM label in a workflow and checks it in a different workflow. The one performing the check is configured to rerun on label changes but it's been reported few times that the rerun logic does not seem to always run effectively and there's been cases where the manifest has been fixed but the label has not been removed by the automation, resulting in a stale PR. Since the manifest has its own dedicated label, fix this race condition by checking for that label specifically in the manifest workflow rather than in a separate one, this means that the check is always performed after the script that sets the label. It also means that on manifest changes the manifest step itself will fail rather than the PR metadata check one. Signed-off-by: Fabio Baltieri --- .github/workflows/manifest.yml | 7 +++++++ .github/workflows/pr_metadata_check.yml | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/manifest.yml b/.github/workflows/manifest.yml index fdd6f75e38c..889fe073e06 100644 --- a/.github/workflows/manifest.yml +++ b/.github/workflows/manifest.yml @@ -53,3 +53,10 @@ jobs: verbosity-level: '1' labels: 'manifest' dnm-labels: 'DNM (manifest)' + + - name: Check for label + if: ${{ contains(github.event.*.labels.*.name, 'DNM (manifest)') }} + run: | + echo "Pull request is labeled as 'DNM (manifest)'." + echo "This workflow fails so that the pull request cannot be merged." + exit 1 diff --git a/.github/workflows/pr_metadata_check.yml b/.github/workflows/pr_metadata_check.yml index 3564c6352c8..199c76dde1b 100644 --- a/.github/workflows/pr_metadata_check.yml +++ b/.github/workflows/pr_metadata_check.yml @@ -20,7 +20,6 @@ jobs: steps: - name: Check for label if: ${{ contains(github.event.*.labels.*.name, 'DNM') || - contains(github.event.*.labels.*.name, 'DNM (manifest)') || contains(github.event.*.labels.*.name, 'TSC') || contains(github.event.*.labels.*.name, 'Architecture Review') || contains(github.event.*.labels.*.name, 'dev-review') }}