shahar1 commented on code in PR #53368:
URL: https://github.com/apache/airflow/pull/53368#discussion_r2644093472
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:
##########
@@ -81,7 +81,7 @@ class KubernetesJobOperator(KubernetesPodOperator):
:param completion_mode: CompletionMode specifies how Pod completions are
tracked. It can be `NonIndexed` (default) or `Indexed`.
:param completions: Specifies the desired number of successfully finished
pods the job should be run with.
:param manual_selector: manualSelector controls generation of pod labels
and pod selectors.
- :param parallelism: Specifies the maximum desired number of pods the job
should run at any given time.
+ :param parallelism: Specifies the maximum desired number of pods the job
should run at any given time. Defaults to 1
Review Comment:
See my other comments, it should be `>1`
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/job.py:
##########
@@ -115,7 +115,7 @@ def __init__(
completion_mode: str | None = None,
completions: int | None = None,
manual_selector: bool | None = None,
- parallelism: int | None = None,
+ parallelism: int = 1,
Review Comment:
+1 for that.
Also, I would like to review my earlier review, and setting `parallelism =
0` as an equivalent for `parallelism = 1` is indeed confusing.
If we take `parallism = 0` as-is is, it means that no pods should start at
all, and I don't find it practical.
For that reason:
1. I suggest to throw an error when `parallelism < 1`.
2. If `paralelism is None` - set it to `1` and raise a `DeprecationWarning`.
--
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]