Skip to content

Show clear error for invalid sql_alchemy_conn at startup#68783

Open
GayathriSrividya wants to merge 1 commit into
apache:mainfrom
GayathriSrividya:fix/invalid-sqlalchemy-uri-help-cli-68707
Open

Show clear error for invalid sql_alchemy_conn at startup#68783
GayathriSrividya wants to merge 1 commit into
apache:mainfrom
GayathriSrividya:fix/invalid-sqlalchemy-uri-help-cli-68707

Conversation

@GayathriSrividya

@GayathriSrividya GayathriSrividya commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

This improves startup diagnostics when database connection configuration is malformed.

Context: this came from investigation in the discussion thread about slow CLI/help startup and the confusing unpacking traceback:
#68707

_get_async_conn_uri_from_sync now validates malformed/empty sync URIs and raises a clear, actionable error message that points users to AIRFLOW__DATABASE__SQL_ALCHEMY_CONN / sql_alchemy_conn in airflow.cfg, instead of failing with a cryptic unpacking error.

Changes in this PR:

  1. Add validation for malformed sync SQLAlchemy URI input in startup path.
  2. Raise a clearer ValueError with direct guidance to relevant config knobs.
  3. Add focused unit tests for:
  • valid URI conversions to async driver schemes
  • unsupported schemes passthrough
  • malformed/empty input behavior and error messaging

Discussion reference:

Users can hit a cryptic unpacking ValueError when sql_alchemy_conn is malformed, especially while diagnosing slow CLI startup in constrained environments. A clearer validation path makes misconfiguration immediately actionable and reduces support/debugging churn.
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.

1 participant