Commit 68f719c
[SPARK-54120] Update assertGeneratedCRDMatchesHelmChart to include diff
### What changes were proposed in this pull request?
Enhance existing test assertGeneratedCRDMatchesHelmChart to give diff upon failure
### Why are the changes needed?
For better readability.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Self-contained upon success & manually tested failure scenario - e.g. remove some fields from CRD inhelm repo, the test would fail with message like
```
* What went wrong:
Execution failed for task ':spark-operator-api:assertGeneratedCRDMatchesHelmChart'.
> Generated CRD yaml does not match the staged version in Helm Chart, please keep the chart updated.
=== SparkApplication CRD Differences ===
--- /dev/fd/63 2025-10-31 14:33:55
+++ /dev/fd/62 2025-10-31 14:33:55
-6355,11 +6355,6
properties:
currentAttemptSummary:
properties:
- attemptInfo:
- properties:
- id:
- type: integer
- type: object
stateTransitionHistory:
additionalProperties:
properties:
=== SparkCluster CRD Differences ===
--- /dev/fd/63 2025-10-31 14:33:55
+++ /dev/fd/62 2025-10-31 14:33:55
-7218,8 +7218,6
type: string
lastTransitionTime:
type: string
- message:
- type: string
type: object
type: object
type: object
```
Which gives a more clear indication about the exact failure
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #414 from jiangzho/crd_diff.
Authored-by: Zhou JIANG <[email protected]>
Signed-off-by: Peter Toth <[email protected]>1 parent f1cb200 commit 68f719c
1 file changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
94 | 117 | | |
95 | 118 | | |
96 | 119 | | |
| |||
0 commit comments