From 99fb443b5f93a202dd776888410d8bf053428fa2 Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Mon, 8 Jan 2024 09:58:17 -0500 Subject: [PATCH 1/6] build docs first with SKIP_API --- .github/workflows/build_and_test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 56b34d6c5e7b6..84b4659faf275 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -761,6 +761,9 @@ jobs: run: ./dev/lint-r - name: Run documentation build run: | + # Build docs first with SKIP_API to ensure they are valid without requiring any + # language docs to be built beforehand. + SKIP_API=1 bundle exec jekyll build if [ -f "./dev/is-changed.py" ]; then # Skip PySpark and SparkR docs while keeping Scala/Java/SQL docs pyspark_modules=`cd dev && python3.9 -c "import sparktestsupport.modules as m; print(','.join(m.name for m in m.all_modules if m.name.startswith('pyspark')))"` From 1fa62c54d67cbf38dc59a8f81d974d585dfd91f4 Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Mon, 8 Jan 2024 09:58:28 -0500 Subject: [PATCH 2/6] try to get docs build to fail --- docs/sql-ref-functions-builtin.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/sql-ref-functions-builtin.md b/docs/sql-ref-functions-builtin.md index 0ff1432fabf8e..ebb0abd07f4f2 100644 --- a/docs/sql-ref-functions-builtin.md +++ b/docs/sql-ref-functions-builtin.md @@ -17,15 +17,10 @@ license: | limitations under the License. --- -{% for static_file in site.static_files %} - {% if static_file.name == 'generated-agg-funcs-table.html' %} ### Aggregate Functions {% include_relative generated-agg-funcs-table.html %} #### Examples {% include_relative generated-agg-funcs-examples.html %} - {% break %} - {% endif %} -{% endfor %} {% for static_file in site.static_files %} {% if static_file.name == 'generated-window-funcs-table.html' %} From bd2e46e4127007779252be943acd9a734056ed80 Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Mon, 8 Jan 2024 10:26:02 -0500 Subject: [PATCH 3/6] Trigger Build From 4b87d5ab007f24f39df71c7544916677b5abaaad Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Mon, 8 Jan 2024 11:49:42 -0500 Subject: [PATCH 4/6] make sure we are in docs dir --- .github/workflows/build_and_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 84b4659faf275..002965d7dd3fe 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -763,7 +763,9 @@ jobs: run: | # Build docs first with SKIP_API to ensure they are valid without requiring any # language docs to be built beforehand. + pushd docs SKIP_API=1 bundle exec jekyll build + popd if [ -f "./dev/is-changed.py" ]; then # Skip PySpark and SparkR docs while keeping Scala/Java/SQL docs pyspark_modules=`cd dev && python3.9 -c "import sparktestsupport.modules as m; print(','.join(m.name for m in m.all_modules if m.name.startswith('pyspark')))"` From 8042abc35e3f0ebd2fed23917bc399eb9f2627ce Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Mon, 8 Jan 2024 12:22:05 -0500 Subject: [PATCH 5/6] the containers don't have pushd and popd --- .github/workflows/build_and_test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 002965d7dd3fe..00aacfa1b5629 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -761,11 +761,9 @@ jobs: run: ./dev/lint-r - name: Run documentation build run: | - # Build docs first with SKIP_API to ensure they are valid without requiring any + # Build docs first with SKIP_API to ensure they are buildable without requiring any # language docs to be built beforehand. - pushd docs - SKIP_API=1 bundle exec jekyll build - popd + cd docs; SKIP_API=1 bundle exec jekyll build; cd .. if [ -f "./dev/is-changed.py" ]; then # Skip PySpark and SparkR docs while keeping Scala/Java/SQL docs pyspark_modules=`cd dev && python3.9 -c "import sparktestsupport.modules as m; print(','.join(m.name for m in m.all_modules if m.name.startswith('pyspark')))"` From 93b6f210d9692ac78302ed1836d1227ed08cb225 Mon Sep 17 00:00:00 2001 From: Nicholas Chammas Date: Mon, 8 Jan 2024 12:56:50 -0500 Subject: [PATCH 6/6] unbreak docs build --- docs/sql-ref-functions-builtin.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/sql-ref-functions-builtin.md b/docs/sql-ref-functions-builtin.md index ebb0abd07f4f2..0ff1432fabf8e 100644 --- a/docs/sql-ref-functions-builtin.md +++ b/docs/sql-ref-functions-builtin.md @@ -17,10 +17,15 @@ license: | limitations under the License. --- +{% for static_file in site.static_files %} + {% if static_file.name == 'generated-agg-funcs-table.html' %} ### Aggregate Functions {% include_relative generated-agg-funcs-table.html %} #### Examples {% include_relative generated-agg-funcs-examples.html %} + {% break %} + {% endif %} +{% endfor %} {% for static_file in site.static_files %} {% if static_file.name == 'generated-window-funcs-table.html' %}