← Back to Pull requests

fix(sparkconnect): update GPU specs for per-argument container args #3212

Closed
unknown closed this pull request without merging on Sep 30, 2026 00:12 UTC
View on GitHub
unknown unknown commented on Sep 29, 2026 23:14 UTC
Author

Purpose of this PR

master does not compile, and one spec fails once it does.

#3169 added GPU coverage that depends on the pre-#3188 shape of the server container:

  • options_test.go calls shellParsedSparkConfig, which #3188 renamed to parsedSparkConfig.

  • reconciler_test.go reads pod.Spec.Containers[0].Args[0] as the single joined command string. Since #3188, Args[0] is --master and each option is its own element.
  • The two PRs edited different regions of both files, so they merged without a textual conflict and neither PR's CI built the combined tree.

    Proposed changes:

  • Update the three remaining shellParsedSparkConfig call sites to parsedSparkConfig.

  • Assert the GPU options against the argument slice rather than a joined string.
  • 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

    Test-only. No production code and no behaviour changes; the GPU support from #3169 and the argument construction from #3188 are both unchanged.

    The two spark.executor.resource.gpu.* assertions become exact element matches, which is stronger than the previous substring check — gpuConfOption emits --conf followed by exactly key=value. The negative assertion keeps ContainSubstring nested inside ContainElement, since it checks for a key prefix with no value and should still mean "no argument mentions this key".

    The spark.executor.resource.gpu.discoveryScript value in "takes precedence over the same keys in sparkConf" contains a space. It previously survived a round trip through bash because of the shell quoting #3188 removed; read directly from the argument slice it is a single element, so that assertion holds unchanged.

    I swept the sparkconnect package and test/e2e for other code depending on the old joined-string shape (Args[0], substring assertions against Args, strings.Join) and found none, so this should be the complete set.

    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

    Existing coverage only; this restores compilation and fixes the failing spec.

    Diff: 313 lines (+234 / -79) across 3 files Reviewer: nabuskey Review duration: 58m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 313 lines diff across 3 files
    0.40
    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%
    56%
    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.344
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3212"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 17.4% · Safe to merge
    17.4%