Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor codebase to use a unified http client#673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vikrantpuppala merged 16 commits intomainfromhttp-client-refactor-2
Aug 13, 2025

Conversation

@vikrantpuppala
Copy link
Contributor

@vikrantpuppalavikrantpuppala commentedAug 8, 2025
edited
Loading

What type of PR is this?

  • Refactor
  • Feature
  • Bug Fix
  • Other

Description

This PR refactors the codebase to use a unified HTTP client across all HTTP operations in the Databricks SQL connector. The primary purpose is to consolidate HTTP client usage, eliminating various singleton HTTP clients and direct requests library usage in favor of a single UnifiedHttpClient based on urllib3.

Key changes:

  • Introduced UnifiedHttpClient class that provides a centralized HTTP client with retry policies, connection pooling, SSL support, and proxy support
  • Removed singleton HTTP clients (DatabricksHttpClient, TelemetryHttpClient) and replaced direct requests usage
  • Updated all components (auth, telemetry, staging operations, cloud fetch, feature flags) to use the unified client

How is this tested?

  • Unit tests
  • E2E Tests
  • Manually tested auth flows
  • N/A

Related Tickets & Documents

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the codebase to use a unified HTTP client across all HTTP operations in the Databricks SQL connector. The primary purpose is to consolidate HTTP client usage, eliminating various singleton HTTP clients and directrequests library usage in favor of a singleUnifiedHttpClient based on urllib3.

Key changes:

  • IntroducedUnifiedHttpClient class that provides a centralized HTTP client with retry policies, connection pooling, SSL support, and proxy support
  • Removed singleton HTTP clients (DatabricksHttpClient,TelemetryHttpClient) and replaced directrequests usage
  • Updated all components (auth, telemetry, staging operations, cloud fetch, feature flags) to use the unified client

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 4 comments.

Show a summary per file
FileDescription
src/databricks/sql/common/unified_http_client.pyNew unified HTTP client implementation using urllib3
src/databricks/sql/client.pyUpdated to create and use unified HTTP client, replaced direct requests usage
src/databricks/sql/session.pyModified to accept and use unified HTTP client
src/databricks/sql/common/http.pyRemoved singleton HTTP client classes
src/databricks/sql/auth/*.pyUpdated auth providers to use unified HTTP client
src/databricks/sql/telemetry/telemetry_client.pyRefactored to use unified client with singleton pattern
tests/unit/*.pyUpdated tests to mock unified HTTP client

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Copy link
Contributor

@jprakash-dbjprakash-db left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for making the changes

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
@vikrantpuppalavikrantpuppala merged commitd3df719 intomainAug 13, 2025
24 of 25 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@jprakash-dbjprakash-dbjprakash-db approved these changes

@jayantsing-dbjayantsing-dbAwaiting requested review from jayantsing-db

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@vikrantpuppala@jprakash-db

[8]ページ先頭

©2009-2025 Movatter.jp