Skip to content

Improve documentation build reliability, release caching, and fallback routing - #345

Merged
LordSimal merged 1 commit into
2.xfrom
improve/docs-build-reliability
Nov 29, 2026
Merged

LordSimal merged 1 commit into
2.xfrom
improve/docs-build-reliability

Conversation

@LordSimal

Copy link
Copy Markdown
Member

Summary

Documentation builds now fail clearly when source parsing or output writes fail, and reuse completed releases when their inputs are unchanged.

release manifest → Make targets + CakePHP version selectors
release build
  cache hit → restore complete output
  cache miss → checkout → dependencies → assets → generate → cache
  publish complete output with permissions nginx workers can read
  • Create missing output directories, support absolute paths, and reject failed or partial page writes.
  • Include the source filename and original syntax error in parser failures.
  • Centralize release versions, refs, and dependency modes in config/releases.php; derive all four CakePHP selectors from it.
  • Separate generator dependency installation into a Docker layer and retain source clones, Composer downloads, and completed releases in BuildKit caches. Cache keys include source commits and generator inputs; DOCS_CACHE_REFRESH forces dependency resolution.
  • Match the site-api proxy's internal /cakephp/<version>/... paths and redirect missing HTML pages to public overview URLs. Preserve query strings and asset 404s.
  • Add regression checks and document the build/cache workflow.

Evidence

  • Before: A missing output directory could produce warnings while the command returned success; parser failures omitted source filenames.
    After: Regression checks verify directory creation, absolute and relative paths, write failures, and parser filename/line diagnostics.
  • Before: Re-entering the build regenerated every release.
    After: A complete Docker build generated all 37 configured releases; a subsequent build restored all 37 from the release cache. Tests also cover source/template changes, explicit refresh, stale output removal, readable publication permissions, and retaining previous output after failure.
  • Production-image HTTP checks passed for existing pages, missing-page redirects, query strings, and missing assets. PHP CodeSniffer, ShellCheck, and the regression suite passed.

Merge Danger

Door: two-way

Revert the commit and redeploy to restore the previous build and routing behavior.

Blast Radius: documentation

Affects generation, Docker builds, and missing-page routing across all configured releases. BuildKit caches belong to the builder; fresh CI runners still perform full builds. Cached source dependency resolutions remain until source/generator inputs or DOCS_CACHE_REFRESH change.

Validate output directories and writes, preserve source filenames in parser errors, and share release metadata between builds and version selectors. Cache source clones and completed releases with BuildKit, publishing complete output with permissions nginx workers can read. Match site-api upstream paths while redirecting missing HTML pages to public overview URLs. Add regression checks for IO failures, parser diagnostics, release caching, and nginx routing.
@LordSimal
LordSimal merged commit 2b9c42d into 2.x Nov 29, 2026
2 checks passed
@LordSimal
LordSimal deleted the improve/docs-build-reliability branch November 29, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant