Skip to content

[DO NOT MERGE] Add hyp create ray-dashboard-connection command - #446

Open
jchatter321 wants to merge 1 commit into
aws:mainfrom
jchatter321:add-hyp-create-ray-dashboard-connection-command
Open

[DO NOT MERGE] Add hyp create ray-dashboard-connection command#446
jchatter321 wants to merge 1 commit into
aws:mainfrom
jchatter321:add-hyp-create-ray-dashboard-connection-command

Conversation

@jchatter321

@jchatter321 jchatter321 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Adds a CLI command to create a RayDashboardConnection CR and return the dashboard URL.

Usage:

hyp create ray-dashboard-connection --cluster-name <name> --namespace <ns>

Returns the connection URL from the operator's extension API. Flag --namespace defaults to default namespace if not provided.

Testing

Installed CLI with pip install -e . and successfully generated a RayDashboardConnection using hyp create ray-dashboard-connection --cluster-name my-raycluster.

Unit tests -

dev-dsk-jdchatte-2a-4e225af8 % python -m pytest test/unit_tests/cli/test_ray_dashboard_connection.py -v

✓ hyperpod-cluster-stack-template installed successfully from local directory
==================================== test session starts =====================================
platform linux -- Python 3.12.11, pytest-8.3.2, pluggy-1.6.0 -- /home/jdchatte/.local/share/mise/installs/python/3.12.11/bin/python
cachedir: .pytest_cache
rootdir: /local/home/jdchatte/sagemaker-hyperpod-cli
configfile: setup.cfg
plugins: cov-5.0.0, anyio-4.14.2, order-1.3.0, hydra-core-1.3.2, dependency-0.6.0
collected 8 items                                                                            

test/unit_tests/cli/test_ray_dashboard_connection.py::TestRayDashboardConnectionCommand::test_create_success_returns_url PASSED [ 12%]
test/unit_tests/cli/test_ray_dashboard_connection.py::TestRayDashboardConnectionCommand::test_create_default_namespace PASSED [ 25%]
test/unit_tests/cli/test_ray_dashboard_connection.py::TestRayDashboardConnectionCommand::test_create_empty_url_raises_error PASSED [ 37%]
test/unit_tests/cli/test_ray_dashboard_connection.py::TestRayDashboardConnectionCommand::test_create_no_status_raises_error PASSED [ 50%]
test/unit_tests/cli/test_ray_dashboard_connection.py::TestRayDashboardConnectionCommand::test_create_404_api_not_installed PASSED [ 62%]
test/unit_tests/cli/test_ray_dashboard_connection.py::TestRayDashboardConnectionCommand::test_create_404_namespace_not_found PASSED [ 75%]
test/unit_tests/cli/test_ray_dashboard_connection.py::TestRayDashboardConnectionCommand::test_create_403_raises_exception PASSED [ 87%]
test/unit_tests/cli/test_ray_dashboard_connection.py::TestRayDashboardConnectionCommand::test_missing_cluster_name PASSED [100%]<unknown>:33: SyntaxWarning: invalid escape sequence '\/'

@jchatter321
jchatter321 requested a review from a team as a code owner August 11, 2026 16:57
if connection_url:
click.echo(connection_url)
else:
click.echo(f"RayDashboardConnection created in namespace '{namespace}' for cluster '{cluster_name}'")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This can never happen because agg APIs are sychronous. Lets fail with an error message 'contact your administrator' or something when URL is null / empty.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added exception.

"""Create a RayDashboardConnection to get a dashboard URL for a RayCluster."""
api_client = _get_eks_api_client()

body = {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we handle the case where the ray endpoint operator is not installed gracefully? If kind RayDashboardConnection is not recognized by the API server, lets instruct customers to install ray-endpoint-operator (we'll come back and link the docs when it's ready)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added exception below.

@jchatter321
jchatter321 force-pushed the add-hyp-create-ray-dashboard-connection-command branch 2 times, most recently from b4aeb21 to 4281c4a Compare August 11, 2026 17:29
@jchatter321
jchatter321 deployed to manual-approval August 11, 2026 17:33 — with GitHub Actions Active
@zhaoqizqwang

Copy link
Copy Markdown
Collaborator

Did we update the help message or add documentation for this new command: ray-dashboard-connection?

@jchatter321

Copy link
Copy Markdown
Contributor Author

Did we update the help message or add documentation for this new command: ray-dashboard-connection?

We plan to release public documentation containing this information.

@jchatter321 jchatter321 changed the title Add hyp create ray-dashboard-connection command [DO NOT MERGE] Add hyp create ray-dashboard-connection command Aug 13, 2026
@jchatter321
jchatter321 force-pushed the add-hyp-create-ray-dashboard-connection-command branch from 4281c4a to 98d3755 Compare August 13, 2026 21:17
@jchatter321
jchatter321 force-pushed the add-hyp-create-ray-dashboard-connection-command branch from 98d3755 to 0a8d259 Compare August 13, 2026 21:19
@jchatter321
jchatter321 deployed to manual-approval August 13, 2026 21:19 — with GitHub Actions Active
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.

3 participants