[SPARK-62539] Document and test that `SparkOperatorConfManager.getValue` treats an empty override as unset #1001
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 222 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.323
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1001"
general
weight: 0.35
peter-toth
What changes were proposed in this pull request?
This PR aims to make it explicit that
SparkOperatorConfManager.getValuetreats an empty dynamic config override as unset, without any behavior change.SparkOperatorConfManager.getValue(String)to say that an empty override is treated as unset, so the initial value applies, just asConfigOption#getValue()resolves an unset or empty value to the default value.SparkOperatorConfManagerTest.testEmptyOverrideFallsBackToInitialValue, to verify that- an empty override is kept by
refresh, butgetValuereturns the initial value for it.- a non-empty override still takes precedence.
- a
refreshwithout the key restores the initial value.Why are the changes needed?
SparkOperatorConfManager.getValuehas returned the initial value for an empty override by design since SPARK-48786 (apache/spark-kubernetes-operator#17). It is consistent withConfigOption#getValue(), whose Javadoc says "An unset or empty value resolves to the default value" since SPARK-59984 (apache/spark-kubernetes-operator#935).However, this override-layer behavior is stated neither in the Javadoc of
getValuenor in any test case, because no test case sets an empty override. So, it can be mistaken for a bug and be changed by accident.Does this PR introduce _any_ user-facing change?
No. This is a Javadoc and test-only change.
How was this patch tested?
Pass the CIs with the newly added test case.
In addition, I manually verified that the new test case fails when
getValuefalls back to the initial value only for a missing (null) override.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5