Skip to content

[no-ci] Fix blocked-label check falsely matching "documentation"#1836

Open
rwgk wants to merge 1 commit intoNVIDIA:mainfrom
rwgk:pr-metadata-check-fixes
Open

[no-ci] Fix blocked-label check falsely matching "documentation"#1836
rwgk wants to merge 1 commit intoNVIDIA:mainfrom
rwgk:pr-metadata-check-fixes

Conversation

@rwgk
Copy link
Copy Markdown
Collaborator

@rwgk rwgk commented Mar 31, 2026

The blocked-label check in pr-metadata-check.yml word-split the string "blocked DO NOT MERGE do not merge" into individual shell tokens (blocked, DO, NOT, MERGE, do, not, merge). Each token was then used as a grep -qi substring pattern, so DO matched documentation, causing a false "Blocked label detected" error on any PR with the documentation label.

Fix

Replace the double-nested word-split loop with:

  • A while IFS= read -r loop over jq -r '.[].name' output, correctly handling multi-word label names
  • A single grep -qiE "blocked|do not merge" regex, keeping multi-word patterns intact

Workflow logs reviewed while working on this PR

Run Labels Expected failures Blocked false positive?
23748478947 (PR #1822) documentation, cuda.bindings assignee, milestone Yes -- documentation flagged
23748648922 (PR #1830) enhancement, feature, cuda.bindings assignee No
23757944518 (PR #1793) (none) module label, type label, milestone No

The blocked-patterns loop word-split "DO NOT MERGE" into individual
words, so "DO" matched as a substring of "documentation" via grep.
Replace with a single grep -qiE regex and read labels line-by-line
from jq to also handle multi-word label names correctly.

Made-with: Cursor
@rwgk rwgk added this to the ci backlog milestone Mar 31, 2026
@rwgk rwgk added bug Something isn't working P0 High priority - Must do! CI/CD CI/CD infrastructure labels Mar 31, 2026
@rwgk rwgk self-assigned this Mar 31, 2026
@rwgk rwgk requested review from cpcloud and rparolin March 31, 2026 04:34
@rwgk rwgk enabled auto-merge (squash) March 31, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD CI/CD infrastructure P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant