You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "bhasker87 (via GitHub)" <gi...@apache.org> on 2026/02/21 08:35:07 UTC
[PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
bhasker87 opened a new pull request, #62280:
URL: https://github.com/apache/airflow/pull/62280
closes: #50216
<!-- SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0 -->
<!--
Thank you for contributing!
Please provide above a brief description of the changes made in this pull request.
Write a good git commit message following this guide: http://chris.beams.io/posts/git-commit/
Please make sure that your code changes are covered with tests.
And in case of new features or big changes remember to adjust the documentation.
Feel free to ping (in general) for the review if you do not see reaction for a few days
(72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications.
In case of an existing issue, reference it using one of the following:
* closes: #ISSUE
* related: #ISSUE
-->
---
##### Was generative AI tooling used to co-author this PR?
<!--
If generative AI tooling has been used in the process of authoring this PR, please
change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by".
-->
- [X] Yes (please specify the tool below)
Generated-by: Claude (Anthropic) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
---
* Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
* For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
* When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
* For significant user-facing changes create newsfragment: `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #62280:
URL: https://github.com/apache/airflow/pull/62280#discussion_r3066474244
##########
airflow-core/docs/howto/docker-compose/docker-compose.yaml:
##########
@@ -140,7 +140,7 @@ services:
<<: *airflow-common
command: scheduler
healthcheck:
- test: ["CMD", "curl", "--fail", "http://localhost:8974/health"]
+ test: ["CMD-SHELL", 'airflow jobs check --job-type SchedulerJob --hostname "$${HOSTNAME}"']
Review Comment:
`airflow jobs check` depends on Airflow being able to reach the metadata DB and can report “unhealthy” during transient DB connectivity issues (even if the scheduler process is running). If the intent of this healthcheck is process liveness rather than end-to-end readiness, consider documenting this tradeoff in the compose file (or use a liveness-style check) so operators understand why the scheduler might flip to `unhealthy`.
##########
airflow-core/docs/howto/docker-compose/docker-compose.yaml:
##########
@@ -140,7 +140,7 @@ services:
<<: *airflow-common
command: scheduler
healthcheck:
- test: ["CMD", "curl", "--fail", "http://localhost:8974/health"]
+ test: ["CMD-SHELL", 'airflow jobs check --job-type SchedulerJob --hostname "$${HOSTNAME}"']
Review Comment:
The healthcheck command uses nested quoting (YAML single-quoted string containing shell double quotes plus Compose `$` escaping), which is hard to read/maintain and easy to mis-edit. Consider switching the command string to YAML double quotes (escaping inner quotes as needed) or avoiding the nested quotes by using a shell substitution like `--hostname "$(hostname)"` (or omitting `--hostname` if the CLI defaults to the current host), so the escaping rules are simpler and clearer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-4414234620
Awesome work, congrats on your first merged pull request! You are invited to check our [Issue Tracker](https://github.com/apache/airflow/issues) for additional contributions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-4195114682
Did you actually check it with differet versions of airflow? I am not sure if that is teh right fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-4177858393
Approved. I guess you need to rebase and fixe issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "bhasker87 (via GitHub)" <gi...@apache.org>.
bhasker87 commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-4177902208
"Hi @potiuk — rebased on latest main. Ready for review!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "bhasker87 (via GitHub)" <gi...@apache.org>.
bhasker87 commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-4366912973
> Did you actually check it with differet versions of airflow? I am not sure if that is teh right fix.
Hi @potiuk — the fix aligns the scheduler healthcheck with the existing triggerer and dag-processor healthchecks already in this docker-compose.yaml, which use the same airflow jobs check pattern. I haven't tested across multiple Airflow versions directly — if you have concerns about version compatibility I'm happy to revise the approach based on your guidance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-3938456336
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 (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-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](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example DAG that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) 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](https://www.apache.org/foundation/policies/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]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
- 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: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-4177709463
This pull request has had no activity from the author for over 4 weeks. We are converting it to draft to keep the review queue manageable.
**@bhasker87**, please mark this PR as ready for review when you are ready to continue working on it. Thank you for your contribution!
<!-- Pull Request quality criteria -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #62280:
URL: https://github.com/apache/airflow/pull/62280
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "bhasker87 (via GitHub)" <gi...@apache.org>.
bhasker87 commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-4177828180
Hi @potiuk — could you please approve the workflows so CI can run? Happy to address any feedback. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #62280:
URL: https://github.com/apache/airflow/pull/62280#issuecomment-4300878376
@bhasker87 This PR has been converted to **draft** because it does not yet meet our [Pull Request quality criteria](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-quality-criteria).
**Issues found:**
- :x: **Unresolved review comments** (2 threads): please walk through each unresolved review thread. **Even if a suggestion looks incorrect or irrelevant** — and some of them will be, especially any comments left by automated reviewers like GitHub Copilot — it is still the author's responsibility to respond: apply the fix, reply in-thread with a brief explanation of why the suggestion does not apply, or resolve the thread if the feedback is no longer relevant. **Once you believe a thread is resolved — whether by pushing a fix or by explaining why the suggestion doesn't apply — please mark it as resolved yourself by clicking the 'Resolve conversation' button at the bottom of each thread.** Reviewers don't auto-close their own threads, so an addressed-but-unresolved thread reads as 'still waiting on the author' and keeps the PR from moving forward.
**What to do next:**
- Address the items above.
- Make sure static checks pass locally: `prek run --from-ref main --stage pre-commit`.
- Mark the PR as "Ready for review" when you are done.
Converting a PR to draft is **not** a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the [Airflow Slack](https://s.apache.org/airflow-slack).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix scheduler healthcheck command in docker-compose.yaml [airflow]
Posted by "bhasker87 (via GitHub)" <gi...@apache.org>.
bhasker87 commented on code in PR #62280:
URL: https://github.com/apache/airflow/pull/62280#discussion_r3178575078
##########
airflow-core/docs/howto/docker-compose/docker-compose.yaml:
##########
@@ -140,7 +140,7 @@ services:
<<: *airflow-common
command: scheduler
healthcheck:
- test: ["CMD", "curl", "--fail", "http://localhost:8974/health"]
+ test: ["CMD-SHELL", 'airflow jobs check --job-type SchedulerJob --hostname "$${HOSTNAME}"']
Review Comment:
Acknowledged. The $${HOSTNAME} escaping follows Docker Compose conventions and is consistent with the existing pattern in this file. Keeping as-is for consistency.
##########
airflow-core/docs/howto/docker-compose/docker-compose.yaml:
##########
@@ -140,7 +140,7 @@ services:
<<: *airflow-common
command: scheduler
healthcheck:
- test: ["CMD", "curl", "--fail", "http://localhost:8974/health"]
+ test: ["CMD-SHELL", 'airflow jobs check --job-type SchedulerJob --hostname "$${HOSTNAME}"']
Review Comment:
Acknowledged. The DB dependency tradeoff is consistent with the triggerer and dag-processor healthchecks already present in this docker-compose.yaml. This is the recommended approach per Airflow's health check documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org