jedcunningham commented on a change in pull request #19036:
URL: https://github.com/apache/airflow/pull/19036#discussion_r749442224



##########
File path: tests/kubernetes/test_pod_generator.py
##########
@@ -658,11 +658,12 @@ def test_deserialize_model_file(self):
     def test_pod_name_confirm_to_max_length(self, _, pod_id):
         name = PodGenerator.make_unique_pod_id(pod_id)
         assert len(name) <= 253
-        parts = name.split(".")
-        if len(pod_id) <= 63:
+        parts = name.split("-")
+        if len(pod_id) <= 63 - 33:
             assert len(parts[0]) == len(pod_id)
         else:
             assert len(parts[0]) <= 63
+        assert len(parts[1]) == 32
         assert len(parts[1]) <= 63

Review comment:
       ```suggestion
   ```
   
   Don't need to check it's <=63 when we've just asserted it's 32.

##########
File path: tests/kubernetes/test_pod_generator.py
##########
@@ -658,11 +658,12 @@ def test_deserialize_model_file(self):
     def test_pod_name_confirm_to_max_length(self, _, pod_id):
         name = PodGenerator.make_unique_pod_id(pod_id)
         assert len(name) <= 253
-        parts = name.split(".")
-        if len(pod_id) <= 63:
+        parts = name.split("-")
+        if len(pod_id) <= 63 - 33:
             assert len(parts[0]) == len(pod_id)
         else:
             assert len(parts[0]) <= 63

Review comment:
       ```suggestion
           assert parts[0] == pod_id[:30]
   ```
   
   Did this get lost in the shuffle?




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