← Back to Pull requests

feat!: remove client and in-cluster-client deploy modes #3340

Open
unknown opened this pull request with 358 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 27, 2026 18:41 UTC
Author

Purpose of this PR

Fixes GHSA-cmhg-mvhx-5pj6.

Removes client deploy mode from SparkApplication and ScheduledSparkApplication. Only cluster mode is now supported. Client mode was deprecated in the last release (#3253).

The Spark Operator community call on 28 Nov 2026 agreed on a feature gate disabled by default. Following review feedback from @nabuskey, this PR now removes the mode instead, since the deprecation has already been released and announced.

Proposed changes:

  • API: restrict the mode enum to cluster and regenerate the CRDs, OpenAPI spec, Python API and API docs

  • Controller: fail submission for any app still in client or in-cluster-client mode, e.g. one created before the upgrade

  • Webhook: reject client modes on create/update and drop the client mode deprecation warnings

  • Volcano: remove the client mode PodGroup handling

  • Webhook binary: add the --feature-gates flag, and pass the same gate list from Helm and Kustomize as the controller

  • Docs: describe client mode as removed
  • Change Category

  • Bugfix (non-breaking change which fixes an issue)

  • Feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that could affect existing functionality)

  • Documentation update
  • Rationale

    Client mode runs the driver inside the operator, which is the subject of the advisory above. It was deprecated last release, so removing it closes the issue without leaving an opt-in path. Interactive workloads should use SparkConnect.

    Checklist

  • I have conducted a self-review of my own code.

  • I have updated documentation accordingly.

  • I have added tests that prove my changes are effective or that my feature works.

  • Existing unit tests pass locally with my changes.
  • Additional Notes

    1. Breaking on upgrade: new SparkApplications in client mode are rejected by the API server. Apps created in client mode before upgrading fail at submission with a "no longer supported" error. This needs a release note.
    2. I kept the deprecated DeployModeClient / DeployModeInClusterClient Go constants so code that imports the API package doesn't break. I also kept spec.driver.podName, since removing a field is a larger API change. Happy to remove either if you prefer.
    3. The webhook now accepts --feature-gates, which it didn't before. It isn't needed for this change any more, but it keeps the webhook in line with the controller. I can split it into its own PR if you'd rather.
    4. The commit history still has the feature gate commits from before the switch to removal. Happy to squash before merge.
    5. Tested locally with make unit-test, make helm-unittest, make drift-check and golangci-lint (Go 1.26.10).

    Diff: 358 lines (+268 / -90) across 4 files Reviewer: nabuskey Review duration: 6018m
    All Vouch review confidence checks passed
    Residual risk 0.35 = Change Risk (0.66) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 358 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.352
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #3340"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 46.7% reviewed sensitive_module
    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: 65.8% (HIGH) · Higher = larger blast radius
    65.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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 35.1% · Moderate risk
    35.1%