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

Be more resilient to broken deployments #460

Merged
merged 10 commits into from
Mar 22, 2021
Merged

Be more resilient to broken deployments #460

merged 10 commits into from
Mar 22, 2021

Conversation

LeFrosch
Copy link
Contributor

If there is no grpc-status found in the header, I try to convert the http status into the corresponding grpc status. For the conversion I used the fromHttpStatus function from this as a template.
This fixes the issue I had here #421

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 18, 2021

CLA Signed

The committers are authorized under a signed CLA.

Copy link
Member

@mraleph mraleph left a comment

Choose a reason for hiding this comment

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

This looks good. Thank you for taking time to make a PR.

I have made few suggestions how to make it a bit more robust.

Please consider also adding at least few tests to make sure we don't regress this, but it's also okay to skip that.

lib/src/client/call.dart Outdated Show resolved Hide resolved
lib/src/client/call.dart Outdated Show resolved Hide resolved
lib/src/client/call.dart Outdated Show resolved Hide resolved
lib/src/shared/status.dart Show resolved Hide resolved
test/src/client_utils.dart Outdated Show resolved Hide resolved
@mraleph
Copy link
Member

mraleph commented Mar 19, 2021

@LeFrosch okay, so I have spent some time today figuring how the best structure these checks. I think I have arrived to a good approach at the end and pushed some changes into your repo.

But now I have made so many changes myself, that I should not be the one reviewing this code. I am going to ask @mkustermann to take a look on Monday and then once he approves I will land the code.

@mraleph mraleph requested a review from mkustermann March 19, 2021 23:43
@LeFrosch
Copy link
Contributor Author

@mraleph Thanks a lot for the help and effort :)

lib/src/shared/status.dart Outdated Show resolved Hide resolved
lib/src/shared/streams.dart Show resolved Hide resolved
test/src/client_utils.dart Show resolved Hide resolved
lib/src/shared/status.dart Show resolved Hide resolved
test/grpc_web_test.dart Show resolved Hide resolved
test/grpc_web_server.dart Outdated Show resolved Hide resolved
test/grpc_web_server.dart Outdated Show resolved Hide resolved
test/client_tests/client_test.dart Outdated Show resolved Hide resolved
@mraleph
Copy link
Member

mraleph commented Mar 22, 2021

Thanks for taking a look @mkustermann. Waiting for tests to go green and then will land.

@mraleph mraleph changed the title Convert http status to grpc status if no grpc-status header exists Be more resilient to broken deployments Mar 22, 2021
@mraleph mraleph merged commit 6c16fce into grpc:master Mar 22, 2021
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.

3 participants