dabla opened a new pull request, #74454: URL: https://github.com/apache/airflow/pull/74454
`AdbcHook.uri` handed the driver Airflow's connection URI with the scheme swapped for the dialect. That URI carries the extras in its query string, so any connection with the `dialect` extra (needed to derive the driver name) produced `postgresql://user:pass@host/db?dialect=postgresql`, which libpq refuses: ``` OperationalError: IO: [libpq] Failed to connect: invalid URI query parameter: "dialect" ``` A full URI in the Host field, as the connection docs describe, was percent-encoded into the path for the same reason (`postgresql://postgresql%3A%2F%2Fuser...`); only hosts containing `::` went through unchanged. In practice the released 0.1.0 hook could not reach PostgreSQL without repeating the URI, password included, in `db_kwargs`. This PR: - passes a Host that already is a URI or a path through unchanged (`://`, `::`, or starting with `/`, `:` or `file:`), and otherwise builds `<dialect>://login:password@host:port/schema` from the connection's fields, never from `get_uri()`; - stops hiding Port and Schema in the connection form, since they take part in that URI, and gives the fields placeholders; - updates the connection docs for the two ways of filling the form; - adds `test_uri` covering the built URI, extras staying out of it, a URI in Host, and the SQLite in-memory and file forms. Verified against a PostgreSQL 16 with adbc-driver-postgresql 1.12.0: the built URI connects, the previous one fails as quoted above. <!-- Please keep an empty line above the dashes. --> --- **^ Add meaningful description above** Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
