This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new e2f556c3d56 [v3-1-test] Configure uvicorn `timeout_worker_healthcheck`
from worker-timeout CLI option (#57731) (#57854)
e2f556c3d56 is described below
commit e2f556c3d5613afe5f994f68029672aef307711e
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Nov 5 12:06:36 2025 +0000
[v3-1-test] Configure uvicorn `timeout_worker_healthcheck` from
worker-timeout CLI option (#57731) (#57854)
- Set the minimum version for uvicorn to 0.37.0, so that this setting can
be provided.
- Add "timeout_worker_healthcheck" to the uvicorn_kwargs, and set it
to the worker_timeout value that is already used to configure the
"timeout_keep_alive" and "timeout_graceful_shutdown" settings. This
increases the timeout value from 5 seconds to 120 seconds by default.
This increase is the same as for the "timeout_keep_alive" setting.
(cherry picked from commit e98dd9ff7dfb5bc56c58819f9cafaf195e52b964)
Co-authored-by: vlieven <[email protected]>
---
airflow-core/pyproject.toml | 1 +
airflow-core/src/airflow/cli/commands/api_server_command.py | 1 +
airflow-core/tests/unit/cli/commands/test_api_server_command.py | 2 ++
3 files changed, 4 insertions(+)
diff --git a/airflow-core/pyproject.toml b/airflow-core/pyproject.toml
index ac8d9f8eb7d..7e55ec1b27b 100644
--- a/airflow-core/pyproject.toml
+++ b/airflow-core/pyproject.toml
@@ -83,6 +83,7 @@ dependencies = [
"deprecated>=1.2.13",
"dill>=0.2.2",
"fastapi[standard-no-fastapi-cloud-cli]>=0.116.0,<0.118.0",
+ "uvicorn>=0.37.0",
"starlette>=0.45.0",
"httpx>=0.25.0",
'importlib_metadata>=6.5;python_version<"3.12"',
diff --git a/airflow-core/src/airflow/cli/commands/api_server_command.py
b/airflow-core/src/airflow/cli/commands/api_server_command.py
index ccc79a10938..65a77509e57 100644
--- a/airflow-core/src/airflow/cli/commands/api_server_command.py
+++ b/airflow-core/src/airflow/cli/commands/api_server_command.py
@@ -81,6 +81,7 @@ def _run_api_server(args, apps: str, num_workers: int,
worker_timeout: int, prox
"workers": num_workers,
"timeout_keep_alive": worker_timeout,
"timeout_graceful_shutdown": worker_timeout,
+ "timeout_worker_healthcheck": worker_timeout,
"ssl_keyfile": ssl_key,
"ssl_certfile": ssl_cert,
"access_log": True,
diff --git a/airflow-core/tests/unit/cli/commands/test_api_server_command.py
b/airflow-core/tests/unit/cli/commands/test_api_server_command.py
index eed903f5386..568368fa169 100644
--- a/airflow-core/tests/unit/cli/commands/test_api_server_command.py
+++ b/airflow-core/tests/unit/cli/commands/test_api_server_command.py
@@ -218,6 +218,7 @@ class TestCliApiServer(_CommonCLIUvicornTestClass):
"workers": args.workers,
"timeout_keep_alive": args.worker_timeout,
"timeout_graceful_shutdown": args.worker_timeout,
+ "timeout_worker_healthcheck": args.worker_timeout,
"access_log": True,
"proxy_headers": args.proxy_headers,
**expected_additional_kwargs,
@@ -267,6 +268,7 @@ class TestCliApiServer(_CommonCLIUvicornTestClass):
workers=2,
timeout_keep_alive=60,
timeout_graceful_shutdown=60,
+ timeout_worker_healthcheck=60,
ssl_keyfile=None,
ssl_certfile=None,
access_log=True,