rusackas opened a new pull request, #40236:
URL: https://github.com/apache/superset/pull/40236

   ### SUMMARY
   
   The **Docs Testing** workflow has been the single biggest CI flake source on 
master: **61 failures in the last 2 weeks**. Almost every one fails with the 
same signature:
   
   ```
   Cause: [remark-localize-badges] Failed to download badge:
     https://img.shields.io/badge/slack-join-orange.svg
   Error: fetch failed
   Build cannot continue with broken badges. Please fix the badge URL or remove 
it.
   ```
   
   
[`remark-localize-badges`](https://github.com/apache/superset/blob/master/docs/plugins/remark-localize-badges.mjs)
 already retries 3× with backoff and a 30s timeout per attempt. When 
`img.shields.io` (or `codecov.io`, `badgen.net`, etc.) rate-limits the CI 
runner anyway — common from GitHub Actions IP ranges — the plugin throws and 
the entire docs build dies. The badge URL itself is fine; this is an 
external-service flake, not a real broken link.
   
   This PR changes the terminal failure path to:
   
   - **Log a warning** (`console.warn`) with the URL and the underlying error.
   - **Fall back to the original remote URL** so the rendered docs still 
display the badge (just unlocalized for this build).
   - **Keep going** — the docs build succeeds, and the next successful build 
re-localizes the badge.
   
   Adds a `REMARK_BADGES_STRICT=true` env var as an opt-in for the old 
"fail-the-build" behavior, for release pipelines that want to catch genuinely 
broken badge URLs.
   
   ### BEFORE/AFTER
   
   | | Before | After |
   |---|---|---|
   | Transient shields.io 429/timeout | Whole docs build fails | Build 
succeeds; badge served from `img.shields.io` directly |
   | Genuinely broken badge URL | Hard fail (good) | Same with 
`REMARK_BADGES_STRICT=true` (opt-in) |
   | Successful download | Local SVG cached + rewritten | Unchanged |
   | Retry policy (3× with backoff, 30s timeout) | Unchanged | Unchanged |
   
   ### TESTING INSTRUCTIONS
   
   Plugin smoke-loads correctly (`node -e 
"import('./plugins/remark-localize-badges.mjs')..."`). Full validation will 
happen via this PR's CI run of the `Docs Testing` job. To validate the opt-in:
   
   ```bash
   cd docs && REMARK_BADGES_STRICT=true npm run build  # should keep current 
strict behavior
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue
   - [ ] Required feature flags
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to