Skip to content

Use non-deprecated user_agent_entry param in DatabricksSqlHook - #72103

Merged
eladkal merged 1 commit into
apache:mainfrom
peloyeje:fix/databricks-sql-hook-user-agent-entry
Sep 9, 2026
Merged

eladkal merged 1 commit into
apache:mainfrom
peloyeje:fix/databricks-sql-hook-user-agent-entry

Conversation

@peloyeje

Copy link
Copy Markdown
Contributor

closes: #72102

databricks-sql-connector's Session renamed _user_agent_entry to
user_agent_entry and only keeps the old name for backward compatibility,
logging a deprecation warning on every connection opened through
DatabricksSqlHook.get_conn(). This switches the hook to the current
parameter name.

No behavior change: user_agent_entry is supported by every
databricks-sql-connector version this provider currently allows
(>=4.4.0).

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

@potiuk
potiuk force-pushed the fix/databricks-sql-hook-user-agent-entry branch from f9f08e0 to c569929 Compare August 27, 2026 10:23
@eladkal

eladkal commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

cc @moomindani for Databricks review

@moomindani moomindani 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.

LGTM — approving.

Checked the part that actually decides whether this is safe, namely whether the new spelling exists at the provider's declared connector floor. In databricks-sql-connector v4.3.0 and v4.4.0, Session.__init__ reads kwargs.get("user_agent_entry") first and only falls back to _user_agent_entry, emitting the deprecation warning you describe when it has to. This provider requires databricks-sql-connector>=4.4.0 (pyproject.toml:66), so every version it can install accepts the new name — the change cannot silently drop the user-agent entry on a supported connector.

Also confirmed this was the only occurrence: _user_agent_entry appears exactly once in the provider, at the line you changed, and no test asserts the kwarg name, so nothing else needs updating.


Drafted-by: Claude Code (Opus 5); reviewed by @moomindani before posting

databricks-sql-connector renamed _user_agent_entry to user_agent_entry
and only keeps the old name for backward compatibility, logging a
deprecation warning on every connection opened through
DatabricksSqlHook.get_conn(). Pass the current parameter name instead.
@eladkal
eladkal force-pushed the fix/databricks-sql-hook-user-agent-entry branch from c569929 to 3de2506 Compare August 29, 2026 23:34
@eladkal
eladkal merged commit e90b59d into apache:main Sep 9, 2026
83 checks passed
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Sep 11, 2026
…e#72103)

databricks-sql-connector renamed _user_agent_entry to user_agent_entry
and only keeps the old name for backward compatibility, logging a
deprecation warning on every connection opened through
DatabricksSqlHook.get_conn(). Pass the current parameter name instead.
xvega pushed a commit to xvega/airflow that referenced this pull request Sep 13, 2026
…e#72103)

databricks-sql-connector renamed _user_agent_entry to user_agent_entry
and only keeps the old name for backward compatibility, logging a
deprecation warning on every connection opened through
DatabricksSqlHook.get_conn(). Pass the current parameter name instead.
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.

DatabricksSqlHook.get_conn() passes deprecated _user_agent_entry to databricks-sql-connector

4 participants