Skip to content
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

[Serve] Allow and remove trailing slashes in Ray submission address #26093

Merged
merged 14 commits into from
Jun 30, 2022

Conversation

shrekris-anyscale
Copy link
Contributor

@shrekris-anyscale shrekris-anyscale commented Jun 24, 2022

Why are these changes needed?

This change removes trailing slashes from a Ray submission address, rather than raising an Exception. This reduces confusion over the format required for a Ray submission address.

Related issue number

Closes #25969.

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
      • This change modifies some existing unit tests in test_job_submission.py and test_cli.py to submit to addresses with a trailing slash.

Comment on lines 193 to 198
self._address = cluster_info.address.rstrip("/")
logger.debug(
"The submission address cannot contain trailing slashes. Removing "
f'them from the requested submission address of "{address}".'
)

Copy link
Contributor

Choose a reason for hiding this comment

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

guard this with if cluster_info.address.endswith("/")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch– I added a guard.

@shrekris-anyscale
Copy link
Contributor Author

shrekris-anyscale commented Jun 25, 2022

@simon-mo This change will also affect the job submission path, since I'm modifying the parent class. Do you think that'll be okay?

@simon-mo
Copy link
Contributor

I'm not sure, probably? @architkulkarni thoughts?

@architkulkarni architkulkarni self-assigned this Jun 27, 2022
Copy link
Contributor

@architkulkarni architkulkarni left a comment

Choose a reason for hiding this comment

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

Seems fine to me, it's just increasing the allowed addresses, so it shouldn't cause anything to break.

@shrekris-anyscale shrekris-anyscale changed the title [WIP] [Serve] Allow and remove trailing slashes in Ray submission address [Serve] Allow and remove trailing slashes in Ray submission address Jun 28, 2022
@edoakes edoakes merged commit 010a356 into ray-project:master Jun 30, 2022
edoakes pushed a commit to edoakes/ray that referenced this pull request Jul 14, 2022
klwuibm pushed a commit to yuanchi2807/ray that referenced this pull request Jul 27, 2022
franklsf95 pushed a commit to franklsf95/ray that referenced this pull request Aug 2, 2022
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.

[Serve] Serve CLI commands fail if address has a trailing slash
5 participants