Skip to content
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-41356: [Release][Docs] Update post release documentation task to remove the warnings banner for stable version #41377

Merged

Conversation

AlenkaF
Copy link
Member

@AlenkaF AlenkaF commented Apr 25, 2024

Rationale for this change

With every release dev documentation is moved to docs/ and becomes stable version of the documentation but the version warnings banner is still present.

What changes are included in this PR?

This PR removes the banner before the dev docs are copied to the docs/ folder.

Are these changes tested?

Not yet.

Are there any user-facing changes?

No.

Copy link

⚠️ GitHub issue #41356 has been automatically assigned in GitHub to PR creator.

@AlenkaF
Copy link
Member Author

AlenkaF commented Apr 25, 2024

@raulcd does this change look right to you?

@github-actions github-actions bot added the awaiting review Awaiting review label Apr 25, 2024
Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

We remove the docs/dev after your change. We have to do it after downloading the released docs and untaring them: https://github.com/apache/arrow/pull/41377/files#diff-535139724676f61628dca079f68b46f72abe826a19e40934c826f66315f25505L80
We have to do it inside docs/ and avoid the older versions.
We don't use the dev docs at this point because they could contain features on main that are not released. We download the docs.tar.gz that were built on release.

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Apr 26, 2024
@AlenkaF
Copy link
Member Author

AlenkaF commented Apr 26, 2024

Aha got it! Thank you @raulcd, will correct.

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels May 7, 2024
@AlenkaF AlenkaF force-pushed the gh-41356-post-release-stable-remove-warnings branch from 9b91b9e to cf2c4b4 Compare May 7, 2024 08:16
@AlenkaF AlenkaF marked this pull request as ready for review May 7, 2024 08:33
@AlenkaF
Copy link
Member Author

AlenkaF commented May 7, 2024

Can't test this change on my M1. Hope you can help @raulcd, when you have time.

@kou
Copy link
Member

kou commented May 7, 2024

How about creating a temporary directory for the substitution instead of specifying target paths (c_glib, cpp, ...) explicitly?

diff --git a/dev/release/post-08-docs.sh b/dev/release/post-08-docs.sh
index 8050a74a8c..fd5debb760 100755
--- a/dev/release/post-08-docs.sh
+++ b/dev/release/post-08-docs.sh
@@ -72,25 +72,18 @@ fi
 # delete current stable docs and restore all previous versioned docs
 rm -rf docs/*
 git checkout "${versioned_paths[@]}"
+
+rm -rf docs_new
+mkdir docs_new
+pushd docs_new
 curl \
   --fail \
   --location \
   --remote-name \
   https://apache.jfrog.io/artifactory/arrow/docs/${version}/docs.tar.gz
 tar xvf docs.tar.gz
-rm -f docs.tar.gz
-
 # Update DOCUMENTATION_OPTIONS.show_version_warning_banner for stable docs
-pushd docs
-find ./ \
-  -maxdepth 1 \
-  -type f \
-  -exec \
-    sed -i.bak \
-      -e "s/DOCUMENTATION_OPTIONS.show_version_warning_banner = true/DOCUMENTATION_OPTIONS.show_version_warning_banner = false/g" \
-      {} \;
-find ./ -name '*.bak' -delete
-find /c_glib /cpp /developers /format /java /python  \
+find docs \
   -type f \
   -exec \
     sed -i.bak \
@@ -98,8 +91,8 @@ find /c_glib /cpp /developers /format /java /python  \
       {} \;
 find ./ -name '*.bak' -delete
 popd
-git add docs
-git commit -m "[Website] Update warning banner for stable docs"
+mv docs_new/docs/* docs/
+rm -rf docs_new
 
 if [ "$is_major_release" = "yes" ] ; then
   previous_series=${previous_version%.*}

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks @AlenkaF

dev/release/post-08-docs.sh Outdated Show resolved Hide resolved
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels May 8, 2024
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

@kou kou merged commit f6127a6 into apache:main May 9, 2024
6 checks passed
@kou kou removed the awaiting merge Awaiting merge label May 9, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label May 9, 2024
Copy link

After merging your PR, Conbench analyzed the 0 benchmarking runs that have been run so far on merge-commit f6127a6.

None of the specified runs were found on the Conbench server.

The full Conbench report has more details.

vibhatha pushed a commit to vibhatha/arrow that referenced this pull request May 25, 2024
…k to remove the warnings banner for stable version (apache#41377)

### Rationale for this change

With every release dev documentation is moved to `docs/` and becomes stable version of the documentation but the  version warnings banner is still present.

### What changes are included in this PR?

This PR removes the banner before the dev docs are copied to the `docs/` folder.

### Are these changes tested?

Not yet.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#41356

Lead-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting merge Awaiting merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants