Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/scripts/test-native-queue-workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ def test_owned_gate_uses_trusted_base_not_member_code(self):
manifest = yaml.safe_load((ROOT / ".github/release-lines.yml").read_text())
self.assertEqual(manifest["pinned"]["native-queue-policy.yml"], ["v6", "-v4"])

def test_owned_gate_retriggers_never_cancel_the_evidence_wait(self):
# Stage-label flips re-fire the PR-target run every few minutes; a
# cancelling concurrency group would never let the bounded evidence
# wait finish (#16942). Re-triggers must still run (a hold added after
# a green run must turn the check red) but must queue, not cancel.
data = workflow("native-queue-policy.yml")
events = data.get("on", data.get(True))
for action in ("edited", "labeled", "unlabeled"):
self.assertIn(action, events["pull_request_target"]["types"])
concurrency = data["concurrency"]
self.assertIn("github.event.pull_request.number", concurrency["group"])
self.assertIs(concurrency["cancel-in-progress"], False)

def test_dependabot_runs_the_same_trusted_pr_verifier(self):
verifier = workflow("pr-verifier.yml")
events = verifier.get("on", verifier.get(True))
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/native-queue-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ permissions:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}
# Serialise per PR but never cancel: the evidence wait below runs up to
# 22.5 min, and every stage-label flip re-fires this workflow. With
# cancel-in-progress the check could never reach a verdict on a PR the
# hive is actively staging (#16942). The queued run re-reads the mutable
# PR state after the current one finishes, so fail-closed is preserved.
cancel-in-progress: false

jobs:
policy:
Expand Down
Loading