-
Notifications
You must be signed in to change notification settings - Fork 32
Adds labels and network aliases #1214
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
base: main
Are you sure you want to change the base?
Conversation
c4c1206
to
d41a001
Compare
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.
2 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
label_key, label_value = str(docker_label_var), str(service['labels'][docker_label_var]) | ||
else: | ||
|
||
raise RuntimeError('Environment variable needs to be a string with = or dict and non-empty. We do not allow the feature of forwarding variables from the host OS!') |
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.
syntax: Error message should refer to 'label' instead of 'Environment variable'
raise RuntimeError('Environment variable needs to be a string with = or dict and non-empty. We do not allow the feature of forwarding variables from the host OS!') | |
raise RuntimeError('Label needs to be a string with = or dict and non-empty. We do not allow the feature of forwarding variables from the host OS!') |
if self._skip_unsafe: | ||
print(TerminalColors.WARNING, arrows(f"Found label value with size {len(label_value)} (max allowed length is 1024) - Skipping label '{label_value}'"), TerminalColors.ENDC) | ||
continue | ||
labels_check_errors.append(f"- value of label '{label_key}' is too long {len(label_key)} (max allowed length is 1024) - Maybe consider using --allow-unsafe or --skip-unsafe") |
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.
logic: Using label_key length instead of label_value length in error message
labels_check_errors.append(f"- value of label '{label_key}' is too long {len(label_key)} (max allowed length is 1024) - Maybe consider using --allow-unsafe or --skip-unsafe") | |
labels_check_errors.append(f"- value of label '{label_key}' is too long {len(label_value)} (max allowed length is 1024) - Maybe consider using --allow-unsafe or --skip-unsafe") |
This is needed for the OpenCloud usage scenario