(labels: Dict[str, str])
| 183 | # TODO (ryanaoleary@): This function will replace `validate_node_labels` after |
| 184 | # the migration from NodeLabelSchedulingPolicy to the Label Selector API is complete. |
| 185 | def validate_node_label_syntax(labels: Dict[str, str]): |
| 186 | if labels is None: |
| 187 | return |
| 188 | for key, value in labels.items(): |
| 189 | possible_error_message = validate_label_key(key) |
| 190 | if possible_error_message: |
| 191 | raise ValueError(possible_error_message) |
| 192 | if value is not None: |
| 193 | validate_label_value(value) |
| 194 | |
| 195 | |
| 196 | def validate_fallback_strategy( |
searching dependent graphs…