This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 79026ad70380 [SPARK-50588][BUILD] `build-docs` skips building R docs 
on host when `SKIP_RDOC=1`
79026ad70380 is described below

commit 79026ad70380d6e92503ea27b1f61f484c63dc8b
Author: Cheng Pan <[email protected]>
AuthorDate: Tue Dec 17 17:31:10 2024 +0900

    [SPARK-50588][BUILD] `build-docs` skips building R docs on host when 
`SKIP_RDOC=1`
    
    ### What changes were proposed in this pull request?
    
    `build-docs` skips calling `bundle` command when `SKIP_RDOC=1`, so that 
devs do not need to install `bundle` on the host.
    
    ### Why are the changes needed?
    
    Skip unnecessary steps when `SKIP_RDOC=1`
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manually test.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #49200 from pan3793/SPARK-50588.
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 dev/spark-test-image-util/docs/build-docs | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/dev/spark-test-image-util/docs/build-docs 
b/dev/spark-test-image-util/docs/build-docs
index 6ff9c7cd9455..ca59769f2423 100755
--- a/dev/spark-test-image-util/docs/build-docs
+++ b/dev/spark-test-image-util/docs/build-docs
@@ -49,20 +49,22 @@ docker run \
   --interactive --tty "${IMG_URL}" \
   /bin/bash -c "sh ${BUILD_DOCS_SCRIPT_PATH}"
 
-# 4.Build docs on host: `r doc`.
-#
-# Why does `r` document need to be compiled outside the container?
-# Because when compiling inside the container, the permission of the directory
-# `/__w/spark/spark/R/pkg/docs` automatically generated by `RScript` is 
`dr-xr--r-x`,
-# and when writing to subsequent files, will throw an error as:
-# `! [EACCES] Failed to copy 
'/usr/local/lib/R/site-library/pkgdown/BS5/assets/katex-auto.js'
-# to '/__w/spark/spark/R/pkg/docs/katex-auto.js': permission denied`
-export SKIP_ERRORDOC=1
-export SKIP_SCALADOC=1
-export SKIP_PYTHONDOC=1
-export SKIP_SQLDOC=1
-cd docs
-bundle exec jekyll build
+if [[ "$SKIP_RDOC" != "1" ]]; then
+  # 4.Build docs on host: `r doc`.
+  #
+  # Why does `r` document need to be compiled outside the container?
+  # Because when compiling inside the container, the permission of the 
directory
+  # `/__w/spark/spark/R/pkg/docs` automatically generated by `RScript` is 
`dr-xr--r-x`,
+  # and when writing to subsequent files, will throw an error as:
+  # `! [EACCES] Failed to copy 
'/usr/local/lib/R/site-library/pkgdown/BS5/assets/katex-auto.js'
+  # to '/__w/spark/spark/R/pkg/docs/katex-auto.js': permission denied`
+  export SKIP_ERRORDOC=1
+  export SKIP_SCALADOC=1
+  export SKIP_PYTHONDOC=1
+  export SKIP_SQLDOC=1
+  cd docs
+  bundle exec jekyll build
+fi
 
 # 5.Remove container image.
 IMG_ID=$(docker images | grep "${IMG_TAG}" | awk '{print $3}')


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to