Skip to content

Fix image path check: anchor to book output dir not chapter dir#3333

Merged
Mpdreamz merged 7 commits intomasterfrom
fix/image-copy-output-root
May 4, 2026
Merged

Fix image path check: anchor to book output dir not chapter dir#3333
Mpdreamz merged 7 commits intomasterfrom
fix/image-copy-output-root

Conversation

@Mpdreamz
Copy link
Copy Markdown
Member

@Mpdreamz Mpdreamz commented May 4, 2026

Anchors the image destination check to outdir (the book-level output directory, e.g. html/en/kibana/8.19/) rather than to_dir (the chapter subdirectory). This allows legitimate ../sibling/ image references within a book while still preventing images from escaping the book output root. Also adds outdir to build_single for consistency with build_chunked.

@Mpdreamz Mpdreamz requested a review from a team as a code owner May 4, 2026 13:00
@Mpdreamz Mpdreamz requested a review from reakaleek May 4, 2026 13:00
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

Mpdreamz and others added 4 commits May 4, 2026 16:12
The docs-build-pr pipeline has a branch filter in Buildkite that only
allows master. All other repos in job 0 use always_trigger_branch:master
so they always build against master and pass the filter. The standalone
elastic/docs job (job 1) has no always_trigger_branch, so the pr-bot
triggers against the PR's feature branch which the pipeline filter
silently rejects.

Previously builds appeared to work because the doc-preview GitHub Actions
workflow posts a comment containing the text "run docs-build", which
accidentally matched the old unanchored trigger_comment_regex. Tightening
the regex with ^ and $ anchors (#3327) inadvertently removed that
accidental trigger.

Setting ignore_pipeline_branch_filters: true tells the Buildkite API to
bypass the pipeline's branch filter, allowing build_on_commit and comment
triggers to work as intended per the buildkite-pr-bot design.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Mpdreamz Mpdreamz force-pushed the fix/image-copy-output-root branch from 88077aa to b48b093 Compare May 4, 2026 14:13
@Mpdreamz Mpdreamz enabled auto-merge (squash) May 4, 2026 18:53
Copy link
Copy Markdown
Member

@shainaraskas shainaraskas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve this 😎

@Mpdreamz Mpdreamz merged commit 006bafa into master May 4, 2026
3 checks passed
@Mpdreamz Mpdreamz deleted the fix/image-copy-output-root branch May 4, 2026 19:52
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.

2 participants