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

fix: add callback close condition #837

Merged
merged 8 commits into from
May 25, 2023

Conversation

hersentino
Copy link
Contributor

In order to solve #836

@hersentino hersentino changed the title Fix: add callback close condition fix: add callback close condition May 22, 2023
${
!useAbortSignal
? `return client.close();`
: `if (!abortSignal || !abortSignal.aborted)
Copy link
Owner

Choose a reason for hiding this comment

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

Ah gotcha; @hersentino it looks like we don't have an integration/ test that generates the !abortSignal || !abortSignal.aborted case? If not, do you mind adding one? Just like copy/paste the grpc-web directory to like grpc-web-abort-signal and add the abort signal flag to parameters.txt I think?

No need to actually have a runtime test suite that covers this behavior, b/c I assume that is hard to test (unless it's easy to test, then feel free! :-), but at least having some generated code checked in that shows this code being generated will help us keep the behavior from regressing.

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it looks like we don't have an integration/ test that generates the !abortSignal || !abortSignal.aborted case?

We have one, it is located in integration/grpc-web-no-streaming-observable, but since it does not contain streaming-observable and my fix is specifically related to streaming, there was no difference when I ran bin2ts.

do you mind adding one?

@stephenh Tell me what you prefer, keeping it in integration/grpc-web-no-streaming-observable or creating a new one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was quick, so I added it

Copy link
Owner

Choose a reason for hiding this comment

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

That's great, thanks @hersentino !

@hersentino hersentino marked this pull request as draft May 24, 2023 08:17
@hersentino hersentino marked this pull request as ready for review May 24, 2023 09:55
@stephenh stephenh merged commit 2071c67 into stephenh:main May 25, 2023
6 checks passed
stephenh pushed a commit that referenced this pull request May 25, 2023
## [1.148.1](v1.148.0...v1.148.1) (2023-05-25)

### Bug Fixes

* add callback close condition ([#837](#837)) ([2071c67](2071c67))
@stephenh
Copy link
Owner

🎉 This PR is included in version 1.148.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants