-
Notifications
You must be signed in to change notification settings - Fork 552
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
Change added USER_HASH
in models name to full digits (8) instead of half (4) to prevent potential hash conflict
#4592
base: master
Are you sure you want to change the base?
Conversation
After a thorough investigation, I found changing Luckily, I found that #1235 had already solved this backward compatibility issue by restoring the old |
@cblmemo PTAL, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this @andylizf ! This looks good to me. cc @Michaelvll for a look here to make sure every thing looks good to you
@@ -182,7 +182,7 @@ def make_cluster_name_on_cloud(display_name: str, | |||
f'on the cloud, we convert it to {cluster_name_on_cloud}.') | |||
user_hash = '' | |||
if add_user_hash: | |||
user_hash = get_user_hash()[:USER_HASH_LENGTH_IN_CLUSTER_NAME] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this constant still in use after this deletion? if not we can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Thanks @andylizf! Can we see if there is any manual backward compatibility tests other than the script to make sure this does not break any existing cluster, jobs, or services?
@@ -182,7 +182,7 @@ def make_cluster_name_on_cloud(display_name: str, | |||
f'on the cloud, we convert it to {cluster_name_on_cloud}.') | |||
user_hash = '' | |||
if add_user_hash: | |||
user_hash = get_user_hash()[:USER_HASH_LENGTH_IN_CLUSTER_NAME] | |||
user_hash = get_user_hash() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: we can further increase the character space for the user hash from hex to base36, i.e. update the common_utils.generate_user_hash
to further encode the user_hash with common_utils.base36_encode
.
Resolves #4143
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
conda deactivate; bash -i tests/backward_compatibility_tests.sh