This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3c63bb6fff4 Fix kubernetes executor watcher kube_client_request_args
shadowing (#45528)
3c63bb6fff4 is described below
commit 3c63bb6fff4059c686aa9c5d005b42d5959239ef
Author: Mikhail Dengin <[email protected]>
AuthorDate: Mon Jan 13 17:56:35 2025 +0100
Fix kubernetes executor watcher kube_client_request_args shadowing (#45528)
* Fix watcher kube_client_request_args shadowing
* Update
providers/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py
Apply suggestion by review
Co-authored-by: Ryan Hatter <[email protected]>
---------
Co-authored-by: Ryan Hatter <[email protected]>
---
.../cncf/kubernetes/executors/kubernetes_executor_utils.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/providers/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py
b/providers/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py
index ad0207cdfa3..f21c2866e83 100644
---
a/providers/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py
+++
b/providers/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py
@@ -147,10 +147,10 @@ class KubernetesJobWatcher(multiprocessing.Process,
LoggingMixin):
# For info about k8s timeout settings see
#
https://github.com/kubernetes-client/python/blob/v29.0.0/examples/watch/timeout-settings.md
# and
https://github.com/kubernetes-client/python/blob/v29.0.0/kubernetes/client/api_client.py#L336-L339
- client_timeout = 30
- server_conn_timeout = 3600
- kwargs["_request_timeout"] = client_timeout
- kwargs["timeout_seconds"] = server_conn_timeout
+ if "_request_timeout" not in kwargs:
+ kwargs["_request_timeout"] = 30
+ if "timeout_seconds" not in kwargs:
+ kwargs["timeout_seconds"] = 3600
logical_date_key = get_logical_date_key()
for event in self._pod_events(kube_client=kube_client,
query_kwargs=kwargs):