Skip to content

fix(docs): handle failed release-notes fetch in home.html Hugo build - #15700

Queued
Maffooch wants to merge 1 commit into
bugfixfrom
claude/docs-home-getremote-graceful
Queued

fix(docs): handle failed release-notes fetch in home.html Hugo build#15700
Maffooch wants to merge 1 commit into
bugfixfrom
claude/docs-home-getremote-graceful

Conversation

@Maffooch

@Maffooch Maffooch commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

[sc-14595]

Problem

The deploy job in .github/workflows/validate_docs_build.yml (and the github-pages deploy) intermittently fails because Hugo's resources.GetRemote fetches the latest GitHub release at build time and gets a 403 Forbidden (unauthenticated GitHub API rate limit on shared Actions runners).

docs/layouts/home.html called resources.GetRemote without wrapping it in try, so a non-200 response aborted the entire site build:

ERROR error building site: ... GetRemote: failed to fetch remote resource from
'https://api.github.com/.../releases/latest': Forbidden

Fix

Wrap the fetch in try and fall back to an empty release name (the changelog chip is simply omitted) with a warnf, mirroring the resilient handling already in docs/layouts/_partials/header/header.html.

Grepped every resources.GetRemote caller under docs/:

  • layouts/home.html — was unguarded → fixed here
  • layouts/_partials/header/header.html — already wrapped in try, no change
  • layouts/_markup/render-image.html — already wrapped in try, no change

home.html was the only caller that could fail the build.

Verification

Local build with the production config (hugo --minify --gc --config config/production/hugo.toml):

  • Normal fetch: builds clean, exit 0.
  • Simulated failure (temporarily pointed the URL at a non-existent endpoint): build emits WARN Release notes fetch returned no resource ... and completes with exit 0 instead of erroring. URL restored afterward.

🤖 Generated with Claude Code

home.html fetched the latest GitHub release via resources.GetRemote
without wrapping it in `try`, so an unauthenticated GitHub API rate-limit
response (403 Forbidden) on CI runners aborted the entire docs build.

Wrap the fetch in `try` and fall back to an empty release name (no
changelog chip) with a warnf, mirroring the existing resilient handling
in _partials/header/header.html. The other GetRemote callers
(header.html, _markup/render-image.html) already handle errors this way.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Maffooch
Maffooch requested a review from blakeaowens as a code owner August 18, 2026 04:13
@github-actions github-actions Bot added the docs label Aug 18, 2026
@Maffooch Maffooch added this to the 3.2.201 milestone Aug 18, 2026
@Maffooch
Maffooch added this pull request to the merge queue Aug 18, 2026
Any commits made after this event will not be merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants