Skip to content

Expose context.Context #128

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Exca-DK
Copy link
Contributor

@Exca-DK Exca-DK commented Feb 14, 2025

Description

This PR exposes the context.Context parameter, allowing users to have more granular control over request duration management. The changes are minimal and strictly limited to exposing the context.Context without modifying existing logic.

Test Plan

  • Invoke the method with a context.Context that has a timeout.
  • Verify that the request is canceled after the timeout expires.

Related Links

#95

@Exca-DK Exca-DK requested review from gregnazario and a team as code owners February 14, 2025 23:20
Copy link
Contributor

@gregnazario gregnazario left a comment

Choose a reason for hiding this comment

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

Only concern I have here is this is a breaking change on every single function.

Probably requires a major verison change and a changelog update

@gregnazario
Copy link
Contributor

What I will probably do here, is go forward with a second client that takes in the new contexts, and the existing client just wraps it.

This will reduce the breakage, and not require a new entire version

@Exca-DK
Copy link
Contributor Author

Exca-DK commented Mar 25, 2025

I will try to implement the suggested approach over the weekend. Sorry, busy week @gregnazario

@gregnazario
Copy link
Contributor

I will try to implement the suggested approach over the weekend. Sorry, busy week @gregnazario

No worries, I really appreciate all your hard work!

Since, I finally added lints and formatting, I found a lot of bugs I had to fix, and that took precedence over this.

Let me know if you need any help!

@Exca-DK Exca-DK marked this pull request as draft March 30, 2025 16:29
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