Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ on:
default: '*'
jdk:
type: choice
description: 'JDK version: 17, 21, or 25'
description: 'JDK version: 21 or 25'
required: true
default: '17'
default: '21'
options:
- '17'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit (P3): Without the JDK 17 option, nothing can regenerate the unsuffixed baseline files. BenchmarkBase.scala:55 still suffixes result files only when version > 17, so every run this workflow can launch writes -jdk21 or -jdk25 files. The 126 committed unsuffixed *-results.txt files, 125 of which report a JDK 17 VM (for example KryoBenchmark-results.txt), stay frozen as JDK 17 snapshots that still look like the default baseline, and the scaladocs that say results go to benchmarks/<Name>-results.txt describe files no supported run writes. When the baseline last moved, SPARK-45281 changed this threshold from > 8 to > 17 and companion changes refreshed and pruned the result files; moving it to > 21 follows the same pattern.

Verification:

  • Behavior: Regenerating a benchmark on JDK 21 writes the unsuffixed result file, and regenerating it on JDK 25 writes the jdk25-suffixed file.
  • Inspection: No committed unsuffixed benchmark result file names a JDK 17 VM in its header, and no orphaned jdk21-suffixed duplicates remain.

- '21'
- '25'
scala:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
java:
required: false
type: string
default: 17
default: 21

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking (P2): Moving this default to 21 silently disables HiveExternalCatalogVersionsSuite. The suite is @SlowHiveTest and runs in the 'hive - slow tests' entries here and in maven_test.yml with java: ${{ inputs.java }}. PROCESS_TABLES.testingVersions is non-empty only when Utils.isJavaVersionAtMost17 (lines 264-266), and test("backward compatibility") calls runSparkSubmit only when it is non-empty (line 250). No master job can run on Java 17 any more, so every run logs 'Skip tests because old Spark versions don't support Java 21' and passes without testing anything. Master loses its automated check that tables and metadata written by released Spark versions stay readable through HiveExternalCatalog, a main 5.0 upgrade path. Released 4.x lines run on Java 21, so the gate can select the latest release of each line that supports the running JDK instead of returning nothing.

Verification:

  • Regression: Running the Hive external catalog backward-compatibility suite on Java 21 exercises at least one prior release line, instead of logging the Java 21 skip and passing vacuously.
  • Compatibility: Release lines that cannot run on the current JDK, such as 3.5.x on Java 21, are excluded, so the suite does not fail spuriously.

branch:
description: Branch to run the build against
required: false
Expand Down Expand Up @@ -953,7 +953,7 @@ jobs:
export MAVEN_CLI_OPTS="--no-transfer-progress"
./build/mvn $MAVEN_CLI_OPTS -DskipTests -Pyarn -Pkubernetes -Pvolcano -Phive -Phive-thriftserver -Phadoop-cloud -Pjvm-profiler -Pspark-ganglia-lgpl -Pkinesis-asl -Pcredential-aws clean install
# Native data sources are called with the FFM API, which requires Java 22 or later, so the
# other jobs, on Java 17, skip the tests that load a library. The tests build their library
# other jobs, on Java 21, skip the tests that load a library. The tests build their library
# with the C++ compiler of the runner.
- name: Test native data sources
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_codegen_jdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# javac is slower than Janino, so this runs on its own schedule rather than on
# every push, skips the jobs that do not compile generated code (docs, lint, buf,
# ui), and raises the timeout of the three jobs that no longer fit their default.
name: "Build / Codegen JDK backend (master, Scala 2.13, JDK 17)"
name: "Build / Codegen JDK backend (master, Scala 2.13, JDK 21)"

on:
schedule:
Expand All @@ -40,7 +40,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
# See SPARK-57411 for the measurements behind these three.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
37 changes: 13 additions & 24 deletions .github/workflows/build_java17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,23 @@
# under the License.
#

