-
Notifications
You must be signed in to change notification settings - Fork 14.6k
MINOR: Add a command to make site-docs and Javadocs updates easier on version release #20478
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
base: trunk
Are you sure you want to change the base?
Conversation
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 initiative! I left a few suggestions
# Find the site-docs archive | ||
site_docs_archive = None | ||
for file in os.listdir(artifacts_dir): | ||
if file.endswith('-site-docs.tgz'): |
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.
This is a bit optimistic you can have -site-docs.tgz
files for multiple versions. Can we guess the version like command_release_announcement_email()
does?
Assumes the Kafka website repo is on the same level as the Kafka repo and is named kafka-site. | ||
|
||
Args: | ||
dry_run (bool): If True, only prints what would happen without making changes |
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.
Since this is only touching local files, do we really need the dry_run
argument?
cwd=versioned_docs_path | ||
) | ||
|
||
# Copy JavaDocs |
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.
Ideally this could run ./gradlew aggregatedJavadoc
too
1. cd {kafka_site_path} | ||
2. git add {docs_version(project_version)} | ||
3. git commit -m "Add documentation for version {release_version}" | ||
4. git push origin master |
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.
Pushing to a branch instead of master is probably best
The Kafka website is hosted in a separate repository than the Kafka
code. The files versioned in the kafka-site repository are generated as
part of the version release process and then copied over. Today, this is
a manual process detailed in
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34840886#ReleaseProcess-Websiteupdateprocess
This PR aims to simplify the manual steps by adding a sub-command to the
release.py script. The command uses the javadocs and *-site-docs.tgz in
the .release_work_dir and copies them over to the kafka-site repository.
There is a rudimentary dry-run sub-sub-command which can be used for
path-checking.
The addition to the script makes the assumption that the kafka-site
repository is on the same level as the kafka repository on a user's
machine. In the suggestion for subsequent commands it makes the further
assumption that the branch used in the kafka-site repository is
asf-site.
There are many things which we can improve about the overall script and
this addition in particular, but it is a start 😊.
I have tested this manually as part of the 4.0.1 release process and
cross-checked with the manual changes I did in
apache/kafka-site#718 and
apache/kafka-site#719