rc-docs-sync: fix jq precedence bug in 'Fetch recent open documentation PRs'#403
Merged
Merged
Conversation
The filter was:
any(.path | startswith("docs/") or .path == "sidebars.js")
which parses as:
any(.path | (startswith("docs/") or .path == "sidebars.js"))
so the second .path tries to index the string result of the first pipe.
The error only fires when the iterated file's path does NOT start with
"docs/" — until today no such PR was in the search result. Now PR #402
(touches only .github/workflows/rc-docs-sync.yml) crashes the step.
Parenthesize the predicate so .path in the second clause refers to the
original file object:
any((.path | startswith("docs/")) or .path == "sidebars.js")
Observed failure: run 26742647973 (2026-06-01). The crash skipped the
agent for 27.8-RC3/4/5 and triggered the safety-net to advance state
past them without any actual processing.
Deploying yoast-developer with
|
| Latest commit: |
be562e3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://69f4aeac.yoast-developer.pages.dev |
| Branch Preview URL: | https://rc-docs-sync-fix-fetch-prs-j.yoast-developer.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run 26742647973 failed because the jq filter `any(.path | startswith("docs/") or .path == "sidebars.js")` parses as `.path | (startswith("docs/") or .path == "sidebars.js")` — the second `.path` indexes a string instead of the file object, crashing whenever an iterated file doesn't start with `docs/`. Latent until a non-`docs/` PR appeared in the search result (PR #402 today). Parenthesize the predicate so the second `.path` refers to the original file.
Side effect of today's failure: 27.8-RC3/RC4/RC5 each got a safety-net marker on issue #390 without any actual processing — those RCs are now marked "processed" but no docs work happened. Recovery is to delete those three marker comments so a subsequent run (after this fix + #402 land) re-picks them up.