Skip to content

Fix async database engine setup for cockroachdb connection URIs#69260

Open
viragtripathi wants to merge 1 commit into
apache:mainfrom
viragtripathi:async-driver-map-cockroachdb
Open

Fix async database engine setup for cockroachdb connection URIs#69260
viragtripathi wants to merge 1 commit into
apache:mainfrom
viragtripathi:async-driver-map-cockroachdb

Conversation

@viragtripathi

Copy link
Copy Markdown

SQLAlchemy's registered cockroachdb dialect speaks the PostgreSQL wire protocol and uses asyncpg as its async driver. Airflow 3.x derives the async connection URI from the sync one via AIO_LIBS_MAPPING in settings.py; because cockroachdb is not in that map, startup fails with "The loaded 'psycopg2' is not async" unless the user hand-writes
sql_alchemy_conn_async. This adds the one mapping entry and a parametrized test for the derivation function, which previously had no direct coverage.

Discussed on the devlist:
https://lists.apache.org/thread/t6jo4th3sn23jmr34m6gcxzw4k8mo4pc


Was generative AI tooling used to co-author this PR?
  • Yes - Claude Code

Generated-by: Claude Code following the guidelines

@boring-cyborg

boring-cyborg Bot commented Jul 2, 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

@ashb ashb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Putting a temporary hold while we decide what we want to do -- see https://lists.apache.org/thread/qt7ohpwop8jgos1o8fszl4rv1ddkpz6v

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants