Skip to content

Honor API server worker timeout configuration - #72859

Merged
potiuk merged 3 commits into
apache:mainfrom
manabery:fix-api-worker-timeout-config
Nov 6, 2026
Merged

potiuk merged 3 commits into
apache:mainfrom
manabery:fix-api-worker-timeout-config

Conversation

@manabery

@manabery manabery commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The airflow api-server command hard-codes its worker timeout default, so the documented [api] worker_timeout setting and AIRFLOW__API__WORKER_TIMEOUT environment variable do not affect the server.

This change uses the configured value as the CLI default while preserving an explicit --worker-timeout override. It also adds a regression test that evaluates the parser in a fresh process.

Reference:

Validation:

  • airflow-core/tests/unit/cli/commands/test_api_server_command.py: 37 passed
  • Selective core tests: Always and CLI passed
  • Ruff, mypy, fast Prek checks, and manual Prek checks passed

Was generative AI tooling used to co-author this PR?
  • Yes - Codex (GPT-5)

Generated-by: Codex (GPT-5) following the guidelines

@boring-cyborg

boring-cyborg Bot commented Sep 10, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@manabery
manabery marked this pull request as ready for review September 10, 2026 04:38
@manabery
manabery force-pushed the fix-api-worker-timeout-config branch from e63f390 to 649daf6 Compare September 10, 2026 04:58
@manabery

Copy link
Copy Markdown
Contributor Author

@Miretpl Thank you for the review, and sorry for the delayed follow-up. I've addressed both comments. Could you please take another look when you have a chance?

manabery and others added 2 commits November 2, 2026 01:07
The documented worker timeout setting should control API server worker lifecycle unless users explicitly override it on the command line.
check the type of api-server.worker_timeout.

Co-authored-by: Y-C <[email protected]>
@potiuk
potiuk force-pushed the fix-api-worker-timeout-config branch from 7d06e18 to 3565f95 Compare November 2, 2026 00:07

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — reading [api] worker_timeout as the default matches how --port/--workers/--host already work, and the fresh-process test is a good guard. Both of the earlier review points (dropping the newsfragment, moving the test into TestCliApiServer) are addressed. Rebased onto main, approving with auto-merge on.


Drafted-by: Claude Code (Claude Opus 5); reviewed by @potiuk before posting

@potiuk
potiuk enabled auto-merge (squash) November 2, 2026 00:08
@potiuk
potiuk requested a review from Miretpl November 2, 2026 00:08
@potiuk
potiuk merged commit a694dc8 into apache:main Nov 6, 2026
66 checks passed
@boring-cyborg

boring-cyborg Bot commented Nov 6, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants