Support context propagation without breaking changes#943
Support context propagation without breaking changes#943goccy wants to merge 1 commit intogoogle:masterfrom
Conversation
- To avoid breaking changes, add a type to support context
|
@goccy thanks for taking another look at this. I'm sorry I haven't been able to review the change yet. It's a large change and I haven't had a sufficiently large block of time to review it in the manner it deserves to be. I will try to get to the review in more detail next week. |
|
@goccy I think I'm going to revive #368 as it will have fewer impacts and potential for breakages while still giving you most of what you want. The difference is that the implementation won't block on concurrent calls unless it needs to, instead iterating through calls in batches and re-evaluating. It's a definite overhead, but the highest cost should be the I/O rather than the repeated evaluation. |
|
@TristonianJones Thank you for your reply. But Unfortunately, we are looking for the capability to propagate context.Context synchronously, not through asynchronous functions. Therefore, we believe ContextEval is the most suitable API for this purpose. |
|
Hi @goccy, I'll use |
|
@TristonianJones I understand ! It seems to be what I expected if it's just a difference in implementation. Thank you! |
This PR is related to #925 .
First of all, thank you for the review the other day.
As suggested, I tried to avoid changing the public interface and instead added new types to support it. Although there are many changes, as you can see from the test code, I added the functionality without altering the existing behavior 🎉
Additionally, during the changes, it was unnecessary to pass context.Context to
AddQualifierContext/QualifyContext/QualifyIfPresentContext, so if there are any issues, it's possible to revert these to use the original types. Please let me know your thoughts.Pull Requests Guidelines
See CONTRIBUTING.md for more details about when to create
a GitHub Pull Request and when other kinds of contributions or
consultation might be more desirable.
When creating a new pull request, please fork the repo and work within a
development branch.
Commit Messages
Reviews
Merging
they have write access. Otherwise, the change will be merged by a maintainer.
closes #<issue-num>: descriptionin the merge message,if applicable.