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

Upgrade to Spark 3.5.3 #2202

Merged
merged 2 commits into from
Oct 13, 2024
Merged
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

ARG SPARK_IMAGE=spark:3.5.2
ARG SPARK_IMAGE=spark:3.5.3

FROM golang:1.23.1 AS builder

Expand Down
26 changes: 13 additions & 13 deletions README.md
Copy link
Member Author

@jacobsalway jacobsalway Oct 12, 2024

Choose a reason for hiding this comment

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

We can update this table during the release process depending on whether this upgrade lands in a minor or patch version.

Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ If you are running Spark operator on Google Kubernetes Engine (GKE) and want to

The following table lists the most recent few versions of the operator.

| Operator Version | API Version | Kubernetes Version | Base Spark Version |
| ------------- | ------------- | ------------- | ------------- |
| `v2.0.x` | `v1beta2` | 1.16+ | `3.5.2` |
| `v1beta2-1.6.x-3.5.0` | `v1beta2` | 1.16+ | `3.5.0` |
| `v1beta2-1.5.x-3.5.0` | `v1beta2` | 1.16+ | `3.5.0` |
| `v1beta2-1.4.x-3.5.0` | `v1beta2` | 1.16+ | `3.5.0` |
| `v1beta2-1.3.x-3.1.1` | `v1beta2` | 1.16+ | `3.1.1` |
| `v1beta2-1.2.3-3.1.1` | `v1beta2` | 1.13+ | `3.1.1` |
| `v1beta2-1.2.2-3.0.0` | `v1beta2` | 1.13+ | `3.0.0` |
| `v1beta2-1.2.1-3.0.0` | `v1beta2` | 1.13+ | `3.0.0` |
| `v1beta2-1.2.0-3.0.0` | `v1beta2` | 1.13+ | `3.0.0` |
| `v1beta2-1.1.x-2.4.5` | `v1beta2` | 1.13+ | `2.4.5` |
| `v1beta2-1.0.x-2.4.4` | `v1beta2` | 1.13+ | `2.4.4` |
| Operator Version | API Version | Kubernetes Version | Base Spark Version |
|-----------------------|-------------|--------------------|--------------------|
| `v2.0.x` | `v1beta2` | 1.16+ | `3.5.2` |
| `v1beta2-1.6.x-3.5.0` | `v1beta2` | 1.16+ | `3.5.0` |
| `v1beta2-1.5.x-3.5.0` | `v1beta2` | 1.16+ | `3.5.0` |
| `v1beta2-1.4.x-3.5.0` | `v1beta2` | 1.16+ | `3.5.0` |
| `v1beta2-1.3.x-3.1.1` | `v1beta2` | 1.16+ | `3.1.1` |
| `v1beta2-1.2.3-3.1.1` | `v1beta2` | 1.13+ | `3.1.1` |
| `v1beta2-1.2.2-3.0.0` | `v1beta2` | 1.13+ | `3.0.0` |
| `v1beta2-1.2.1-3.0.0` | `v1beta2` | 1.13+ | `3.0.0` |
| `v1beta2-1.2.0-3.0.0` | `v1beta2` | 1.13+ | `3.0.0` |
| `v1beta2-1.1.x-2.4.5` | `v1beta2` | 1.13+ | `2.4.5` |
| `v1beta2-1.0.x-2.4.4` | `v1beta2` | 1.13+ | `2.4.4` |

## Developer Guide

