-
Notifications
You must be signed in to change notification settings - Fork 2k
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 API support for cancelation contexts passed via QueryOptions and WriteOptions #8836
Conversation
Copy Consul API's format: QueryOptions.WithContext(context) will now return a new QueryOption whose HTTP requests wiill be canceled with the context provided.
@tgross I've replied with rationale for all comments, with that info I will make whatever changes you would like to see just let me know here, thanks! |
Could use some advice on the tests. Before i made the latest updated they apssed, now apparently 445 fail - doesnt seem related but... |
It looks like this is a not-as-rare-as-we'd-like issue we've seen in CI where the test runner gets locked up and times out. I kicked-off the CI job again and the tests pass now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks @benbuzbee for this PR! This is awesome and would have been handy for me in few occasions. Now, I wish we could pass Context for server-to-server RPC communications. |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fixes #8009
Copy Consul API's format: QueryOptions.WithContext(context) will now return a new QueryOption whose HTTP requests will be canceled with the context provided, and the same for WriteOptions