Remove unnecessary patch verb from scheduledsparkapplications/finalizers #165
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 339 lines diff across 4 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.349
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #165"
general
weight: 0.35
RobuRishabh
Purpose of this PR
Remove the unnecessary
patchRBAC verb fromscheduledsparkapplications/finalizersto align with upstream kubeflow/spark-operator.Proposed changes:
1. Remove
patchfrom the kubebuilder RBAC marker ininternal/controller/scheduledsparkapplication/controller.go(keeping onlyupdate)2. Regenerate
config/rbac/role.yamlviamake manifeststo reflect the change — the separatescheduledsparkapplications/finalizersentry withpatch+updateis merged into the existing combined entry with onlyupdateChange Category
Rationale
The
patchverb forscheduledsparkapplications/finalizersis not used by the ScheduledSparkApplication controller. The controller only usesclient.Status().Update()for finalizer management — never a patch operation. The upstream kubeflow/spark-operator only specifiesupdatefor this resource in both the Helm chart and the generatedconfig/rbac/role.yaml. This change aligns the midstream with upstream and removes an overly permissive RBAC rule that is unnecessary for running ScheduledSparkApplications on OpenShift.Checklist
Additional Notes
make manifests— the generatedrole.yamlmatches the manual edit exactly.controller.go#L97only hasverbs=update._helpers.tplalso only usesupdateforscheduledsparkapplications/finalizers.patchverb was never exercised by the controller code.Made with Cursor
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Security
Updated access controls for scheduled Spark application finalizers.
Finalizer operations now allow updates while no longer permitting patch requests.
Consolidated resource permissions for clearer and more consistent authorization behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->