-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-41430: [Docs] Use sphinxcontrib-mermaid instead of generating images from .mmd #41455
Conversation
|
ac3dd7a
to
64874ee
Compare
e938b60
to
7378031
Compare
@github-actions crossbow submit preview-docs |
This comment was marked as outdated.
This comment was marked as outdated.
f94eb24
to
a9457bf
Compare
@github-actions crossbow submit preview-docs |
This comment was marked as outdated.
This comment was marked as outdated.
1b40397
to
f6081c6
Compare
ci/docker/linux-apt-docs.dockerfile
Outdated
wget && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
rm -rf /var/lib/apt/lists/* && \ | ||
npm install -g yarn @mermaid-js/mermaid-cli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be setting
ENV CHROME_BIN="/usr/bin/chromium" \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
before we install mermaid-cli so that puppeteer doesn't download its own chromium binary, changing CHROME_BIN
's value to wherever Debian installs it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info!
It seems that CHROME_BIN
is needless. We need PUPPETEER_EXECUTABLE_PATH
instead.
@github-actions crossbow submit preview-docs |
Revision: 6cfc130 Submitted crossbow builds: ursacomputing/crossbow @ actions-d1fc246446
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'll merge this in a few days if nobody objects this. |
After merging your PR, Conbench analyzed the 0 benchmarking runs that have been run so far on merge-commit 46e7816. None of the specified runs were found on the Conbench server. The full Conbench report has more details. |
### Rationale for this change Broken benchmarks after #41455 ### What changes are included in this PR? Use /tmp/arrow as build dir. ### Are these changes tested? ### Are there any user-facing changes? * GitHub Issue: #41630 Authored-by: Jacob Wujciak-Jens <[email protected]> Signed-off-by: Jacob Wujciak-Jens <[email protected]>
@@ -584,6 +587,9 @@ | |||
# | |||
# texinfo_no_detailmenu = False | |||
|
|||
# -- Options for mermaid output ------------------------------------------- | |||
|
|||
mermaid_output_format = 'svg' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we are setting this here, instead of letting it generate the svg image live through the js mermaid script? (the default setting)
That would avoid requiring mermaid-cli for building the docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zeroshade Why did you choose svg
here? I just used your code here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, it would require us to actually pull down and statically add the mermaid js script to our resulting documentation output, which also ended up interfering with the anchor links on the right side based on headings. The "zoom" and other features that mermaid-js provides ended up causing issues so it was better for us to pre-generate the images during building the docs and include those images rather than rely on manually including and picking a version of mermaid-js to add to our static files.
from the sphixcontrib-mermaid docs:
The version of mermaid that will be used to parse raw output in HTML files. This should match a version available on https://unpkg.com/browse/mermaid/. The default is "10.2.0". If you need a newer version, you'll need to add the custom initialization. See below.
If it's set to "", the lib won't be automatically included from the CDN service and you'll need to add it as a local file in html_js_files.
…d change) (#513) The doc build was changed in apache/arrow#41455, we need a change here accordingly to ensure to keep updating the dev docs from that crossbow build.
…g images from .mmd (apache#41455) ### Rationale for this change This is for easy to maintain. ### What changes are included in this PR? * Install sphinxcontrib-mermaid * Install Chromium to generate SVG from .mmd * Use Debian instead of Ubuntu for building docs because Ubuntu provides Chromium only via snap * Use a normal user not root to build documents because Mermaid require additional `--no-sandbox` argument when we use root ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: apache#41430 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
…pache#41631) ### Rationale for this change Broken benchmarks after apache#41455 ### What changes are included in this PR? Use /tmp/arrow as build dir. ### Are these changes tested? ### Are there any user-facing changes? * GitHub Issue: apache#41630 Authored-by: Jacob Wujciak-Jens <[email protected]> Signed-off-by: Jacob Wujciak-Jens <[email protected]>
…pache#41631) ### Rationale for this change Broken benchmarks after apache#41455 ### What changes are included in this PR? Use /tmp/arrow as build dir. ### Are these changes tested? ### Are there any user-facing changes? * GitHub Issue: apache#41630 Authored-by: Jacob Wujciak-Jens <[email protected]> Signed-off-by: Jacob Wujciak-Jens <[email protected]>
### Rationale for this change This is a follow-up of GH-41455. ### What changes are included in this PR? Add missing build directory argument. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #41920 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
Rationale for this change
This is for easy to maintain.
What changes are included in this PR?
--no-sandbox
argument when we use rootAre these changes tested?
Yes.
Are there any user-facing changes?
No.