Skip to content

Add Kubernetes provider utility test coverage - #72461

Open
YusefSyed wants to merge 1 commit into
apache:mainfrom
YusefSyed:codex/kubernetes-provider-tests
Open

Add Kubernetes provider utility test coverage#72461
YusefSyed wants to merge 1 commit into
apache:mainfrom
YusefSyed:codex/kubernetes-provider-tests

Conversation

@YusefSyed

@YusefSyed YusefSyed commented Sep 3, 2026

Copy link
Copy Markdown

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.

Generative AI tools assisted with repository navigation, test drafting, command
execution, and diff analysis. The resulting three-file test-only change was
narrowed to direct utility coverage and removal of the two matching
overlooked-test entries, then verified with the checks listed above.

The account holder reviewed and approved the final three-file diff and
validation evidence on 2026-09-04 and accepts final responsibility for the
contribution.


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

Generated-by: OpenAI Codex (GPT-5.6 Sol) following the
guidelines

@boring-cyborg boring-cyborg Bot added area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues labels Sep 3, 2026
@boring-cyborg

boring-cyborg Bot commented Sep 3, 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: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@YusefSyed
YusefSyed marked this pull request as ready for review September 3, 2026 00:03
@YusefSyed
YusefSyed marked this pull request as draft September 3, 2026 00:25
The decorator source rewriting and YAML deletion helpers can silently corrupt user code or hide aggregate API failures without focused regression coverage.
@YusefSyed
YusefSyed force-pushed the codex/kubernetes-provider-tests branch from 339a495 to c1f8ef3 Compare September 4, 2026 05:31
@YusefSyed
YusefSyed marked this pull request as ready for review September 4, 2026 15:56
@YusefSyed
YusefSyed marked this pull request as draft September 4, 2026 18:15
@YusefSyed
YusefSyed marked this pull request as ready for review September 4, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing tests for cncf.kubernetes script and delete utilities

1 participant