diff --git a/airflow-core/pyproject.toml b/airflow-core/pyproject.toml index 3b9fbe1763a4f..4f51b6b66d667 100644 --- a/airflow-core/pyproject.toml +++ b/airflow-core/pyproject.toml @@ -84,6 +84,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 734a6fb74fc70..01844398f79b2 100644 --- a/airflow-core/src/airflow/cli/commands/api_server_command.py +++ b/airflow-core/src/airflow/cli/commands/api_server_command.py @@ -82,6 +82,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 bfb9750c300dc..8fd5dcfc2cd66 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 @@ -192,6 +192,7 @@ def test_args_to_uvicorn(self, ssl_cert_and_key, cli_args, expected_additional_k "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, @@ -241,6 +242,7 @@ def test_run_command_daemon( workers=2, timeout_keep_alive=60, timeout_graceful_shutdown=60, + timeout_worker_healthcheck=60, ssl_keyfile=None, ssl_certfile=None, access_log=True,