Repository navigation
ci: add a maintainer override for Lychee HTTP 429 failures - #3155
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
I cancelled the CI and converted to draft only to not wast runner time. I'll merge #3142 first, then run the CI here against the new |
f4f4fd2 to
f6d5a9c
Compare
|
Suggestion: make the PR label fetch more fault tolerant. The "Read the PR's Lychee rate-limit override" step (in Without the label, the safe fallback is the strict default policy. So a failed lookup could retry a few times, then warn and fall back to strict instead of failing: allow_429=false
lookup_ok=false
for attempt in 1 2 3; do
# A command in an if condition is exempt from `set -e`.
if result="$(gh pr view "$PR_NUMBER" --json labels \
--jq '.labels | any(.name == "ci: lychee-non-blocking")')"; then
allow_429="$result"
lookup_ok=true
break
fi
sleep $((attempt * 5))
done
if [[ "$lookup_ok" != true ]]; then
echo "::warning::Could not read PR labels; using the strict link policy. Rerun to apply ci: lychee-non-blocking."
elif [[ "$allow_429" == true ]]; then
echo "::notice::ci: lychee-non-blocking permits only HTTP 429 failures after retries."
fi
echo "allow-429=$allow_429" >> "$GITHUB_OUTPUT"Effect:
Optional: the lookup could move into the composite action behind a |
Read current PR labels for authored and rendered checks. The explicit override accepts only HTTP 429 failures after retries, retaining reports and all other blocking checks. Normal policies remain unchanged. Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
LYCHEE_ARGS belonged to the removed rerun path and is no longer read. Keep this cleanup separate from the maintainer HTTP 429 override, as requested in review. Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
2e90ecf to
7f14d10
Compare
Read current PR labels once in the shared composite action. Retry failed or malformed lookups three times with 5/10-second delays, then warn and retain the normal link policy. An unconfirmed label never enables the override. Expose the early label decision to the authored pre-commit job so other hooks still run after an ordinary labeled link failure. Nightly and default-branch calls do not query PR labels. Signed-off-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
|
/ok to test b7b4f2f |
|
Done in commit b7b4f2f. Thanks for catching this! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Priority: ⬇️ Low Change: Feature Merge Risk: ⚪ Minimal · up to
|
Highlights
Give maintainers a narrow way to unblock a PR when external sites keep returning HTTP 429 rate limits after Lychee exhausts its retries. The
ci: lychee-non-blockinglabel applies to both authored and rendered documentation checks.This follows the rate-limit discussion in #3142. #3142 is merged; this now targets
mainand starts the remaining review stack: #3155 → #3143 → #3147. The override is separate from #3143's checkout-aware link feature; each can be reviewed on its own merits.Policy and tradeoffs
The proposed explicit override has no URL-count limit. Applying the label accepts the remaining rate-limited URLs as unverified, with the decision visible in warnings and reports. Failed checks are never cached as successes.
All other failures still block, including missing files or rendered anchors, timeouts, HTTP 403/404/5xx responses, and mixtures of those failures with 429s. Missing or invalid reports and hook execution errors also remain errors. Other exceptional failures continue to require the normal admin-merge decision.
Label lookup uses up to three attempts, with 5- and 10-second delays between attempts. If the API keeps failing or returns an unexpected response, the job warns and uses its normal policy; it never applies the override without confirming the label.
Without a confirmed label, authored checks remain strict and rendered checks retain their existing allowance for at most ten distinct HTTP 429 URLs. Local checks, default-branch checks, and nightly cache production keep their existing policies.
Using the override
ci: lychee-non-blockingto the affected PR.Adding or removing the label does not itself trigger CI. Each job reads current labels when it runs. If lookup retries are exhausted, the warning asks the maintainer to rerun to apply the override. Under the override, the report-based Lychee result becomes the final link gate; the subsequent full pre-commit invocation runs all remaining hooks once, even if that link gate fails. Its failure still keeps the job red.
Suggested review order
allow-429policy while retaining report validation and retries.pr-number; the action handles fresh label lookup and selects the policy. Itsallow-429output lets the authored workflow avoid a duplicate strict Lychee invocation when the override is active. Calls without a PR number do not query labels.Validation
pre-commit run --all-filespassed, including authored Lychee checks and workflow linting.Full CI requested for this revision. The local workflow probes use simulated label responses; they do not establish hosted execution of the override on GitHub.
Checklist