dstandish commented on code in PR #27526:
URL: https://github.com/apache/airflow/pull/27526#discussion_r1015196760
##########
kubernetes_tests/test_kubernetes_pod_operator.py:
##########
@@ -79,17 +77,14 @@ def get_kubeconfig_path():
def get_label():
test = os.environ.get("PYTEST_CURRENT_TEST")
+ test = test.split(" ")[0] # if invoked from setup, will have suffix '
(setup)', e.g.
label = "".join(filter(str.isalnum, test)).lower()
- return label[-63]
+ return label[-63:]
@pytest.mark.execution_timeout(180)
-class TestKubernetesPodOperatorSystem(unittest.TestCase):
- def get_current_task_name(self):
- # reverse test name to make pod name unique (it has limited length)
- return "_" + unittest.TestCase.id(self).replace(".", "_")[::-1]
Review Comment:
if we're just after "unique" we can use something simpler, like uuid4
--
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]