You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/11 06:26:33 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #19036: replaced '.' with '-' and adjusted trimmed_pod_id per ticket comments

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



##########
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:
       > The test pod names are "pod-name-with-hyphen", so `name.rsplit("-")[0]` will just return `pod`.
   
   Would `name.rsplit("-", 1)[0]` or `name.rpartition("-")[0]` work?




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org