dirkrkotzeml commented on code in PR #45551:
URL: https://github.com/apache/airflow/pull/45551#discussion_r1914322880
##########
providers/src/airflow/providers/amazon/aws/operators/sagemaker.py:
##########
@@ -165,7 +165,13 @@ def _get_unique_name(
if fail_if_exists:
raise AirflowException(f"A SageMaker {resource_type} with name
{name} already exists.")
else:
- name = f"{proposed_name}-{time.time_ns()//1000000}"
+ timestamp = time.time_ns()//1000000
+ timestamp_length = len(timestamp)
+ name_length = len(name)
+ if 63 > name_length + timestamp_length + 1:
Review Comment:
I see that the character limit is actually 63 so I updated this as well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]