-
Notifications
You must be signed in to change notification settings - Fork 349
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
feat: implementation of useAbortSignal option for grpc-web #777
Conversation
I'm trying to figure out why |
Hi @hersentino , thanks for the PR! I think this looks great!
Ah yeah, sorry for not replying sooner but oddly enough CircleCL will cancel all jobs once the first one fails, so a lot of times the issue will look (say) specific to the 16.x build, but really it just happened to fail first, and the issue does actually exist in all versions of node. I think your changes look good; as a regression test, can you find an example |
Fwiw @hersentino I think landing this PR is still great; but when I went to google "improbable-eng abort signal" to sanity check how it works, and I came across nice-grpc-web: https://www.npmjs.com/package/nice-grpc-web Which is a sister project/built on top of ts-proto. I was scanning their impl and nothing stuck out as me as something we should borrow/replicate for your PR: Which is cool, we can ship your PR as-is, but just thought I'd mention it, since they are actively using ts-proto + grpc-web, it might be worth checking out. |
I chose |
It seems to be handle here execute. They don't use the |
I'm sorry @stephenh I forgot to ping you |
UserSettings(request: DeepPartial<Empty>, metadata?: grpc.Metadata): Observable<DashUserSettingsState>; | ||
UserSettings( | ||
request: DeepPartial<Empty>, | ||
abortSignal?: AbortSignal, |
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.
@hersentino this seems fine, but it's probably a breaking API change to current codes that are passing foo.UserSettings(request, metadata)
?
Can we push the abortSignal
last so that it's not a breaking change?
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.
@hersentino looks great! Thanks! |
🎉 This PR is included in version 1.140.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
#731 introduces the
useAbortSignal
option but it's currently not implemented for grpc-web.This PR add useAbortSignal for grpc-web, fully working with unary/invoke