ferruzzi commented on code in PR #45551:
URL: https://github.com/apache/airflow/pull/45551#discussion_r1913634911


##########
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:
   That len(13) on the timestamp feels like an entirely arbitrary thing, but 
let's keep the same len for consistency... I don't know what trouble that might 
cause if we changed it.



-- 
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]

Reply via email to