# This is a placeholder. Java 17 is not supported on master since Spark 5.0, so
# master does not run this build. The file exists here only so that the README
# build status badge, which resolves a workflow by its path on the default
# branch, renders for the branches that still run it (e.g. branch-4.x), and so
# that branch4*_scheduler.yml can dispatch it to those branches with
# `gh workflow run --ref`. The actual build is defined in the same file on
# those branches.

name: "Build / Java17 (Scala 2.13, JDK 17)"

on:
workflow_dispatch:

jobs:
run-build:
permissions:
packages: write
name: Run
uses: ./.github/workflows/build_and_test.yml
noop:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could this file and build_maven_java21.yml get a header comment like the one in build_scala213.yml? Without it, nothing says that the README badges and the branch4*_scheduler.yml dispatches (--ref branch-4.*) depend on these files staying on master, and they look safe to delete.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you. I added a placeholder header to both files like build_scala213.yml. It also mentions the branch4*_scheduler.yml dispatches.

if: github.repository == 'apache/spark'
with:
java: 17
hadoop: hadoop3
envs: >-
{
"SCALA_PROFILE": "scala2.13",
"PYSPARK_IMAGE_TO_TEST": "",
"PYTHON_TO_TEST": ""
}
jobs: >-
{
"build": "true",
"sparkr": "true",
"tpcds-1g": "true",
"docker-integration-tests": "true",
"k8s-integration-tests": "true",
"oidc-e2e": "true",
"lint" : "true"
}
runs-on: ubuntu-latest
steps:
- name: No-op
run: echo "Java 17 is not built on this branch. See branches that still support it (e.g. branch-4.x)."
2 changes: 1 addition & 1 deletion .github/workflows/build_maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

name: "Build / Maven (Scala 2.13, JDK 17)"
name: "Build / Maven (Scala 2.13, JDK 21)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit (P3): This name is already used by build_maven_java21.yml, and after the default change the two workflows are the same build. Apart from cron (0 13 vs 0 14, every two days), they differ only in build_maven_java21.yml's explicit java: 21, which is now maven_test.yml's default. So master runs two identical full Maven JDK 21 test jobs under one display name, and the README master table shows both badges. The branch schedulers dispatch both files with --ref branch-*, so neither can simply be deleted. Turning master's build_maven_java21.yml into a no-op placeholder like build_scala213.yml, with a distinct display name and without the duplicate README badge, removes the duplicate run and keeps branch dispatch and badges working.

See Shared repair plan 2 in the review body.


on:
schedule:
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/build_maven_java21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,24 @@
# under the License.
#

name: "Build / Maven (Scala 2.13, JDK 21)"
# This is a placeholder. Java 21 is the default on master, so build_maven.yml
# already runs the Maven build with Java 21 and there is no separate scheduled
# build here. The file exists only so that the README build status badge, which
# resolves a workflow by its path on the default branch, renders for the
# branches that still run it as a separate build (e.g. branch-4.x), and so that
# branch4*_scheduler.yml can dispatch it to those branches with
# `gh workflow run --ref`. The actual build is defined in the same file on
# those branches.

name: "Build / Maven Java21 (Scala 2.13, JDK 21)"

on:
schedule:
- cron: '0 14 */2 * *'
workflow_dispatch:

jobs:
run-build:
permissions:
packages: write
name: Run
uses: ./.github/workflows/maven_test.yml
noop:
if: github.repository == 'apache/spark'
with:
java: 21
runs-on: ubuntu-latest
steps:
- name: No-op
run: echo "Java 21 is the default on master and is not built separately. See branches that run it as a separate build (e.g. branch-4.x)."
4 changes: 2 additions & 2 deletions .github/workflows/build_non_ansi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

name: "Build / Non-ANSI (JDK 17, Scala 2.13)"
name: "Build / Non-ANSI (JDK 21, Scala 2.13)"

