Skip to content

Set HOME=/tmp in Antora image so chromium crashpad can launch#534

Merged
michalharakal merged 1 commit intodevelopfrom
fix/docs-mermaid-crashpad-home
Apr 19, 2026
Merged

Set HOME=/tmp in Antora image so chromium crashpad can launch#534
michalharakal merged 1 commit intodevelopfrom
fix/docs-mermaid-crashpad-home

Conversation

@michalharakal
Copy link
Copy Markdown
Contributor

Summary

  • Mermaid blocks were rendering as the error literal in the Docs workflow (example run) with chrome_crashpad_handler: --database is requiredFailed to launch the browser process.
  • Root cause: the workflow runs the Antora container with --user $(id -u):$(id -g), which has no passwd entry inside the Alpine image. $HOME falls back to / (read-only for non-root), so chromium's crashpad handler cannot create its default DB.
  • Fix: pin HOME=/tmp in the image, plus clean up the mode-0700 root-owned dirs that the build-time smoke test drops into /tmp (otherwise the runtime non-root user EACCES on cosmiconfig walking /tmp/.config/puppeteer). Same root cause is already worked around for Antora's cache via runtime.cache_dir in antora-playbook.yml.

Test plan

  • Rebuild image locally with --no-cache
  • Run mmdc against the failing flowchart LR snippet under --user $(id -u):$(id -g) → produces a valid SVG (10.5 KB) instead of the crashpad error
  • Docs workflow on this PR completes the Antora build with mermaid diagrams rendered inline (no mermaid-error literals)

🤖 Generated with Claude Code

The docs workflow runs the container with `--user $(id -u):$(id -g)`,
which has no passwd entry inside the Alpine image. $HOME falls back to
`/`, which is read-only for non-root, and chromium's crashpad handler
aborts with `chrome_crashpad_handler: --database is required` —
surfacing as "Failed to launch the browser process" from puppeteer and
making every mermaid block render as the error literal.

Pin HOME=/tmp in the image so the crashpad DB has a writable parent.
Same root cause already worked around for Antora's cache via
runtime.cache_dir in antora-playbook.yml.

Also clean up the mode-0700 root-owned dirs that puppeteer/chromium
drop into /tmp during the build-time smoke test — otherwise the
runtime non-root user EACCES on cosmiconfig walking
/tmp/.config/puppeteer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-534 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

@michalharakal michalharakal merged commit d484a47 into develop Apr 19, 2026
8 checks passed
@michalharakal michalharakal deleted the fix/docs-mermaid-crashpad-home branch April 19, 2026 19:31
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