Skip to content

[Refactor] use constant variable for port name and value #3341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

machichima
Copy link
Contributor

@machichima machichima commented Apr 12, 2025

  • Convert hard-coded port names and values into constant variables defined in ray-operator/controllers/ray/utils/constant.go

DefaultClientPort = 10001
DefaultGcsServerPort = 6379
DefaultDashboardPort = 8265
DefaultMetricsPort = 8080
DefaultDashboardAgentListenPort = 52365
DefaultServingPort = 8000
ClientPortName = "client"
GcsServerPortName = "gcs-server"
DashboardPortName = "dashboard"
MetricsPortName = "metrics"
ServingPortName = "serve"

Why are these changes needed?

Follow up on #3262 (comment)

Some codes include hard-coded port name and value, which may cause some typo.

Related issue number

Checks

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

@kevin85421 kevin85421 merged commit c441d2b into ray-project:master Apr 12, 2025
21 checks passed
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.

2 participants