eladkal commented on code in PR #32278:
URL: https://github.com/apache/airflow/pull/32278#discussion_r1247611289
##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -158,6 +158,8 @@ class KubernetesPodOperator(BaseOperator):
suffix if random_name_suffix is True) to generate a pod id (DNS-1123
subdomain,
containing only [a-z0-9.-]).
:param random_name_suffix: if True, will generate a random suffix.
+ :param job_id_as_suffix: if True, will add ti.job_id to the pod name.
random_name_suffix, if set to True
+ takes precedence over this parameter.
Review Comment:
This will be very confusing.
If we want this need we need to do something similar to
https://github.com/apache/airflow/pull/30718
e.g deprecate `random_name_suffix` and add `name_suffix` with options of
`(None, "random", "job_id")`
On a more high level note I don't think this will work as you expect?
as noted in random_name_suffix the chars allowed are `[a-z0-9.-]` so what
will happen when task_id contains illegal chars? I suspect that your goal is to
match the task_id of airflow to the pod name for easier find but when it's not
exact match and you start playing around with modifying the names then it
defeat the purpose
WDYT?
##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -158,6 +158,8 @@ class KubernetesPodOperator(BaseOperator):
suffix if random_name_suffix is True) to generate a pod id (DNS-1123
subdomain,
containing only [a-z0-9.-]).
:param random_name_suffix: if True, will generate a random suffix.
+ :param job_id_as_suffix: if True, will add ti.job_id to the pod name.
random_name_suffix, if set to True
+ takes precedence over this parameter.
Review Comment:
This will be very confusing.
If we want this need we need to do something similar to
https://github.com/apache/airflow/pull/30718
e.g deprecate `random_name_suffix` and add `name_suffix` with options of
`(None, "random", "job_id")`
On a more high level note I don't think this will work as you expect?
as noted in `random_name_suffix` the chars allowed are `[a-z0-9.-]` so what
will happen when task_id contains illegal chars? I suspect that your goal is to
match the task_id of airflow to the pod name for easier find but when it's not
exact match and you start playing around with modifying the names then it
defeat the purpose
WDYT?
--
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]