You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "YusefSyed (via GitHub)" <gi...@apache.org> on 2026/09/03 00:02:34 UTC

[PR] Add Kubernetes provider utility test coverage [airflow]

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

   Closes #72265.
   
   ## Why
   
   The Kubernetes task source-rewrite and YAML deletion utilities had no direct tests. A regression could silently corrupt generated task code, select the wrong Kubernetes API method, or change deletion error handling without the project-structure gate noticing the behavior change.
   
   ## What changed
   
   - Cover task decorators with no arguments, arguments, nested parentheses, setup and teardown decorators, and absent task decorators.
   - Cover script rendering, native Jinja rendering, and strict missing-context behavior.
   - Cover Kubernetes API class derivation for core, named, `.k8s.io`, and multi-label DNS groups.
   - Cover CamelCase method conversion, namespaced and cluster-scoped dispatch, namespace precedence, List expansion, inherited API versions, and aggregated `ApiException` formatting.
   - Remove the two matching entries from `OVERLOOKED_TESTS`.
   
   ## Verification
   
   - Direct combined provider tests: 14 passed.
   - `airflow-core/tests/unit/always/test_project_structure.py`: 10 passed, 1 expected xfail.
   - Applicable Ruff, mypy, license, test-location, and pre-commit checks: passed.
   - The two requested Breeze commands were attempted, but the local Docker CI-image build ended before producing a test result. No Breeze success is claimed. Hosted CI is the remaining environment-level verification.
   
   ## AI assistance
   
   Generative AI tools assisted with repository navigation, test drafting, command execution, and an independent diff review. I reviewed and approved the final three-file test-only change and understand the source-rewrite, Kubernetes dispatch, namespace, List, and error-aggregation cases it covers.
   


-- 
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] Add Kubernetes provider utility test coverage [airflow]

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

   Hi @Subham-KRLX, the requested decorator-scope, delete_from_yaml and verbose coverage is included in b6756dc8, along with autospecced mock patching. The branch is rebased and the focused provider tests and project-structure checks pass locally. The current hosted workflows are awaiting maintainer approval; could a committer approve them when convenient? Happy to address any remaining review feedback.
   
   Codex-assisted follow-up, posted with my approval.


-- 
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] Add Kubernetes provider utility test coverage [airflow]

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

   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] Add Kubernetes provider utility test coverage [airflow]

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

   Took a look at the tests and noticed a few missing things from the issue You still need coverage for the decorator scope edge cases mentioned in the issue description Also delete_from_yaml and the verbose flag are not covered yet Plus please switch monkeypatch to standard mock patch decorators with autospec as per Airflow testing guidelines.


-- 
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] Add Kubernetes provider utility test coverage [airflow]

Posted by "YusefSyed (via GitHub) via commits" <co...@airflow.apache.org>.
YusefSyed closed pull request #72461: Add Kubernetes provider utility test coverage
URL: https://github.com/apache/airflow/pull/72461


-- 
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] Add Kubernetes provider utility test coverage [airflow]

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

   Rebased on current main (1,253 commits behind before). The two provider test modules and the project-structure check pass locally with the documented uv commands (17 passed; 10 passed, 1 xfailed). The hosted workflows still need a committer's approval to run: could someone approve them, and is there a cncf-kubernetes provider reviewer I should request?


-- 
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] Add Kubernetes provider utility test coverage [airflow]

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

   Closing this one. #72265 was closed on Oct 28, and three other open PRs (#74424, #74524, #75539) add the same two test modules, so mine only adds to the review queue.


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