Skip to content

Commit 56dcfd4

Browse files
ci: gate merging on a single Release Validation summary job (#775)
* ci: gate merging on a single Release Validation summary job Adds a "summary" job to release-validation.yml that depends on check-paths, build-artifacts, and install-and-smoke and runs with if: always(). It translates the upstream conclusions into a single binary verdict — success/skipped → pass, failure or cancelled → fail — so the required check has a stable name and a definite state regardless of whether upstream jobs ran or were path-filtered out. In .asf.yaml the required contexts drop from two matrix-suffixed names ("Release Validation / build-artifacts", "Release Validation / install-and-smoke (3.12)") to one: "Release Validation / summary". Why this is needed: - PRs that only touch docs/ or website/ trigger check-paths to set should_run=false, which skips the heavy jobs. - GitHub treats SKIPPED jobs as non-passing for required-status- checks, so those PRs were stuck in BLOCKED state forever (see commit a655edf for the previous attempt that didn't work for this exact reason). - The summary job sidesteps the SKIPPED ambiguity because it always runs and always produces a definite SUCCESS or FAILURE. Real code PRs are unaffected: if any release-validation job fails, the summary fails, and merging is blocked. * style: run black on burr/core/graph.py Drive-by fix — `f7a1750d` (rename shadowed `format` builtin) left this file black-non-compliant for line-length=100. Caught by pre-commit on this branch.
1 parent 7b20492 commit 56dcfd4

3 files changed

Lines changed: 37 additions & 6 deletions

File tree

.asf.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@ github:
6262
required_status_checks:
6363
# strict means "Require branches to be up to date before merging".
6464
strict: false
65-
# contexts are the names of checks that must pass
65+
# The Release Validation workflow ends in a single "summary" job that
66+
# runs with if: always() and translates upstream SUCCESS or SKIPPED
67+
# into a definite SUCCESS, FAILURE into FAILURE. That gives us one
68+
# stable required check name regardless of whether the upstream jobs
69+
# ran (real code PR) or were path-filtered out (docs/website PR).
6670
contexts:
67-
- "Release Validation / build-artifacts"
68-
- "Release Validation / install-and-smoke (3.12)"
71+
- "Release Validation / summary"
6972
required_pull_request_reviews:
7073
dismiss_stale_reviews: false
7174
require_code_owner_reviews: false

.github/workflows/release-validation.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,33 @@ jobs:
193193
path: /tmp/burr-smoke-*
194194
retention-days: 7
195195
if-no-files-found: ignore
196+
197+
# Single stable required-check name. Always runs (if: always()) so it produces
198+
# a definite SUCCESS or FAILURE — never SKIPPED. Branch protection in
199+
# .asf.yaml requires this context, not the underlying jobs, so path-filtered
200+
# docs/website PRs (where the upstream jobs are skipped) still go green here.
201+
summary:
202+
name: "Release Validation / summary"
203+
needs: [check-paths, build-artifacts, install-and-smoke]
204+
if: always()
205+
runs-on: ubuntu-latest
206+
timeout-minutes: 2
207+
steps:
208+
- name: Verdict
209+
env:
210+
CHECK_PATHS: ${{ needs.check-paths.result }}
211+
BUILD_ARTIFACTS: ${{ needs.build-artifacts.result }}
212+
INSTALL_AND_SMOKE: ${{ needs.install-and-smoke.result }}
213+
run: |
214+
echo "check-paths: $CHECK_PATHS"
215+
echo "build-artifacts: $BUILD_ARTIFACTS"
216+
echo "install-and-smoke: $INSTALL_AND_SMOKE"
217+
# Pass if every needed job is success or skipped; fail if any
218+
# failed or was cancelled.
219+
for r in "$CHECK_PATHS" "$BUILD_ARTIFACTS" "$INSTALL_AND_SMOKE"; do
220+
case "$r" in
221+
success|skipped) ;;
222+
*) echo "::error::Release Validation failed (one or more jobs not success/skipped)"; exit 1 ;;
223+
esac
224+
done
225+
echo "Release Validation: all upstream jobs success or skipped."

burr/core/graph.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ def _render_graphviz(
107107
graphviz_obj.render(path_without_suffix, format=fmt, view=view)
108108
else:
109109
# `.pipe()` doesn't append the format to the filename, so we do it explicitly
110-
pathlib.Path(f"{path_without_suffix}.{fmt}").write_bytes(
111-
graphviz_obj.pipe(format=fmt)
112-
)
110+
pathlib.Path(f"{path_without_suffix}.{fmt}").write_bytes(graphviz_obj.pipe(format=fmt))
113111

114112

115113
@dataclasses.dataclass

0 commit comments

Comments
 (0)