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



##########
File path: tests/kubernetes/test_pod_generator.py
##########
@@ -684,7 +684,7 @@ def test_pod_name_is_valid(self, pod_id, 
expected_starts_with):
             len(name) <= 253 and all(ch.lower() == ch for ch in name) and 
re.match(regex, name)
         ), "pod_id is invalid - fails allowed regex check"
 
-        assert name.rsplit(".")[0] == expected_starts_with
+        assert name[:-33] == expected_starts_with

Review comment:
       Actually, this does create some issues. The test pod names are 
"pod-name-with-hyphen", so `name.rsplit("-")[0]` will just return `pod`. I 
switched it to use `"-".join(name.rsplit("-")[:-1])`. Unless we want to move 
back to the arbitrary `[:-33]` then this might be a better option.




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