Skip to content
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

Add context for all API interactions #86

Merged
merged 20 commits into from
Oct 4, 2024

Conversation

jamieaitken
Copy link

Hey folks 👋 I've added a context counterpart for all public API functions so that requests will be cancelled if the client cancels.

My reasoning for creating a counterpart instead of changing the existing functions was to avoid breaking changes and as for the approach, I took inspiration from how the standard library dealt with http.NewRequest and http.NewRequestWithContext

@jamieaitken jamieaitken marked this pull request as ready for review August 1, 2023 19:44
@jamieaitken
Copy link
Author

@armando-rodriguez-cko Would you mind having a look at this when you get 10mins please?

@armando-rodriguez-cko
Copy link
Contributor

Thank you @jamieaitken!, we will take a look.

@jamieaitken
Copy link
Author

Hey @armando-rodriguez-cko 👋 Was wondering if you have had time to look over the PR?

@armando-rodriguez-cko
Copy link
Contributor

@jamieaitken we are reviewing, sorry for the delay.

@armando-rodriguez-cko
Copy link
Contributor

Hi @jamieaitken, we are still reviewing.

@AlexCuse
Copy link

AlexCuse commented Aug 21, 2023

This is a great way to support instrumentation on the underlying HTTP client as well, using eg https://github.com/DataDog/dd-trace-go/blob/main/contrib/net/http/roundtripper.go#L120 for datadog

@armando-rodriguez-cko
Copy link
Contributor

Hi @jamieaitken, we are still reviewing. We don't forget it

@jamieaitken
Copy link
Author

Hey @armando-rodriguez-cko 👋 Wondering if you got anywhere with this?

@armando-rodriguez-cko
Copy link
Contributor

We are finishing the review, we are sorry. We will try to finish it in two weeks.

@jamieaitken
Copy link
Author

Hey @armando-rodriguez-cko 👋 Do we still intend to merge this? If not, I can close the PR

@armando-rodriguez-cko
Copy link
Contributor

Hey @armando-rodriguez-cko 👋 Do we still intend to merge this? If not, I can close the PR

I apologise for the big delay, I want to merge it, but I don't have enough time now, but I will make an effort to do that, I am sorry again.

@jamieaitken
Copy link
Author

Hey @armando-rodriguez-cko 👋 Are we any closer to getting this merged? If it's easier, I can limit this PR to only add Context for NAS interactions?

@armando-rodriguez-cko armando-rodriguez-cko changed the base branch from master to beta-context October 4, 2024 07:43
@armando-rodriguez-cko armando-rodriguez-cko merged commit d97d60f into checkout:beta-context Oct 4, 2024
2 of 4 checks passed
@armando-rodriguez-cko
Copy link
Contributor

Hi @jamieaitken , I apologise for the delay, I am merging your branch in a beta branch to test it better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants