← Back to Pull requests

[Flaky Test] Apiserver flaky fix #5177

Closed
unknown closed this pull request without merging on Aug 27, 2026 23:58 UTC
View on GitHub
unknown unknown commented on Aug 20, 2026 08:24 UTC
Author

  • Update GetNextName() to return name with random suffix

  • Tested this fix 40 times in https://github.com/ray-project/kuberay/pull/5162, the only one failing is due to ERROR: HTTP error 502, which is a temporary infra error
  • Why are these changes needed?

    This PR is fixing this error from buildkite CI (link)

    Ran apiserver e2e test 40 times in https://github.com/ray-project/kuberay/pull/5168, with result:

  • 2 pypi 502 issue (2 & 21)

  • 1 test failure (28):
  • RUN TestGetAllServicesWithPagination
    --
      | [2026-08-19T08:16:19Z]     service_server_e2e_test.go:599:
      | [2026-08-19T08:16:19Z]         	Error Trace:	/workdir/apiserver/test/e2e/service_server_e2e_test.go:599
      | [2026-08-19T08:16:19Z]         	            				/workdir/apiserver/test/e2e/service_server_e2e_test.go:251
      | [2026-08-19T08:16:19Z]         	Error:      	Received unexpected error:
      | [2026-08-19T08:16:19Z]         	            	kuberay api server request failed with HTTP status (500: Internal Server Error)
      | [2026-08-19T08:16:19Z]         	Test:       	TestGetAllServicesWithPagination
      | [2026-08-19T08:16:19Z]         	Messages:   	No error expected
      | [2026-08-19T08:16:19Z]     types.go:387: Found service state of '' for ray service 'slug'
      | [2026-08-19T08:16:19Z] ### FAIL: TestGetAllServicesWithPagination
    

    Log:

    W0819 08:16:13.799442       1 interceptor.go:18] Create ray service failed.: InternalServerError: Failed to create service for (first-muskox-1787127372801075197/slug): rayservices.ray.io "slug" already exists
    

    We can see that it's because rayservice name already exists.

    Related issue number

    Closes https://github.com/ray-project/kuberay/issues/4005

    Labels

    <!-- Please add the appropriate labels to this PR. -->

  • 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

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

    <!-- If you selected "Manual tests" above, please fill in the section below. Otherwise you can remove it. -->

    Manual test instructions

    <!--
    Provide step-by-step instructions so reviewers can verify your changes.
    Include any relevant screenshots or logs demonstrating the behavior.
    -->

    Diff: 327 lines (+245 / -82) across 4 files Reviewer: machichima Review duration: 11013m
    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 · 327 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.347
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5177"
    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% (MEDIUM) · Higher = larger blast radius
    42%
    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.6% · Safe to merge
    16.6%