← Back to Pull requests

[History Server] Set owner info cookie and update logs file structure #4918

Closed
unknown closed this pull request without merging on Jul 30, 2026 20:32 UTC
View on GitHub
unknown unknown commented on Jun 16, 2026 23:56 UTC
Author

This is a followup to https://github.com/ray-project/kuberay/pull/4907

Why are these changes needed?


This pr updates paths for enter_cluster to allow users to also input owner information.
Previously /enter_cluster only accepted {namespace}/{name}/{session}, where {name} was strictly the RayCluster name. This PR expends the route to include owner kind (raycluster, rayjob, rayservice).
GET /enter_cluster/{namespace}/{kind}/{name} (defaults session to latest)
GET /enter_cluster/{namespace}/{kind}/{name}/{session}

By inputting the owner, history server will also set the necessary owner_kind and owner_name cookie.

Along with setting the owner cookie, this PR also utilizes the owner information and update the log file structure.
The log file structure is updated to this format as discussed in #4774:

cluster-history/
  raycluster/
    <namespace>/
      <cluster-name>/
          <session-name>/
             <node-name>/
                job_events/
                node_events/
                logs/
  rayjob/
    <namespace>/
      <rayjob-name>/
        <cluster-name>/
          <session-name>/
             <node-name>/
                job_events/
                node_events/
                logs/
  rayservice/
    <namespace>/
      <rayservice-name>/
        <cluster-name>/
          <session-name>/
             <node-name>/
                job_events/
                node_events/
                logs/

<img width="839" height="431" alt="image" src="https://github.com/user-attachments/assets/45b4859e-d49a-4a88-9349-f3c18fee8fdf" />

Related issue number


Followup for https://github.com/ray-project/kuberay/pull/4907 and part of #4708

Checks

  • I've made sure the tests are passing.

  • Testing Strategy

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

    Diff: 235 lines (+176 / -59) across 2 files Reviewer: chiayi Review duration: 63156m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.37) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 235 lines diff across 2 files
    0.37
    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.327
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4918"
    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: 37.1% (MEDIUM) · Higher = larger blast radius
    37.1%
    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: 16.1% · Safe to merge
    16.1%