Expand Down
10 changes: 5 additions & 5 deletions config/samples/v1beta1_sparkapplication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
driver:
labels:
version: 3.5.2
version: 3.5.3
serviceAccount: spark-operator-spark
executor:
labels:
version: 3.5.2
version: 3.5.3
instances: 1
10 changes: 5 additions & 5 deletions config/samples/v1beta2_scheduledsparkapplication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ spec:
template:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
restartPolicy:
type: Never
driver:
labels:
version: 3.5.2
version: 3.5.3
cores: 1
coreLimit: 1200m
memory: 512m
serviceAccount: spark-operator-spark
executor:
labels:
version: 3.5.2
version: 3.5.3
instances: 1
cores: 1
coreLimit: 1200m
Expand Down
10 changes: 5 additions & 5 deletions config/samples/v1beta2_sparkapplication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
driver:
labels:
version: 3.5.2
version: 3.5.3
serviceAccount: spark-operator-spark
executor:
labels:
version: 3.5.2
version: 3.5.3
instances: 1
6 changes: 3 additions & 3 deletions examples/spark-pi-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
restartPolicy:
type: Never
volumes:
Expand Down
6 changes: 3 additions & 3 deletions examples/spark-pi-custom-resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
restartPolicy:
type: Never
driver:
Expand Down
6 changes: 3 additions & 3 deletions examples/spark-pi-dynamic-allocation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
driver:
cores: 1
memory: 512m
Expand Down
6 changes: 3 additions & 3 deletions examples/spark-pi-kube-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
driver:
cores: 1
memory: 512m
Expand Down
10 changes: 5 additions & 5 deletions examples/spark-pi-prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ metadata:
spec:
type: Scala
mode: cluster
image: {IMAGE_REGISTRY}/{IMAGE_REPOSITORY}/spark:3.5.2-gcs-prometheus
image: {IMAGE_REGISTRY}/{IMAGE_REPOSITORY}/spark:3.5.3-gcs-prometheus
imagePullPolicy: Always
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
arguments:
- "100000"
sparkVersion: 3.5.2
sparkVersion: 3.5.3
restartPolicy:
type: Never
driver:
cores: 1
memory: 512m
labels:
version: 3.5.2
version: 3.5.3
serviceAccount: spark-operator-spark
executor:
cores: 1
instances: 1
memory: 512m
labels:
version: 3.5.2
version: 3.5.3
monitoring:
exposeDriverMetrics: true
exposeExecutorMetrics: true
Expand Down
4 changes: 2 additions & 2 deletions examples/spark-pi-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ spec:
type: Python
pythonVersion: "3"
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainApplicationFile: local:///opt/spark/examples/src/main/python/pi.py
sparkVersion: 3.5.2
sparkVersion: 3.5.3
driver:
cores: 1
memory: 512m
Expand Down
6 changes: 3 additions & 3 deletions examples/spark-pi-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ spec:
template:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
restartPolicy:
type: Never
driver:
Expand Down
6 changes: 3 additions & 3 deletions examples/spark-pi-ttl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
timeToLiveSeconds: 30
driver:
cores: 1
Expand Down
6 changes: 3 additions & 3 deletions examples/spark-pi-volcano.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
driver:
cores: 1
memory: 512m
Expand Down
8 changes: 4 additions & 4 deletions examples/spark-pi-yunikorn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
sparkVersion: 3.5.2
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
sparkVersion: 3.5.3
driver:
cores: 1
memory: 512m
Expand All @@ -36,4 +36,4 @@ spec:
memory: 512m
batchScheduler: yunikorn
batchSchedulerOptions:
queue: root.default
queue: root.default
10 changes: 5 additions & 5 deletions examples/spark-pi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ metadata:
spec:
type: Scala
mode: cluster
image: spark:3.5.2
image: spark:3.5.3
imagePullPolicy: IfNotPresent
mainClass: org.apache.spark.examples.SparkPi
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples_2.12-3.5.2.jar
mainApplicationFile: local:///opt/spark/examples/jars/spark-examples.jar
arguments:
- "5000"
sparkVersion: 3.5.2
sparkVersion: 3.5.3
driver:
labels:
version: 3.5.2
version: 3.5.3
cores: 1
memory: 512m
serviceAccount: spark-operator-spark
executor:
labels:
version: 3.5.2
version: 3.5.3
instances: 1
cores: 1
memory: 512m
6 changes: 4 additions & 2 deletions internal/controller/sparkapplication/controller_test.go
Copy link
Member Author

Choose a reason for hiding this comment

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

golangci-lint was failing on the errcheck linter because of this.

Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ var _ = Describe("SparkApplication Controller", func() {
Expect(result.Requeue).To(BeFalse())

app := &v1beta2.SparkApplication{}
k8sClient.Get(ctx, key, app)
err = k8sClient.Get(ctx, key, app)
Expect(err).NotTo(HaveOccurred())
Expect(app.Status.ExecutorState).To(HaveLen(2))
})

Expand All @@ -388,7 +389,8 @@ var _ = Describe("SparkApplication Controller", func() {
Expect(result.Requeue).To(BeFalse())

app := &v1beta2.SparkApplication{}
k8sClient.Get(ctx, key, app)
err = k8sClient.Get(ctx, key, app)
Expect(err).NotTo(HaveOccurred())
Expect(app.Status.ExecutorState).To(HaveLen(1))
})
})
Expand Down
2 changes: 1 addition & 1 deletion spark-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

ARG SPARK_IMAGE=spark:3.5.2
ARG SPARK_IMAGE=spark:3.5.3
FROM ${SPARK_IMAGE}

# Switch to user root so we can add additional jars and configuration files.
Expand Down