o-nikolas commented on code in PR #30727:
URL: https://github.com/apache/airflow/pull/30727#discussion_r1191764191


##########
airflow/executors/kubernetes_executor.py:
##########
@@ -523,6 +93,19 @@ def _list_pods(self, query_kwargs):
 
         return pods
 
+    def _make_safe_label_value(self, input_value: str | datetime) -> str:
+        """
+        Normalize a provided label to be of valid length and characters.
+        See airflow.kubernetes.pod_generator.make_safe_label_value for more 
details
+        """
+        # airflow.kubernetes is an expensive import, locally import it here to
+        # speed up load times of the kubernetes_executor module.
+        from airflow.kubernetes import pod_generator
+
+        if isinstance(input_value, datetime):
+            return pod_generator.datetime_to_label_safe_datestring(input_value)

Review Comment:
   I'm trying to keep this functional changes in this PR down as small as 
possible (I've already received feedback that it's too large and hard to 
review). Could follow up with this though
   



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