You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "KarthikMohankumar (via GitHub)" <gi...@apache.org> on 2026/09/26 08:22:12 UTC
[PR] Add dedicated tests for cncf.kubernetes secret and k8s_model modules [airflow]
KarthikMohankumar opened a new pull request, #73751:
URL: https://github.com/apache/airflow/pull/73751
`secret.py` and `k8s_model.py` in the `cncf.kubernetes` provider were both on the `OVERLOOKED_TESTS` allowlist in `test_project_structure.py`.
`Secret` already had tests, but they lived in `tests/unit/cncf/kubernetes/models/test_secret.py`. There is no `models` package on the source side, so the structure check never matched them to `secret.py`. This PR:
- moves them to `tests/unit/cncf/kubernetes/test_secret.py`, next to where the source lives, and drops the now-empty `models/` test package
- adds cases for constructor validation (invalid `deploy_type`, `key` without `deploy_target`), uppercasing of env deploy targets, `__eq__`/`__hash__`/`__repr__`, and a check that `attach_to_pod` doesn't mutate the input pod
- adds `test_k8s_model.py` covering `append_to_pod`: `None` and empty lists return the pod unchanged, and each object receives the previous object's result
- removes both entries from `OVERLOOKED_TESTS`
Tests only. No change to runtime behaviour.
related: #35442
Checks run locally:
- `uv run --project providers/cncf/kubernetes pytest tests/unit/cncf/kubernetes/test_secret.py tests/unit/cncf/kubernetes/test_k8s_model.py`: 19 passed
- `test_project_structure.py::TestProjectStructure::test_providers_modules_should_have_tests`: passed
- `prek run --stage pre-commit` on the changed files (ruff, ruff-format, mypy-devel-common and the other applicable hooks): passed. `ast-grep` was skipped locally because it could not download its Node runtime.
---
##### 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] Add dedicated tests for cncf.kubernetes secret and k8s_model modules [airflow]
Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 merged PR #73751:
URL: https://github.com/apache/airflow/pull/73751
--
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 dedicated tests for cncf.kubernetes secret and k8s_model modules [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #73751:
URL: https://github.com/apache/airflow/pull/73751#issuecomment-5844572421
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 dedicated tests for cncf.kubernetes secret and k8s_model modules [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #73751:
URL: https://github.com/apache/airflow/pull/73751#issuecomment-5847691080
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] Add dedicated tests for cncf.kubernetes secret and k8s_model modules [airflow]
Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 commented on PR #73751:
URL: https://github.com/apache/airflow/pull/73751#issuecomment-5847689327
Welcome to Apache Airflow and thanks for your contribution!
--
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