Skip to content

refactor: remove signin/signout and basic auth from write client#215

Merged
NguyenHoangSon96 merged 1 commit into
mainfrom
refactor/write-services
Jun 5, 2026
Merged

refactor: remove signin/signout and basic auth from write client#215
NguyenHoangSon96 merged 1 commit into
mainfrom
refactor/write-services

Conversation

@NguyenHoangSon96
Copy link
Copy Markdown
Contributor

@NguyenHoangSon96 NguyenHoangSon96 commented Jun 4, 2026

Closes #214

Proposed Changes

  • Remove cookie/session-based signin/signout support from the write client.
  • Remove SignoutService and SigninService.
  • Remove basic authentication with username and password.

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 4, 2026
Copilot AI review requested due to automatic review settings June 4, 2026 06:10
Copy link
Copy Markdown

Copilot AI 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 removes the generated SigninService/SignoutService OpenAPI client surfaces and the associated session-cookie management logic from the write client, leaving only WriteService as the exposed service.

Changes:

  • Delete signin_service.py and signout_service.py and stop re-exporting them from package/service/client __init__.py modules.
  • Remove session-cookie lifecycle helpers from write_client/rest.py.
  • Refactor _sync/api_client.py to drop cookie handling and sign-in/sign-out behavior (but currently leaves a broken import that must be fixed).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
influxdb_client_3/write_client/service/signout_service.py Deleted the generated signout service API module.
influxdb_client_3/write_client/service/signin_service.py Deleted the generated signin service API module.
influxdb_client_3/write_client/service/init.py Stops exporting SigninService/SignoutService; exports WriteService only.
influxdb_client_3/write_client/rest.py Removes user-session helper functions related to signin/signout cookie handling.
influxdb_client_3/write_client/client/write/init.py Stops re-exporting SigninService/SignoutService from the write client package.
influxdb_client_3/write_client/client/init.py Stops re-exporting SigninService/SignoutService from the client package.
influxdb_client_3/write_client/_sync/api_client.py Removes cookie parameter/storage and sign-in/sign-out behavior, but currently retains an import of removed helpers.
influxdb_client_3/write_client/init.py Stops re-exporting SigninService/SignoutService at the package level.

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

Comment thread influxdb_client_3/write_client/_sync/api_client.py Outdated
Comment thread influxdb_client_3/write_client/__init__.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.90%. Comparing base (665d998) to head (b55fb6a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
+ Coverage   77.65%   78.90%   +1.24%     
==========================================
  Files          38       36       -2     
  Lines        2721     2607     -114     
==========================================
- Hits         2113     2057      -56     
+ Misses        608      550      -58     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI 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

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

Comment thread influxdb_client_3/write_client/_sync/api_client.py
Comment thread influxdb_client_3/write_client/_sync/api_client.py
Comment thread influxdb_client_3/write_client/__init__.py
Copy link
Copy Markdown

Copilot AI 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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread influxdb_client_3/write_client/client/_base.py Outdated
Copy link
Copy Markdown

Copilot AI 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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread influxdb_client_3/write_client/client/_base.py
Copy link
Copy Markdown

Copilot AI 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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread influxdb_client_3/write_client/client/_base.py
Copy link
Copy Markdown

Copilot AI 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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

influxdb_client_3/write_client/client/_base.py:72

  • auth_basic / username / password support appears to have been removed, but passing these kwargs will now be silently ignored, which can lead to confusing auth failures for existing consumers (especially since InfluxDBClient3 forwards **kwargs into the write client). Consider explicitly rejecting these removed options (or emitting a clear deprecation/error) so users fail fast with actionable guidance.
        # defaults
        self.auth_header_name = None
        self.auth_header_value = None
        # by token
        if token:

Comment thread influxdb_client_3/write_client/__init__.py
Comment thread influxdb_client_3/write_client/_sync/api_client.py
Copy link
Copy Markdown

Copilot AI 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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread influxdb_client_3/write_client/client/_base.py
Comment thread CHANGELOG.md Outdated
Copy link
Copy Markdown

Copilot AI 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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread influxdb_client_3/write_client/client/_base.py
Copy link
Copy Markdown

Copilot AI 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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

influxdb_client_3/write_client/client/_base.py:72

  • Removed auth modes (auth_basic and username/password) are now silently ignored if a caller still passes them via **kwargs, which can lead to confusing, unauthenticated requests. Since this PR removes support, it would be safer to fail fast with a clear ValueError when these kwargs are provided (non-empty/true).
        # defaults
        self.auth_header_name = None
        self.auth_header_value = None
        # by token
        if token:

Comment thread influxdb_client_3/write_client/client/_base.py
Comment thread influxdb_client_3/write_client/client/_base.py
@alespour
Copy link
Copy Markdown
Contributor

alespour commented Jun 4, 2026

LGTM except for the title 😃

@NguyenHoangSon96
Copy link
Copy Markdown
Contributor Author

LGTM except for the title 😃

My bad... forgot to change it 😹

@NguyenHoangSon96 NguyenHoangSon96 changed the title refactor: wip refactor: refactoring write services Jun 4, 2026
@alespour
Copy link
Copy Markdown
Contributor

alespour commented Jun 4, 2026

may I suggest something more descriptive, such as

refactor: remove signin/signout and basic auth from write client

@NguyenHoangSon96 NguyenHoangSon96 changed the title refactor: refactoring write services refactor: remove signin/signout and basic auth from write client Jun 4, 2026
@NguyenHoangSon96
Copy link
Copy Markdown
Contributor Author

may I suggest something more descriptive, such as

refactor: remove signin/signout and basic auth from write client

Done

Copy link
Copy Markdown
Contributor

@alespour alespour left a comment

Choose a reason for hiding this comment

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

Looks good!

@NguyenHoangSon96 NguyenHoangSon96 merged commit 9556a0c into main Jun 5, 2026
18 checks passed
@NguyenHoangSon96 NguyenHoangSon96 deleted the refactor/write-services branch June 5, 2026 06:09
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.

Remove legacy v2 signin/signout session services from influxdb3-python

3 participants