Skip to content

refactor: rest client#217

Draft
NguyenHoangSon96 wants to merge 2 commits into
mainfrom
refactor/rest-client
Draft

refactor: rest client#217
NguyenHoangSon96 wants to merge 2 commits into
mainfrom
refactor/rest-client

Conversation

@NguyenHoangSon96

Copy link
Copy Markdown
Contributor

Closes #

Proposed Changes

Briefly describe your proposed changes:

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@NguyenHoangSon96 NguyenHoangSon96 self-assigned this Jun 12, 2026
Copilot AI review requested due to automatic review settings June 12, 2026 15:16

Copilot AI left a comment

Copy link
Copy Markdown

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 write path to use a new synchronous RestClient (urllib3-based) instead of the previous generated client/write service wiring, and updates InfluxDBClient3 construction accordingly.

Changes:

  • Refactors WriteApi to issue HTTP requests via a new RestClient, adds gzip decision/compression utilities, and adds endpoint/exception translation logic.
  • Introduces influxdb_client_3/write_client/_sync/rest_client.py to encapsulate urllib3 request/response handling.
  • Updates InfluxDBClient3 initialization to pass write connection details (base_url/auth/gzip) directly into WriteApi.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 15 comments.

File Description
influxdb_client_3/write_client/client/write_api.py Major refactor of write implementation to use a new REST client and custom request building/serialization paths.
influxdb_client_3/write_client/_sync/rest_client.py Adds a new urllib3-based synchronous REST client abstraction used by WriteApi.
influxdb_client_3/__init__.py Wires new write API constructor parameters (auth/gzip/base_url) and updates public kwargs documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread influxdb_client_3/write_client/client/write_api.py Outdated
Comment thread influxdb_client_3/write_client/client/write_api.py Outdated
Comment thread influxdb_client_3/write_client/client/write_api.py Outdated
Comment thread influxdb_client_3/write_client/client/write_api.py Outdated
Comment thread influxdb_client_3/write_client/client/write_api.py Outdated
Comment thread influxdb_client_3/write_client/_sync/rest_client.py
Comment thread influxdb_client_3/__init__.py
Comment thread influxdb_client_3/write_client/client/write_api.py Outdated
Comment thread influxdb_client_3/write_client/client/write_api.py Outdated
Comment thread influxdb_client_3/write_client/client/write_api.py Outdated
@NguyenHoangSon96 NguyenHoangSon96 marked this pull request as draft June 16, 2026 11:15
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