Repository navigation
Conversation
|
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
|
339a495 to
c1f8ef3
Compare
|
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. |
c1f8ef3 to
b6756dc
Compare
|
Hi @Subham-KRLX, the requested decorator-scope, delete_from_yaml and verbose coverage is included in b6756dc, 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. |
The decorator source rewriting and YAML deletion helpers can silently corrupt user code or hide aggregate API failures without focused regression coverage.
Keep generated task source and YAML deletion behavior protected against regressions identified in review.
b6756dc to
b4cab18
Compare
Closes #72265.
The Kubernetes task source-rewrite and YAML deletion utilities had no direct tests. This adds coverage for generated task source, API dispatch and deletion error reporting, and removes their two corresponding
OVERLOOKED_TESTSexemptions.The tests cover task/lifecycle decorator removal, unrelated decorators, Jinja rendering, missing context, API-group/kind conversion, namespaced and cluster-scoped deletion, namespace precedence, List expansion, aggregated errors, YAML forwarding and verbose status output. Kubernetes API constructors use
autospec=True, and response doubles expose only their expected status interface; no cluster is required.Rebased onto current Apache
mainat18fe1c60986, retaining the September 18 review coverage and upstream's removal of other obsolete test exemptions. The scope remains two test modules and their matching exemptions; production utilities are unchanged.Verification
On head
b4cab189b1ewith the documented UV project commands, importing both utilities from this checkout:uv run --project providers/cncf/kubernetes pytest providers/cncf/kubernetes/tests/unit/cncf/kubernetes/test_python_kubernetes_script.py providers/cncf/kubernetes/tests/unit/cncf/kubernetes/utils/test_delete_from.py -q: 17 passed.uv run --project airflow-core pytest airflow-core/tests/unit/always/test_project_structure.py -xvs: 10 passed, 1 expected failure.prekchecks, Ruff, commit-message hook andgit diff --check: passed.Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI Codex following the project's Gen-AI contribution guidelines.