Skip to content

Comments

[pull] main from SwanHubX:main#167

Merged
pull[bot] merged 1 commit intoxj63:mainfrom
SwanHubX:main
Jan 19, 2026
Merged

[pull] main from SwanHubX:main#167
pull[bot] merged 1 commit intoxj63:mainfrom
SwanHubX:main

Conversation

@pull
Copy link

@pull pull bot commented Jan 19, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* able to modify session retry_times (disable the adapter when retries=0)

- Temporarily modify the retry count in the adapter by injecting the request count into the request headers.

* add unit_test for custom session retries

* add comment

* fix bug occurs in TimeoutHTTPAdapter when timeout=None

* handle ValueError caused by int(_retry)

- simplified some code in SwanSession

* Add retries parameter to client HTTP methods

Refactored Client to use SessionWithRetry and updated HTTP method signatures to accept an optional retries parameter. Overrode method signatures in SessionWithRetry to support retries and updated batch uploader to explicitly set retries to 0 for metric tracing. This improves control over request retry behavior.

* Validate retry count in TimeoutHTTPAdapter

Added a check to ensure the retry count is a non-negative integer in TimeoutHTTPAdapter. Updated error messages for clarity and added a unit test to verify ValueError is raised for invalid retry values.

---------

Co-authored-by: Kang Li <cunykang@gmail.com>
@pull pull bot locked and limited conversation to collaborators Jan 19, 2026
@pull pull bot added the ⤵️ pull label Jan 19, 2026
@pull pull bot merged commit 628ab4a into xj63:main Jan 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant