Skip to content

Add tests for BaseConfigKeys iteration - #71844

Open
lbbc-lh wants to merge 1 commit into
apache:mainfrom
lbbc-lh:test-base-config-keys
Open

Add tests for BaseConfigKeys iteration#71844
lbbc-lh wants to merge 1 commit into
apache:mainfrom
lbbc-lh:test-base-config-keys

Conversation

@lbbc-lh

@lbbc-lh lbbc-lh commented Aug 19, 2026

Copy link
Copy Markdown

Add a dedicated unit test for BaseConfigKeys.__iter__ and remove the matching OVERLOOKED_TESTS entry. This follows the provider test-module coverage work tracked in #35442.

No runtime behavior changes.

related: #35442

Testing

  • breeze run pytest providers/amazon/tests/unit/amazon/aws/executors/utils/test_base_config_keys.py airflow-core/tests/unit/always/test_project_structure.py::TestProjectStructure::test_providers_modules_should_have_tests -xvs (2 passed)
  • breeze run mypy providers/amazon/tests/unit/amazon/aws/executors/utils/test_base_config_keys.py
  • prek run --from-ref upstream/main --stage pre-commit
  • breeze testing providers-tests --test-type "Providers[amazon]" (4737 passed, 9 skipped)
  • breeze testing core-tests --test-type Always (2020 passed, 66 skipped, 1 xfailed; one unrelated Azure Batch SDK import failure)

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

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


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Drafted-by: Codex (GPT-5.6 Sol); reviewed by @lbbc-lh before posting

@lbbc-lh
lbbc-lh requested a review from o-nikolas as a code owner August 19, 2026 15:21
Copilot AI lite review requested due to automatic review settings August 19, 2026 15:21
@boring-cyborg boring-cyborg Bot added area:providers provider:amazon AWS/Amazon - related issues labels Aug 19, 2026
@boring-cyborg

boring-cyborg Bot commented Aug 19, 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a missing unit test module in the Amazon provider to cover BaseConfigKeys.__iter__, and updates the project-structure “overlooked tests” allowlist accordingly. This supports the ongoing provider test-module coverage effort tracked in #35442 without changing runtime behavior.

Changes:

  • Added a dedicated unit test validating BaseConfigKeys iteration returns the subclass’ non-dunder attribute values.
  • Removed the corresponding path from OVERLOOKED_TESTS now that the module has a real test file.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
providers/amazon/tests/unit/amazon/aws/executors/utils/test_base_config_keys.py New unit test covering BaseConfigKeys.__iter__ behavior.
airflow-core/tests/unit/always/test_project_structure.py Removes the new test file from the OVERLOOKED_TESTS exclusion list.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that this PR was opened in response to Issue #35442 but that is almost 3 years old and may not be relevant anymore.

Also, I am struggling to see the value of this new test. It verifies the implementation of BaseConfigKeys.__iter__ using an artificial subclass, but what user-facing or internal contract relies on iteration returning these values?

Maybe you could see if there are genuine gaps that require test coverage in BaseConfigKeys instead of adding a test for its own sake?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants