← Back to Pull requests

[SPARK-62539] Document and test that `SparkOperatorConfManager.getValue` treats an empty override as unset #1001

Closed
unknown closed this pull request without merging on Dec 01, 2026 21:04 UTC
View on GitHub
unknown unknown commented on Dec 01, 2026 19:39 UTC
Author

What changes were proposed in this pull request?

This PR aims to make it explicit that SparkOperatorConfManager.getValue treats an empty dynamic config override as unset, without any behavior change.

  • Add a sentence to the Javadoc of SparkOperatorConfManager.getValue(String) to say that an empty override is treated as unset, so the initial value applies, just as ConfigOption#getValue() resolves an unset or empty value to the default value.

  • Add a test case, SparkOperatorConfManagerTest.testEmptyOverrideFallsBackToInitialValue, to verify that

  • - an empty override is kept by refresh, but getValue returns the initial value for it.
    - a non-empty override still takes precedence.
    - a refresh without the key restores the initial value.

    Why are the changes needed?

    SparkOperatorConfManager.getValue has returned the initial value for an empty override by design since SPARK-48786 (apache/spark-kubernetes-operator#17). It is consistent with ConfigOption#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 getValue nor 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 getValue falls 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

    Diff: 222 lines (+166 / -56) across 2 files Reviewer: peter-toth Review duration: 84m
    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
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.5% · Safe to merge
    14.5%