From 02ba2326de93a97616af29e6ebfb2964ef8ade55 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 10 Jun 2026 14:31:27 +0200 Subject: [PATCH 1/5] Add always-completing PR Gate check for workflow-only PRs PRs that only touch .github/* skip the AzDO MachineLearning-CI and MachineLearning-CodeCoverage pipelines, so Build Analysis never receives a build.completed event and stays in_progress indefinitely, blocking merge (dotnet/arcade-services#6311). Add a GitHub Actions check that always completes to serve as a stable required merge gate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/pr-gate.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/pr-gate.yml diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml new file mode 100644 index 0000000000..296909ca1c --- /dev/null +++ b/.github/workflows/pr-gate.yml @@ -0,0 +1,18 @@ +name: PR Gate + +on: + pull_request: + branches: + - main + - feature/* + - release/* + +permissions: + contents: read + +jobs: + pr-gate: + runs-on: ubuntu-latest + steps: + - name: Always succeed + run: echo "PR Gate passed." From 84588bc7c5e10308de0b33982c05ecd44db8684c Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 10 Jun 2026 14:42:24 +0200 Subject: [PATCH 2/5] PR Gate: satisfy Build Analysis for build-excluded PRs When every changed file is excluded from AzDO PR build validation (.github/*, **.md, docs/*, LICENSE, THIRD-PARTY-NOTICES.TXT), no build runs and the Arcade Build Analysis check hangs in_progress, blocking merge (dotnet/arcade-services#6311). Post a successful Build Analysis check run in that case so the required check completes; real PRs are untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/pr-gate.yml | 50 +++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 296909ca1c..b6e7b74cba 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -9,10 +9,56 @@ on: permissions: contents: read + checks: write + pull-requests: read jobs: pr-gate: runs-on: ubuntu-latest steps: - - name: Always succeed - run: echo "PR Gate passed." + - name: Satisfy Build Analysis for build-excluded PRs + uses: actions/github-script@v7 + with: + script: | + // AzDO MachineLearning-CI / MachineLearning-CodeCoverage exclude these + // paths from PR build validation. When every changed file is excluded, + // no AzDO build runs, so the Arcade "Build Analysis" check never receives + // a build.completed event and hangs in_progress, blocking merge + // (dotnet/arcade-services#6311). + const isExcluded = (f) => + f.endsWith('.md') || + f.startsWith('.github/') || + f.startsWith('docs/') || + f === 'LICENSE' || + f === 'THIRD-PARTY-NOTICES.TXT'; + + const files = await github.paginate(github.rest.pulls.listFiles, { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + per_page: 100, + }); + + const buildExcluded = files.length > 0 && files.every((f) => isExcluded(f.filename)); + core.info(`Changed files: ${files.length}, build-excluded: ${buildExcluded}`); + + if (!buildExcluded) { + core.info('PR touches build-relevant files; leaving Build Analysis to the official build.'); + return; + } + + await github.rest.checks.create({ + owner: context.repo.owner, + repo: context.repo.repo, + name: 'Build Analysis', + head_sha: context.payload.pull_request.head.sha, + status: 'completed', + conclusion: 'success', + output: { + title: 'Build Analysis satisfied by PR Gate', + summary: 'All changed files are excluded from AzDO PR build validation, ' + + 'so no build runs and the official Build Analysis would hang indefinitely ' + + '(dotnet/arcade-services#6311). PR Gate marks this required check complete.', + }, + }); + core.info('Posted successful Build Analysis check run.'); From cc0d2461c2ab2d3eda4349e7d035e1b6f0d32bdb Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 10 Jun 2026 14:50:33 +0200 Subject: [PATCH 3/5] Replace PR Gate with report-green AzDO pipeline for build-excluded PRs Mirror dotnet/runtime's eng/pipelines/report-green.yml. The main AzDO pipelines exclude .github/*, docs/*, **.md, LICENSE and THIRD-PARTY-NOTICES.TXT from PR validation, so PRs touching only those paths queue no build and the Arcade Build Analysis check hangs in_progress, blocking merge (dotnet/arcade-services#6311). report-green.yml has the inverse path filter and an agentless no-op job (pool: server, Delay@1). It produces a real AzDO build whose build.completed event lets Build Analysis report green. A GitHub Actions check cannot do this because Build Analysis listens for the AzDO event, not a same-named check run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/pr-gate.yml | 64 ----------------------------------- build/report-green.yml | 32 ++++++++++++++++++ 2 files changed, 32 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/pr-gate.yml create mode 100644 build/report-green.yml diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml deleted file mode 100644 index b6e7b74cba..0000000000 --- a/.github/workflows/pr-gate.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: PR Gate - -on: - pull_request: - branches: - - main - - feature/* - - release/* - -permissions: - contents: read - checks: write - pull-requests: read - -jobs: - pr-gate: - runs-on: ubuntu-latest - steps: - - name: Satisfy Build Analysis for build-excluded PRs - uses: actions/github-script@v7 - with: - script: | - // AzDO MachineLearning-CI / MachineLearning-CodeCoverage exclude these - // paths from PR build validation. When every changed file is excluded, - // no AzDO build runs, so the Arcade "Build Analysis" check never receives - // a build.completed event and hangs in_progress, blocking merge - // (dotnet/arcade-services#6311). - const isExcluded = (f) => - f.endsWith('.md') || - f.startsWith('.github/') || - f.startsWith('docs/') || - f === 'LICENSE' || - f === 'THIRD-PARTY-NOTICES.TXT'; - - const files = await github.paginate(github.rest.pulls.listFiles, { - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - per_page: 100, - }); - - const buildExcluded = files.length > 0 && files.every((f) => isExcluded(f.filename)); - core.info(`Changed files: ${files.length}, build-excluded: ${buildExcluded}`); - - if (!buildExcluded) { - core.info('PR touches build-relevant files; leaving Build Analysis to the official build.'); - return; - } - - await github.rest.checks.create({ - owner: context.repo.owner, - repo: context.repo.repo, - name: 'Build Analysis', - head_sha: context.payload.pull_request.head.sha, - status: 'completed', - conclusion: 'success', - output: { - title: 'Build Analysis satisfied by PR Gate', - summary: 'All changed files are excluded from AzDO PR build validation, ' + - 'so no build runs and the official Build Analysis would hang indefinitely ' + - '(dotnet/arcade-services#6311). PR Gate marks this required check complete.', - }, - }); - core.info('Posted successful Build Analysis check run.'); diff --git a/build/report-green.yml b/build/report-green.yml new file mode 100644 index 0000000000..e7438250c2 --- /dev/null +++ b/build/report-green.yml @@ -0,0 +1,32 @@ +# This CI job only runs on PRs where all other jobs are skipped. +# This allows Build Analysis to report green. Without this, no jobs would run, +# causing Build Analysis to hang indefinitely because it never receives an +# AzDO build.completed event (dotnet/arcade-services#6311). + +# Only run this on PRs +trigger: none +# Run for all relevant branches, only on paths that no-op the other pipelines. +pr: + autoCancel: true + branches: + include: + - main + - feature/* + - release/* + paths: + include: + - '**.md' + - .github/* + - docs/* + - LICENSE + - THIRD-PARTY-NOTICES.TXT + +# ABG - Always Be Green +jobs: + - job: Report_Green + pool: server + steps: + # This is a documentation-only change. Use a no-op task to exit successfully. + - task: Delay@1 + inputs: + delayForMinutes: '0' From e4977a3a7ed3c8f2b432cecc8a6c0af2cb5b35dd Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 10 Jun 2026 14:52:05 +0200 Subject: [PATCH 4/5] Trim comments in report-green.yml Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- build/report-green.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/build/report-green.yml b/build/report-green.yml index e7438250c2..ab51118e3f 100644 --- a/build/report-green.yml +++ b/build/report-green.yml @@ -1,11 +1,7 @@ -# This CI job only runs on PRs where all other jobs are skipped. -# This allows Build Analysis to report green. Without this, no jobs would run, -# causing Build Analysis to hang indefinitely because it never receives an -# AzDO build.completed event (dotnet/arcade-services#6311). - -# Only run this on PRs +# Runs on PRs where the main pipelines are skipped (build-excluded paths), +# so Build Analysis receives a build.completed event and reports green +# instead of hanging (dotnet/arcade-services#6311). trigger: none -# Run for all relevant branches, only on paths that no-op the other pipelines. pr: autoCancel: true branches: @@ -21,12 +17,10 @@ pr: - LICENSE - THIRD-PARTY-NOTICES.TXT -# ABG - Always Be Green jobs: - job: Report_Green pool: server steps: - # This is a documentation-only change. Use a no-op task to exit successfully. - task: Delay@1 inputs: delayForMinutes: '0' From 6dd98f1579d8bd8e679ef4feea9e6463c14da007 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Wed, 10 Jun 2026 14:53:19 +0200 Subject: [PATCH 5/5] Drop issue reference from report-green.yml comment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- build/report-green.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/report-green.yml b/build/report-green.yml index ab51118e3f..67dbab18b1 100644 --- a/build/report-green.yml +++ b/build/report-green.yml @@ -1,6 +1,6 @@ # Runs on PRs where the main pipelines are skipped (build-excluded paths), # so Build Analysis receives a build.completed event and reports green -# instead of hanging (dotnet/arcade-services#6311). +# instead of hanging. trigger: none pr: autoCancel: true