You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "bcanvural (via GitHub)" <gi...@apache.org> on 2026/10/12 12:15:05 UTC

[PR] Stop default Celery worker Service selecting KubernetesExecutor pods [airflow]

bcanvural opened a new pull request, #74587:
URL: https://github.com/apache/airflow/pull/74587

   With `executor: "KubernetesExecutor,CeleryExecutor"`, KubernetesExecutor task pods carry the same `tier`/`component`/`release` labels as the default worker set's Celery pods, so the headless `<release>-worker` Service selects every task pod. Its endpoints change on every task start and finish; on one of our installs the EndpointSlice saw ~3.35M updates in ~6 months, and in an Istio mesh each update is a full config push to every sidecar. The Service's DNS name also resolves to pods that don't serve worker logs.
   
   Default-set Celery pods now always carry `worker-set: <name>`, as named sets already do, and the Service selects on it. The Deployment/StatefulSet `spec.selector` is untouched because it is immutable, so existing releases upgrade in place; until the rollout finishes, the Service only lists pods from the new revision.
   
   closes: #74584
   
   Tested locally:
   - New `TestWorkerService::test_selector_excludes_kubernetes_executor_pods` fails on `main` (and with either template change reverted on its own) and passes with this change.
   - Chart test files that render the worker templates (`test_worker.py`, `test_worker_sets.py`, `test_basic_helm_chart.py` and 8 others): 669 passed. 9 `test_invalid_pull_policy` / `test_invalid_dags_access_mode` cases fail the same way on `main` with my local helm 3.13.2, whose schema error wording differs from the pinned 3.19.0.
   - `prek run --stage pre-commit` on the changed files passes, except `lint-helm-chart` and `kubeconform`, which need breeze (not installed here). `helm lint chart` passes.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5.5)
   
   Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-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] Stop default Celery worker Service selecting KubernetesExecutor pods [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #74587:
URL: https://github.com/apache/airflow/pull/74587#issuecomment-6124065196

   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] Stop default Celery worker Service selecting KubernetesExecutor pods [airflow]

Posted by "bcanvural (via GitHub)" <gi...@apache.org>.
bcanvural commented on PR #74587:
URL: https://github.com/apache/airflow/pull/74587#issuecomment-6319948113

   In the spirit of 'be patient and be persistent', I kindly ask for further reviews/approvals from the rest of the team :) 


-- 
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] Stop default Celery worker Service selecting KubernetesExecutor pods [airflow]

Posted by "bcanvural (via GitHub) via commits" <co...@airflow.apache.org>.
bcanvural commented on PR #74587:
URL: https://github.com/apache/airflow/pull/74587#issuecomment-6742926653

   Gentle reminder for more reviews on this issue, I appreciate your time to get the issue resolved :)


-- 
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