← Back to Pull requests

Add an OpenShift AI Spark Operator P0 benchmark harness. #188

Open
unknown opened this pull request with 376 lines diff across 4 files
View on GitHub
unknown unknown commented on Sep 21, 2026 21:44 UTC
Author

Purpose of this PR

Add a small-scale OpenShift AI benchmark for the Spark Operator, adapted from the upstream EKS Locust workflow. It proves controlled SparkApplication submission and machine-readable metric collection before any larger scaling work.

Proposed changes:

  • Add an external Locust harness that submits uniquely named SparkApplications across three namespaces and writes per-app lifecycle JSON/CSV plus a summary (throughput, start-latency p50/p90/p99).

  • Add an OpenShift SparkPi template (1 driver + 5 executors), namespace/RBAC/anyuid setup, webhook namespace patch, cleanup, and run.sh.

  • Add Prometheus query definitions, a Thanos snapshot script, with two 51-app runs and the gaps that blocked the original concurrent, webhook-on shape.
  • 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

    The upstream benchmark assumes EKS (node selectors, pi-sleep image, Helm webhook toggle, kube-prometheus). This harness is the minimum adaptation that runs on ROSA / RHOAI 3.6 and records where that adaptation stops.

    Two serial runs (USERS=1, 2 apps/min) submitted 51 applications each. The repeat run exported 51/51 COMPLETED, driver start latency p50 17s / p90 19s / max 20s, API create median 47 ms. A 3-user burst at 30 apps/min OOM'd the controller at its stock 512Mi limit.

    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

    Validation is two live runs on ROSA (OpenShift 4.22.13, RHOAI 3.6.0-ea.2, Spark Operator v2.4.0, 4 × m5.2xlarge), not Go unit tests. Run artifacts stay local (results/.gitignore). Summaries:

    | | 20260921T200655Z | 20260921T205326Z |
    |---|---|---|
    | Submitted / Locust failures | 51 / 0 | 51 / 0 |
    | State at export | 50 COMPLETED, 1 RUNNING | 51 COMPLETED |
    | Start latency p50 / p90 / max | 17s / 18s / 19s | 17s / 19s / 20s |

    The first export stopped before the last app finished. The watcher was changed before the repeat so it waits for a terminal state. Submission settings were unchanged.

    Documented blockers, not fixed here:

  • spark-operator-module restores webhook namespaceSelector to default only, so bench namespaces were not webhook-covered (ALLOW_WEBHOOK_REVERT=1).

  • Controller memory limit 512Mi is reconciled back if raised; concurrent spark-submit OOMs it.

  • Controller is started with --enable-metrics=true, but spark_application_* and workqueue series are absent from Thanos.
  • Commands to run:


    make go-fmt
    make go-vet
    make go-lint
    make unit-test
    make shell-fmt
    make shell-lint
    

    Diff: 376 lines (+282 / -94) across 4 files Reviewer: RobuRishabh Review duration: 67622m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.50) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 376 lines diff across 4 files
    0.50
    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%
    44%
    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.355
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #188"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.7% 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: 49.9% (MEDIUM) · Higher = larger blast radius
    49.9%
    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: 44.7% · Lower = rushed or shallow review
    44.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: 27.6% · Safe to merge
    27.6%