Skip to content

Commit 41b6ba3

Browse files
jiangzhopeter-toth
authored andcommitted
[SPARK-53545] Enforce style check at project level for operator
### What changes were proposed in this pull request? This PR enforces 'misc' spotless check at project level instead of submodules ### Why are the changes needed? In this way, style checks are enforced for not only files inside submodules, but also for project files including helm and e2e test ### Does this PR introduce any user-facing change? No ### How was this patch tested? CIs ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#315 from jiangzho/style. Authored-by: Zhou JIANG <[email protected]> Signed-off-by: Peter Toth <[email protected]>
1 parent 8e7b254 commit 41b6ba3

File tree

8 files changed

+15
-12
lines changed

8 files changed

+15
-12
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
minikube docker-env --unset
132132
- name: Run E2E Test with Dynamic Configuration Disabled
133133
if: matrix.mode == 'static'
134-
run: |
134+
run: |
135135
chainsaw test --test-dir ./tests/e2e/${{ matrix.test-group }} --parallel 2
136136
- name: Run Spark K8s Operator on K8S with Dynamic Configuration Enabled
137137
if: matrix.mode == 'dynamic'

build.gradle

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,15 @@ subprojects {
116116
trimTrailingWhitespace()
117117
removeUnusedImports()
118118
}
119-
format 'misc', {
120-
target '*.md', '*.gradle', '**/*.properties', '**/*.xml', '**/*.yaml', '**/*.yml'
121-
endWithNewline()
122-
trimTrailingWhitespace()
123-
}
119+
}
120+
}
121+
122+
apply plugin: 'com.diffplug.spotless'
123+
spotless {
124+
format 'misc', {
125+
target '*.md', '*.gradle', '**/*.properties', '**/*.xml', '**/*.yaml', '**/*.yml'
126+
endWithNewline()
127+
trimTrailingWhitespace()
124128
}
125129
}
126130

tests/e2e/assertions/spark-application/spark-state-transition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ status:
2929
- "DriverReady"
3030
- "RunningHealthy"
3131
- "Succeeded"
32-
- "ResourceReleased"
32+
- "ResourceReleased"

tests/e2e/assertions/spark-driver-config-map.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ apiVersion: v1
1818
kind: ConfigMap
1919
metadata:
2020
name: ($SPARK_DRIVER_CONFIG_MAP_NAME)
21-
namespace: default
21+
namespace: default

tests/e2e/assertions/spark-driver-pod.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ spec:
2727
(volumes[?configMap.name=='spark-conf-volume-driver'] != []): true
2828
status:
2929
phase: Running
30-

tests/e2e/helm/dynamic-config-values-2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ operatorRbac:
3636
clusterRole:
3737
name: "spark-operator-clusterrole-2"
3838
clusterRoleBinding:
39-
name: "spark-operator-clusterrolebinding-2"
39+
name: "spark-operator-clusterrolebinding-2"

tests/e2e/python/pyspark-example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ spec:
2828
spark.kubernetes.container.image: ($IMAGE)
2929
spark.kubernetes.authenticate.driver.serviceAccountName: "spark"
3030
runtimeVersions:
31-
sparkVersion: ($V_SPARK_VERSION)
31+
sparkVersion: ($V_SPARK_VERSION)

tests/e2e/resource-retain-duration/chainsaw-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ spec:
6161
value: ($SPARK_APPLICATION_NAME)
6262
timeout: 120s
6363
content: |
64-
kubectl delete sparkapplication $SPARK_APPLICATION_NAME --ignore-not-found=true
64+
kubectl delete sparkapplication $SPARK_APPLICATION_NAME --ignore-not-found=true

0 commit comments

Comments
 (0)