Skip to content

feat(PECOBLR-2328): bump databricks-sql-connector upper bound to <4.1.6#1363

Merged
sd-db merged 9 commits intomainfrom
feature/retry-server-directed-only
Apr 16, 2026
Merged

feat(PECOBLR-2328): bump databricks-sql-connector upper bound to <4.1.6#1363
sd-db merged 9 commits intomainfrom
feature/retry-server-directed-only

Conversation

@tejassp-db
Copy link
Copy Markdown
Collaborator

@tejassp-db tejassp-db commented Mar 24, 2026

Summary

  • Bumps databricks-sql-connector upper bound from <4.1.4 to <4.1.6, allowing users to install connector 4.1.5
  • Connector 4.1.5 introduced _respect_server_retry_after_header, which users can now opt into via connection_parameters in profiles.yml

Context

Customers using use_materialization_v2: true experience duplicate rows when the server returns HTTP 503 after already committing an INSERT. The connector blindly retries, causing data to be written twice. With _respect_server_retry_after_header: true, retries only occur when the server explicitly sends a Retry-After header, preventing duplicate writes from infrastructure-level 503s.

Test plan

  • All 744 unit tests pass (hatch run unit)
  • E2E verification with a dummy dbt project against UC SQL endpoint:
    • dbt debug + dbt run succeed with default profile (connector default False applied)
    • dbt debug + dbt run succeed with _respect_server_retry_after_header: true explicitly set

Bump databricks-sql-connector to >=4.1.5 and expose the new
_retry_server_directed_only parameter (default: false) to prevent
duplicate writes caused by blind 503 retries on ExecuteStatement.

Users can opt in via connection_parameters in profiles.yml.

PECOBLR-2328

Co-authored-by: Isaac
Co-authored-by: Isaac
@tejassp-db tejassp-db changed the title [PECOBLR-2328] feat: add _retry_server_directed_only connection parameter default feat(PECOBLR-2328): add _retry_server_directed_only connection parameter default Mar 24, 2026
Comment thread pyproject.toml Outdated
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2026

Coverage report

This PR does not seem to contain any modification to coverable code.

@sd-db sd-db changed the title feat(PECOBLR-2328): add _retry_server_directed_only connection parameter default feat(PECOBLR-2328): add _retry_server_directed_only connection parameter Apr 14, 2026
Copy link
Copy Markdown
Collaborator

@sd-db sd-db left a comment

Choose a reason for hiding this comment

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

Let us also update the CHANGELOG.md to list that we are updating the python-sql-connector dependency

Comment thread pyproject.toml Outdated
sd-db added 2 commits April 17, 2026 00:54
…eader

The connector already defaults this parameter to False, so the
setdefault in credentials.py was redundant. Users opt in via
connection_parameters directly. Also fix the parameter name (was
renamed during connector PR review) and tighten upper bound to <4.1.6.

Co-authored-by: Isaac
Comment thread dbt/adapters/databricks/credentials.py Outdated
@sd-db sd-db changed the title feat(PECOBLR-2328): add _retry_server_directed_only connection parameter feat(PECOBLR-2328): bump databricks-sql-connector upper bound to <4.1.6 Apr 16, 2026
@sd-db sd-db changed the title feat(PECOBLR-2328): bump databricks-sql-connector upper bound to <4.1.6 feat(PECOBLR-2328): bump databricks-sql-connector upper bound to <4.1.6 + QoL Changes Apr 16, 2026
@sd-db sd-db changed the title feat(PECOBLR-2328): bump databricks-sql-connector upper bound to <4.1.6 + QoL Changes feat(PECOBLR-2328): bump databricks-sql-connector upper bound to <4.1.6 Apr 16, 2026
sd-db added 2 commits April 17, 2026 01:31
The TestDatabricksCredentialsPreDeserialize tests covered pre-existing
setdefaults (_retry_stop_after_attempts_count, _retry_delay_max) that
this PR does not modify, making them out of scope.

Co-authored-by: Isaac
sd-db
sd-db previously approved these changes Apr 16, 2026
@sd-db sd-db merged commit 482c5f8 into main Apr 16, 2026
10 checks passed
@sd-db sd-db deleted the feature/retry-server-directed-only branch April 16, 2026 22:13
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