Skip to content

Conversation

@alimaazamat
Copy link

@alimaazamat alimaazamat commented Nov 3, 2025

Why are these changes needed?

Dashboard HTTP Client tests never run in CI because it was missing setup from a suite_test.go file. Go test doesnt search in subdirectories so when tests moved from ./utils/ to ./utils/dashboardclient/ package the tests never ran. After adding suite_test.go the tests run but with a failure that also gets fixed in this PR.

Below is caught failure:

RayFrameworkGenerator Test GetServeDetails with network error
/Users/alimaazamat/kuberay/ray-operator/controllers/ray/utils/dashboardclient/dashboard_httpclient_test.go:289
  [FAILED] in [It] - /Users/alimaazamat/kuberay/ray-operator/controllers/ray/utils/dashboardclient/dashboard_httpclient_test.go:298 @ 11/03/25 11:49:35.648
• [FAILED] [0.000 seconds]
RayFrameworkGenerator [It] Test GetServeDetails with network error
/Users/alimaazamat/kuberay/ray-operator/controllers/ray/utils/dashboardclient/dashboard_httpclient_test.go:289

  [FAILED] Expected
      <*url.Error | 0x140003b6de0>: 
      Get "http://127.0.0.1:8090/api/serve/applications/?api_type=declarative": context deadline exceeded
      {
          Op: "Get",
          URL: "http://127.0.0.1:8090/api/serve/applications/?api_type=declarative",
          Err: <context.deadlineExceededError>{},
      }
  to equal
      <context.deadlineExceededError>: 
      context deadline exceeded
      {}
  In [It] at: /Users/alimaazamat/kuberay/ray-operator/controllers/ray/utils/dashboardclient/dashboard_httpclient_test.go:298 @ 11/03/25 11:49:35.648
------------------------------

Summarizing 1 Failure:
  [FAIL] RayFrameworkGenerator [It] Test GetServeDetails with network error
  /Users/alimaazamat/kuberay/ray-operator/controllers/ray/utils/dashboardclient/dashboard_httpclient_test.go:298

Ran 13 of 13 Specs in 0.002 seconds
FAIL! -- 12 Passed | 1 Failed | 0 Pending | 0 Skipped
--- FAIL: TestDashboardClient (0.00s)
FAIL

Now it passes by checking for the error correctly.

Related issue number

Closes #4172

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@alimaazamat
Copy link
Author

alimaazamat commented Nov 3, 2025

@marosset CI bug caught while looking into #2658

Copy link
Collaborator

@win5923 win5923 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alimaazamat, could you also remove utils_suite_test.go?
I think this file is no longer needed.

$ ginkgo run -r -v controllers/ray/utils
pod name is too long: len = 69, we will shorten it by offset = 19-ca41-e903-fc3ae634b18e-lazer090scholar-director-s
pod name is too long: len = 59, we will shorten it by offset = 9Running Suite: Utils Suite - /home/ubuntu/kuberay/ray-operator/controllers/ray/utils
====================================================================================
Random Seed: 1762877664

Will run 0 of 0 specs

Ran 0 of 0 Specs in 0.000 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS

@alimaazamat
Copy link
Author

@win5923 Replaced ray-operator/controllers/ray/utils/utils_suite_test.go‎ to be the new operator/controllers/ray/utils/dashboardclient/suite_test.go

@alimaazamat
Copy link
Author

alimaazamat commented Nov 11, 2025

I'm not understanding why but buildkite build is not passing tests. It worked previously but now not passing with removing utils_suite_test.go but doesn't seem it be related. When I press completely new build now it isn't even passing the generate pipeline step. Any tips for me? Issues happened after I rebased.

@win5923
Copy link
Collaborator

win5923 commented Nov 12, 2025

Don't worry. This isn’t related to your changes, it was mainly caused by docker api version mismatch. I’ve already created a PR to fix it.

@alimaazamat
Copy link
Author

@win5923 Thanks so much for answering my question and for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Dashboard HTTP client tests not run

3 participants