Skip to content

Remove the dead cloudant_fake module - #72847

Closed
jabrailkhalil wants to merge 1 commit into
apache:mainfrom
jabrailkhalil:remove-dead-cloudant-fake
Closed

jabrailkhalil wants to merge 1 commit into
apache:mainfrom
jabrailkhalil:remove-dead-cloudant-fake

Conversation

@jabrailkhalil

Copy link
Copy Markdown

Summary

providers/cloudant/src/airflow/providers/cloudant/cloudant_fake.py is dead code: it defined two no-op stand-ins (CloudantV1, CouchDbSessionAuthenticator) for the conditional import fallback that was needed while ibmcloudant was excluded on Python 3.9. PR #52072 dropped Python 3.9 support, removed the version guard and the excluded-python-versions block, and the hook now imports both classes directly from ibmcloudant. The stub module was left behind.

A repository-wide search finds no import of airflow.providers.cloudant.cloudant_fake in any source, test, or configuration file; its only remaining reference was its own OVERLOOKED_TESTS entry.

Changes

  • Delete providers/cloudant/src/airflow/providers/cloudant/cloudant_fake.py.
  • Remove the providers/cloudant/tests/unit/cloudant/test_cloudant_fake.py entry from OVERLOOKED_TESTS in airflow-core/tests/unit/always/test_project_structure.py.

Verification

  • grep -r cloudant_fake across the repository: only the allowlist entry existed (now removed).
  • pytest airflow-core/tests/unit/always/test_project_structure.py -k TestProjectStructure --confcutdir=... : 3 passed, including test_providers_modules_should_have_tests (the allowlist check).
  • The full test_project_structure.py run has 1 pre-existing failure unrelated to this change: TestDockerProviderProjectStructure::test_missing_examples raises UnicodeDecodeError on Windows (python reads a provider file with the default cp1251 codec; no encoding is specified in the test). It also fails on a clean checkout on this platform.

No newsfragment is needed: no user-visible behavior changes (internal dead module removed, test-allowlist cleanup).

Fixes #72269

@boring-cyborg

boring-cyborg Bot commented Sep 9, 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

@jabrailkhalil
jabrailkhalil force-pushed the remove-dead-cloudant-fake branch from 5c182e2 to 1497132 Compare September 10, 2026 12:28
cloudant_fake.py provided CloudantV1 and CouchDbSessionAuthenticator
stand-ins for the conditional import fallback used while ibmcloudant was
excluded on Python 3.9. PR apache#52072 dropped Python 3.9 support and removed
the version guard, leaving the hook importing both classes directly from
ibmcloudant.

Delete the unused module and its OVERLOOKED_TESTS entry. Rebase the
cleanup onto current main without changing unrelated provider entries.

Fixes apache#72269

Signed-off-by: jabrailkhalil <jabrailkhalil@gmail.com>
@jabrailkhalil
jabrailkhalil force-pushed the remove-dead-cloudant-fake branch from 1497132 to 9aaab8a Compare September 10, 2026 17:45
@jabrailkhalil

Copy link
Copy Markdown
Author

The CI workflows for the current head 9aaab8ae72 are waiting for contributor workflow approval (action_required): Tests (AMD), CodeQL, Check newsfragment PR number. Could a maintainer approve the pending runs when convenient? These runs have not executed their checks yet; I will address any failures once they run.

@shahar1

shahar1 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!
As #72457 preceeded this PR and solves this issue the exact same way - I'll merge the former.
Feel free to solve other open issues.

@shahar1 shahar1 closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the dead cloudant_fake module, or add its missing tests

2 participants