on:
schedule:
Expand All @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.12_classic_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.12_pandas_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.14_nogil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_3.15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_connect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Setup build environment
uses: ./.github/actions/setup-build-env
with:
java-version: '17'
java-version: '21'
- name: Install Python 3.11
uses: actions/setup-python@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_connect40.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Setup build environment
uses: ./.github/actions/setup-build-env
with:
java-version: '17'
java-version: '21'
- name: Install Python 3.11
uses: actions/setup-python@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_minimum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_rockdb_as_ui_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

name: "Build / RocksDB as UI Backend (JDK 17, Scala 2.13)"
name: "Build / RocksDB as UI Backend (JDK 21, Scala 2.13)"

on:
schedule:
Expand All @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_sparkr_window.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ jobs:
key: build-sparkr-windows-maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
build-sparkr-windows-maven-${{ runner.os }}-
- name: Install Java 17
- name: Install Java 21
uses: actions/setup-java@v6
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Install R 4.4.3
uses: r-lib/actions/setup-r@d3c5be51b12e724e68f33216ca3c148b66d5f0b6 # v2.12.1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_uds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

name: "Build / Unix Domain Socket (JDK 17, Scala 2.13)"
name: "Build / Unix Domain Socket (JDK 21, Scala 2.13)"

on:
schedule:
Expand All @@ -32,7 +32,7 @@ jobs:
uses: ./.github/workflows/build_and_test.yml
if: github.repository == 'apache/spark'
with:
java: 17
java: 21
branch: master
hadoop: hadoop3
envs: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
java:
required: false
type: string
default: 17
default: 21
branch:
description: Branch to run the build against
required: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ jobs:
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Free up disk space
run: ./dev/free_disk_space_container
- name: Install Java 17
- name: Install Java 21
uses: actions/setup-java@v6
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Install dependencies for documentation generation
run: |
# Keep the version of Bundler here in sync with the following locations:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/publish_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,18 @@ jobs:
with:
distribution: temurin
java-version: 8
- name: Install Java 17
if: matrix.branch != 'branch-3.5'
- name: Install Java 17 for branch-4.x
if: matrix.branch != 'branch-3.5' && matrix.branch != 'master'
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 17
- name: Install Java 21
if: matrix.branch == 'master'
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 21
- name: Publish snapshot
env:
ASF_USERNAME: ${{ secrets.NEXUS_USER }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_hosted_runner_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
java:
required: false
type: string
default: 17
default: 21
python:
required: false
type: string
Expand Down
2 changes: 1 addition & 1 deletion R/pkg/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Authors@R:
License: Apache License (== 2.0)
URL: https://www.apache.org https://spark.apache.org
BugReports: https://spark.apache.org/contributing.html
SystemRequirements: Java (>= 17, < 26)
SystemRequirements: Java (>= 21, < 26)
Depends:
R (>= 4.0),
methods
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and Structured Streaming for stream processing.

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/org.apache.spark/spark-core_2.13.svg?filter=!*preview*)](https://search.maven.org/search?q=g:org.apache.spark)
[![Java](https://img.shields.io/badge/Java-17+-orange.svg)](https://adoptium.net/temurin/releases/?version=17)
[![Java](https://img.shields.io/badge/Java-21+-orange.svg)](https://adoptium.net/temurin/releases/?version=21)
[![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_main.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_main.yml)
[![PySpark Coverage](https://codecov.io/gh/apache/spark/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/spark)
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/pyspark?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads)](https://pypi.org/project/pyspark/)
Expand All @@ -38,7 +38,6 @@ This README file only contains basic setup instructions.
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_uds.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_uds.yml) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_rockdb_as_ui_backend.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_rockdb_as_ui_backend.yml) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_maven.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_maven.yml) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_maven_java21.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_maven_java21.yml) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_maven_java25.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_maven_java25.yml) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_maven_java21_macos26.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_maven_java21_macos26.yml) |
| | [![GitHub Actions Build](https://github.com/apache/spark/actions/workflows/build_maven_java21_arm.yml/badge.svg)](https://github.com/apache/spark/actions/workflows/build_maven_java21_arm.yml) |
Expand Down
Loading