[SPARK-58136][INFRA] Automate downloads.md and versions.json updates in the release script#57269
Closed
HyukjinKwon wants to merge 1 commit into
Closed
Conversation
…in the release script ### What changes were proposed in this pull request? This PR adds a step to the `finalize` phase of `dev/create-release/release-build.sh` that updates two spark-website source files that were previously edited by hand: - `downloads.md`: bump the Maven coordinate example (`version:`) to the latest stable release. - `site/static/versions.json`: add an entry for the new release, keeping the list sorted in descending version order. `site/downloads.html` is intentionally not edited here because it is regenerated from `downloads.md` by the existing `bundle exec jekyll build` step. ### Why are the changes needed? The release automation already updates most of the spark-website (documentation.md, js/downloads.js, news post, release notes, docs, symlinks), but it did not touch `downloads.md` or `site/static/versions.json`. As a result the release manager had to create these edits manually, e.g. apache/spark-website#701. ### Does this PR introduce _any_ user-facing change? No. This only affects the release tooling. ### How was this patch tested? Extracted the new block from the script and ran it locally against realistic spark-website fixtures across many scenarios: - Feature release (newest) updates both files and reproduces the manual PR apache#701 diff. - Preview releases (`-preview1`, `-preview2`) skip both files, matching the sibling steps. - Old-branch maintenance releases insert into the correct sorted slot in versions.json and never downgrade the downloads.md coordinate. - `downloads.md` is only bumped when the release is strictly newer than what is shown. - `versions.json` keeps every patch entry and is idempotent / dedup-safe on re-runs. - Output remains valid JSON with the existing `indent=4` formatting and trailing newline. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) Co-authored-by: Isaac
cloud-fan
approved these changes
Jul 15, 2026
cloud-fan
left a comment
Contributor
There was a problem hiding this comment.
0 blocking, 0 non-blocking, 0 nits.
Clean, self-consistent INFRA change that folds the manual spark-website#701 edits into the release script. Recommend approval.
No findings.
Verification
I verified the two transformations and the build ordering empirically against a fresh asf-site clone:
- downloads.md — the
version:coordinate bumps only when the release is strictly newer than what's shown (feature/major-bump releases update; older-branch maintenance and same-version runs leave it unchanged / are idempotent), and the trailing newline is preserved by the(\s*)$capture group. - site/static/versions.json — the upsert inserts at the correct descending-sorted slot, dedups any prior same-version entry (idempotent on re-runs), and re-serializes byte-identically to the current file (no spurious whitespace/key-order diff on untouched entries).
- Ordering / clobber-safety —
_config.ymlsetsdestination: sitewithkeep_files: ['docs','static',...], sosite/static/versions.json(understatic, no source counterpart) survives the step-6jekyll build;downloads.mdis a jekyll source whosedownloads.htmloutput is regenerated at step 6, which runs after this edit and before the sharedgit add . && git commit && git push. So omitting thesite/downloads.htmledit (which #701 did by hand) is correct. - Consistency — the new step mirrors its sibling metadata steps (shared
-previewguard, per-heredocvercmp, don't-downgrade, idempotency), and the step renumbering (1..7) is contiguous with no stale references.
HyukjinKwon
added a commit
that referenced
this pull request
Jul 15, 2026
…in the release script ### What changes were proposed in this pull request? This PR adds a step to the `finalize` phase of `dev/create-release/release-build.sh` that updates two spark-website source files that were previously edited by hand: - `downloads.md`: bump the Maven coordinate example (`version:`) to the latest stable release. - `site/static/versions.json`: add an entry for the new release, keeping the list sorted in descending version order. `site/downloads.html` is intentionally not edited here because it is regenerated from `downloads.md` by the existing `bundle exec jekyll build` step. Both updates are guarded by the same `-preview` check used by the neighboring steps, so preview releases are not affected. ### Why are the changes needed? The release automation already updates most of the spark-website (`documentation.md`, `js/downloads.js`, the news post, the JIRA release notes, the docs, and the `latest` symlink), but it did not touch `downloads.md` or `site/static/versions.json`. As a result the release manager had to create these edits manually, e.g. apache/spark-website#701. ### Does this PR introduce _any_ user-facing change? No. This only affects the release tooling. ### How was this patch tested? Extracted the new block from the script and ran it locally against realistic spark-website fixtures across many scenarios: - Feature release (newest) updates both files and reproduces the manual [spark-website#701](apache/spark-website#701) diff. - Preview releases (`-preview1`, `-preview2`) skip both files, matching the sibling steps. - Old-branch maintenance releases insert into the correct sorted slot in `versions.json` and never downgrade the `downloads.md` coordinate. - `downloads.md` is only bumped when the release is strictly newer than what is shown. - `versions.json` keeps every patch entry and is idempotent / dedup-safe on re-runs. - Output remains valid JSON with the existing `indent=4` formatting and trailing newline. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) Closes #57269 from HyukjinKwon/SPARK-58136-automate-website-updates. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com> (cherry picked from commit 74ea5d0) Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com>
HyukjinKwon
added a commit
that referenced
this pull request
Jul 15, 2026
…in the release script ### What changes were proposed in this pull request? This PR adds a step to the `finalize` phase of `dev/create-release/release-build.sh` that updates two spark-website source files that were previously edited by hand: - `downloads.md`: bump the Maven coordinate example (`version:`) to the latest stable release. - `site/static/versions.json`: add an entry for the new release, keeping the list sorted in descending version order. `site/downloads.html` is intentionally not edited here because it is regenerated from `downloads.md` by the existing `bundle exec jekyll build` step. Both updates are guarded by the same `-preview` check used by the neighboring steps, so preview releases are not affected. ### Why are the changes needed? The release automation already updates most of the spark-website (`documentation.md`, `js/downloads.js`, the news post, the JIRA release notes, the docs, and the `latest` symlink), but it did not touch `downloads.md` or `site/static/versions.json`. As a result the release manager had to create these edits manually, e.g. apache/spark-website#701. ### Does this PR introduce _any_ user-facing change? No. This only affects the release tooling. ### How was this patch tested? Extracted the new block from the script and ran it locally against realistic spark-website fixtures across many scenarios: - Feature release (newest) updates both files and reproduces the manual [spark-website#701](apache/spark-website#701) diff. - Preview releases (`-preview1`, `-preview2`) skip both files, matching the sibling steps. - Old-branch maintenance releases insert into the correct sorted slot in `versions.json` and never downgrade the `downloads.md` coordinate. - `downloads.md` is only bumped when the release is strictly newer than what is shown. - `versions.json` keeps every patch entry and is idempotent / dedup-safe on re-runs. - Output remains valid JSON with the existing `indent=4` formatting and trailing newline. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) Closes #57269 from HyukjinKwon/SPARK-58136-automate-website-updates. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com> (cherry picked from commit 74ea5d0) Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com>
HyukjinKwon
added a commit
that referenced
this pull request
Jul 15, 2026
…in the release script ### What changes were proposed in this pull request? This PR adds a step to the `finalize` phase of `dev/create-release/release-build.sh` that updates two spark-website source files that were previously edited by hand: - `downloads.md`: bump the Maven coordinate example (`version:`) to the latest stable release. - `site/static/versions.json`: add an entry for the new release, keeping the list sorted in descending version order. `site/downloads.html` is intentionally not edited here because it is regenerated from `downloads.md` by the existing `bundle exec jekyll build` step. Both updates are guarded by the same `-preview` check used by the neighboring steps, so preview releases are not affected. ### Why are the changes needed? The release automation already updates most of the spark-website (`documentation.md`, `js/downloads.js`, the news post, the JIRA release notes, the docs, and the `latest` symlink), but it did not touch `downloads.md` or `site/static/versions.json`. As a result the release manager had to create these edits manually, e.g. apache/spark-website#701. ### Does this PR introduce _any_ user-facing change? No. This only affects the release tooling. ### How was this patch tested? Extracted the new block from the script and ran it locally against realistic spark-website fixtures across many scenarios: - Feature release (newest) updates both files and reproduces the manual [spark-website#701](apache/spark-website#701) diff. - Preview releases (`-preview1`, `-preview2`) skip both files, matching the sibling steps. - Old-branch maintenance releases insert into the correct sorted slot in `versions.json` and never downgrade the `downloads.md` coordinate. - `downloads.md` is only bumped when the release is strictly newer than what is shown. - `versions.json` keeps every patch entry and is idempotent / dedup-safe on re-runs. - Output remains valid JSON with the existing `indent=4` formatting and trailing newline. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) Closes #57269 from HyukjinKwon/SPARK-58136-automate-website-updates. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com> (cherry picked from commit 74ea5d0) Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com>
HyukjinKwon
added a commit
that referenced
this pull request
Jul 15, 2026
…in the release script ### What changes were proposed in this pull request? This PR adds a step to the `finalize` phase of `dev/create-release/release-build.sh` that updates two spark-website source files that were previously edited by hand: - `downloads.md`: bump the Maven coordinate example (`version:`) to the latest stable release. - `site/static/versions.json`: add an entry for the new release, keeping the list sorted in descending version order. `site/downloads.html` is intentionally not edited here because it is regenerated from `downloads.md` by the existing `bundle exec jekyll build` step. Both updates are guarded by the same `-preview` check used by the neighboring steps, so preview releases are not affected. ### Why are the changes needed? The release automation already updates most of the spark-website (`documentation.md`, `js/downloads.js`, the news post, the JIRA release notes, the docs, and the `latest` symlink), but it did not touch `downloads.md` or `site/static/versions.json`. As a result the release manager had to create these edits manually, e.g. apache/spark-website#701. ### Does this PR introduce _any_ user-facing change? No. This only affects the release tooling. ### How was this patch tested? Extracted the new block from the script and ran it locally against realistic spark-website fixtures across many scenarios: - Feature release (newest) updates both files and reproduces the manual [spark-website#701](apache/spark-website#701) diff. - Preview releases (`-preview1`, `-preview2`) skip both files, matching the sibling steps. - Old-branch maintenance releases insert into the correct sorted slot in `versions.json` and never downgrade the `downloads.md` coordinate. - `downloads.md` is only bumped when the release is strictly newer than what is shown. - `versions.json` keeps every patch entry and is idempotent / dedup-safe on re-runs. - Output remains valid JSON with the existing `indent=4` formatting and trailing newline. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) Closes #57269 from HyukjinKwon/SPARK-58136-automate-website-updates. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com> (cherry picked from commit 74ea5d0) Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com>
HyukjinKwon
added a commit
that referenced
this pull request
Jul 15, 2026
…in the release script ### What changes were proposed in this pull request? This PR adds a step to the `finalize` phase of `dev/create-release/release-build.sh` that updates two spark-website source files that were previously edited by hand: - `downloads.md`: bump the Maven coordinate example (`version:`) to the latest stable release. - `site/static/versions.json`: add an entry for the new release, keeping the list sorted in descending version order. `site/downloads.html` is intentionally not edited here because it is regenerated from `downloads.md` by the existing `bundle exec jekyll build` step. Both updates are guarded by the same `-preview` check used by the neighboring steps, so preview releases are not affected. ### Why are the changes needed? The release automation already updates most of the spark-website (`documentation.md`, `js/downloads.js`, the news post, the JIRA release notes, the docs, and the `latest` symlink), but it did not touch `downloads.md` or `site/static/versions.json`. As a result the release manager had to create these edits manually, e.g. apache/spark-website#701. ### Does this PR introduce _any_ user-facing change? No. This only affects the release tooling. ### How was this patch tested? Extracted the new block from the script and ran it locally against realistic spark-website fixtures across many scenarios: - Feature release (newest) updates both files and reproduces the manual [spark-website#701](apache/spark-website#701) diff. - Preview releases (`-preview1`, `-preview2`) skip both files, matching the sibling steps. - Old-branch maintenance releases insert into the correct sorted slot in `versions.json` and never downgrade the `downloads.md` coordinate. - `downloads.md` is only bumped when the release is strictly newer than what is shown. - `versions.json` keeps every patch entry and is idempotent / dedup-safe on re-runs. - Output remains valid JSON with the existing `indent=4` formatting and trailing newline. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8) Closes #57269 from HyukjinKwon/SPARK-58136-automate-website-updates. Authored-by: Hyukjin Kwon <gurwls223@apache.org> Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com> (cherry picked from commit 74ea5d0) Signed-off-by: Hyukjin Kwon <hyukjin.kwon@databricks.com>
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR adds a step to the
finalizephase ofdev/create-release/release-build.shthat updates two spark-website source files that were previously edited by hand:downloads.md: bump the Maven coordinate example (version:) to the latest stable release.site/static/versions.json: add an entry for the new release, keeping the list sorted in descending version order.site/downloads.htmlis intentionally not edited here because it is regenerated fromdownloads.mdby the existingbundle exec jekyll buildstep.Both updates are guarded by the same
-previewcheck used by the neighboring steps, so preview releases are not affected.Why are the changes needed?
The release automation already updates most of the spark-website (
documentation.md,js/downloads.js, the news post, the JIRA release notes, the docs, and thelatestsymlink), but it did not touchdownloads.mdorsite/static/versions.json. As a result the release manager had to create these edits manually, e.g. apache/spark-website#701.Does this PR introduce any user-facing change?
No. This only affects the release tooling.
How was this patch tested?
Extracted the new block from the script and ran it locally against realistic spark-website fixtures across many scenarios:
-preview1,-preview2) skip both files, matching the sibling steps.versions.jsonand never downgrade thedownloads.mdcoordinate.downloads.mdis only bumped when the release is strictly newer than what is shown.versions.jsonkeeps every patch entry and is idempotent / dedup-safe on re-runs.indent=4formatting and trailing newline.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)