← Back to Pull requests

[Follow-up] feat: address review comments on GCS active-passive-head API #5289

Closed
unknown closed this pull request without merging on Sep 15, 2026 19:03 UTC
View on GitHub
unknown unknown commented on Sep 14, 2026 20:17 UTC
Author

Why are these changes needed?

Follow-up to #4910, which was merged before @machichima and @win5923 finished their
review. This PR addresses the remaining review comments.

Changes:

1. Rename the JSON field to activePassiveOptions
(comment).
The Go field is renamed to ActivePassiveOptions as well so it matches its JSON
tag, consistent with TLSOptions, GcsFaultToleranceOptions, and
HistoryServerOptions.

2. Use CEL XValidation for the leader election lease timing invariants
(comment).
The leaseDurationSeconds > renewDeadlineSeconds and
renewDeadlineSeconds > retryPeriodSeconds checks moved from validation.go onto
ActivePassiveHeadOptions, matching the existing CEL usage on
GcsFaultToleranceOptions.Backend, RayJob.ManagedBy, and DeletionStrategy.

   // +kubebuilder:validation:XValidation:rule="self.leaseDurationSeconds > self.renewDeadlineSeconds",message="leaseDurationSeconds must be greater than renewDeadlineSeconds"
   // +kubebuilder:validation:XValidation:rule="self.renewDeadlineSeconds > self.retryPeriodSeconds",message="renewDeadlineSeconds must be greater than retryPeriodSeconds"
   type ActivePassiveHeadOptions struct { ... }
   

3. Simplify the ActivePassiveHeadOptions GoDoc, dropping the sentence about
default lease timings.

4. Drop the redundant options != nil checks in the redis branch of
validateGcsFaultToleranceBackend — the caller already guarantees non-nil.

Regenerated CRDs, Helm chart CRDs, deepcopy, apply configurations, and API docs.

validateGcsActivePassiveHead still enforces the GCSFaultToleranceActivePassiveHead
feature gate and the redis-backend requirement, since neither is expressible in CEL.

The feature remains behind the alpha GCSFaultToleranceActivePassiveHead feature gate
(default false), so there is no change in behavior for existing users. Because the
JSON field is renamed, this is a breaking change only for anyone who picked up the
field from master in the few hours since #4910 merged.

Related issue number

Follow-up to #4910
Related to ray-project/ray#63643

Labels

  • If this PR has user-facing changes that require documentation updates at release time, I have added the doc-updates-required label.

  • If this PR contains breaking changes, I have added the breaking-change label.
  • Checks

  • I've made sure the tests are passing.

  • Testing Strategy

  • - [x] Unit tests
    - [ ] Manual tests
    - [ ] This PR is not tested :(

    Diff: 341 lines (+255 / -86) across 4 files Reviewer: win5923 Review duration: 1365m
    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 · 341 lines diff across 4 files
    0.42
    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.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5289"
    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: 42.3% (MEDIUM) · Higher = larger blast radius
    42.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: 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: 16.7% · Safe to merge
    16.7%