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

Fix version dropdown issue in version 3.5.1 of pyspark document #507

Closed
wants to merge 5 commits into from

Conversation

panbingkun
Copy link
Contributor

@panbingkun panbingkun commented Mar 5, 2024

The pr aims to fix version dropdown issue in version 3.5.1 of pyspark document, includes:

  1. master -> 3.5.1
  2. _static/versions.json -> https://spark.apache.org/static/versions.json
  3. move versions.json from docs/3.5.1/api/python/_static/versions.json to static/versions.json.
  4. add a new folder site/static to the entry keep_files in the configuration file _config.yml to prevent build failures.

@panbingkun
Copy link
Contributor Author

@panbingkun
Copy link
Contributor Author

panbingkun commented Mar 5, 2024

If need to remove this feature from the already released version 3.5.1, please let me know and I will do it.

@panbingkun
Copy link
Contributor Author

The file versions.json has been moved from the sub folder (eg: docs/3.5.1/api/python/_static/versions.json) of each version to static/versions.json, and the URL(eg: _static/versions.json) in all HTML published in 3.5.1 has been updated.
image

@panbingkun
Copy link
Contributor Author

image

@panbingkun panbingkun changed the title Update the versions.json file for the already released spark version Fix version dropdown issue in version 3.5.1 of pyspark document Mar 5, 2024
@panbingkun
Copy link
Contributor Author

Let me check the reason for the build failure and wait a moment.

@panbingkun
Copy link
Contributor Author

Double-check as follows:
image

image

@panbingkun
Copy link
Contributor Author

Let me check the reason for the build failure and wait a moment.

Done. The issue of build failure has been resolved.

@HyukjinKwon
Copy link
Member

Merged to asf-site.

@panbingkun
Copy link
Contributor Author

At present, it has been restored to its correct state.
https://spark.apache.org/docs/3.5.1/api/python/index.html
image

@HeartSaVioR
Copy link
Contributor

@panbingkun
Nice, thanks for the work! Followup question.

The version showing as master is confusing. when the version has constructed and which information it will refer to? I built the doc with v3.5.1 tag and the version is shown as master.

Could you please give a try with tagging 3.5.2 from branch-3.5 in your fork repository and build the doc to confirm it won't show up as master?

@panbingkun
Copy link
Contributor Author

panbingkun commented Mar 8, 2024

@panbingkun Nice, thanks for the work! Followup question.

The version showing as master is confusing. when the version has constructed and which information it will refer to? I built the doc with v3.5.1 tag and the version is shown as master.

Could you please give a try with tagging 3.5.2 from branch-3.5 in your fork repository and build the doc to confirm it won't show up as master?

Sure, let me check it!

Additional remarks:
In the configuration file python/docs/source/conf.py used to build the pyspark document, there is a local environment variable RELEASE_VERSION`, as follows:
https://github.com/apache/spark/blob/9cac2bb608c65f7fec19927711aff6dd1c54005a/python/docs/source/conf.py#L136-L138
image

When build the pyspark document, it needs to be set first, because the logic of the drop-down box is as follows:
https://github.com/apache/spark/blob/9cac2bb608c65f7fec19927711aff6dd1c54005a/python/docs/source/_templates/version-switcher.html#L20
image

@panbingkun
Copy link
Contributor Author

The verification steps are as follows:

  • export RELEASE_VERSION=3.5.2
  • git checkout branch-3.5
  • git tag v3.5.2
  • cd python/docs
  • make clean html
  • Check the content of the generated html file, such as:
    image

@panbingkun
Copy link
Contributor Author

@HeartSaVioR
In addition, I have submitted a PR regarding Use the same versions.json in the dropdown of different versions of PySpark documents: apache/spark#45400
In order to ensure the correctness of the dropdown data, we should merge this PR before the next version release.

@panbingkun
Copy link
Contributor Author

panbingkun commented Mar 8, 2024

view-source:https://spark.apache.org/docs/3.5.1/api/python/index.html
image

Not related to this PR, in addition, I found a flaw in our online 3.5.1 pyspark documentation, which is also likely caused by the unset the local environment variable RELEASE_VERSION . If it needs to be fixed, I am also very happy to use tools to fix it.

@HeartSaVioR
Copy link
Contributor

@panbingkun
Sorry to visit this too lately. Definitely we need to fix the version in 3.5.1. It'd be awesome if you could submit a PR for the fix. Thanks!

@HeartSaVioR
Copy link
Contributor

Also, will the json file be updated automatically, or is release manager expected to manually add the entry? If it's latter, we'll need to update the release process page in Spark website.

@panbingkun
Copy link
Contributor Author

Sorry to visit this too lately. Definitely we need to fix the version in 3.5.1. It'd be awesome if you could submit a PR for the fix. Thanks!

Sure, let me do it.

@panbingkun
Copy link
Contributor Author

Also, will the json file be updated automatically, or is release manager expected to manually add the entry? If it's latter, we'll need to update the release process page in Spark website.

Currently, it needs to be manually updated. Let me update the release process page in Spark website, and then I will think of a way to automate it. 😄

HyukjinKwon pushed a commit that referenced this pull request Jul 30, 2024
The pr aims to fix `title` for spark `3.5.1` PySpark doc.

As discussed by another PR:
#507 (comment)

Author: panbingkun <[email protected]>

Closes #514 from panbingkun/update_3.5.1_master.
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.

3 participants