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] Update replica ID format (and other random strings) to better match UUIDs #41737

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
  • Loading branch information
edoakes committed Dec 8, 2023
commit 7f3dee6f3dc893308f7e11b106ecc171b478ab17
1 change: 1 addition & 0 deletions python/ray/serve/_private/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def block_until_http_ready(
time.sleep(backoff_time_s)


# Match the standard alphabet used for UUIDs.
RANDOM_STRING_ALPHABET = string.ascii_lowercase + string.digits
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocker: A bit nit, since we now allows digits, maybe can name it RANDOM_STRING_ALPHANUMERIC instead? 🙃

Copy link
Contributor

Choose a reason for hiding this comment

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

Also kinda after thought, there is also a UUID module in python not sure if we want to consider using that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes we use UUID elsewhere but here the length of the UUID is overkill and will degrade the UX for reading logs (replica IDs are scoped to a single deployment in a single cluster)


def get_random_string(length=8):
Expand Down
Loading