Skip to content

Commit

Permalink
Fix kubernetes executor watcher kube_client_request_args shadowing (a…
Browse files Browse the repository at this point in the history
…pache#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]>
  • Loading branch information
2 people authored and dauinh committed Jan 23, 2025
1 parent 0bbc3a6 commit 7a82c3d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ def _run(
# 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):
Expand Down

0 comments on commit 7a82c3d

Please sign in to comment.