Skip to content

[SPARK-58136][INFRA] Automate downloads.md and versions.json updates in the release script#57269

Closed
HyukjinKwon wants to merge 1 commit into
apache:masterfrom
HyukjinKwon:SPARK-58136-automate-website-updates
Closed

[SPARK-58136][INFRA] Automate downloads.md and versions.json updates in the release script#57269
HyukjinKwon wants to merge 1 commit into
apache:masterfrom
HyukjinKwon:SPARK-58136-automate-website-updates

Conversation

@HyukjinKwon

Copy link
Copy Markdown
Member

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 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)

…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 cloud-fan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.yml sets destination: site with keep_files: ['docs','static',...], so site/static/versions.json (under static, no source counterpart) survives the step-6 jekyll build; downloads.md is a jekyll source whose downloads.html output is regenerated at step 6, which runs after this edit and before the shared git add . && git commit && git push. So omitting the site/downloads.html edit (which #701 did by hand) is correct.
  • Consistency — the new step mirrors its sibling metadata steps (shared -preview guard, per-heredoc vercmp, 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>
@HyukjinKwon

Copy link
Copy Markdown
Member Author

Merge Summary:

Posted by merge_spark_pr.py

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.

2 participants