Skip to content

Commit a907cb0

Browse files
author
pintaoz
committed
Add dots in the end to indicate the username is trimmed
1 parent cfd7dd8 commit a907cb0

File tree

1 file changed

+4
-1
lines changed
  • src/hyperpod_cli/commands

1 file changed

+4
-1
lines changed

src/hyperpod_cli/commands/job.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,4 +1144,7 @@ def get_user_name():
11441144
# label value does not allow slash
11451145
user_name = user_name.replace('/', '-')
11461146
# 63 is the max length for a Kubernetes label
1147-
return user_name[:63]
1147+
if len(user_name) > 63:
1148+
# Add dots in the end to indicate the username is trimmed
1149+
return user_name[:60] + '...'
1150+
return user_name

0 commit comments

Comments
 (0)