Commit Graph

267 Commits

Author SHA1 Message Date
Stan Hu 489d24cf7e [ruby] Make `GRPC::DeadlineExceeded` report properly (#33565)
In grpc v1.46.2 and later versions, #29155 caused the Ruby client to return `GRPC::Core::CallError`, a non-standard error, with a message: `grpc_call_start_batch failed with outstanding read or write present (code=8)`. However, the actual error should have been `GRPC::DeadlineExceeded`. This occurred because when `GRPC::DeadlineExceeded` is raised, the `@metadata_received` flag doesn't get flipped. When `receive_and_check_status` runs to determine
the error, the `RECV_INITIAL_METADATA` is erroneously sent again.

To avoid this, flip the flag in an `ensure` block whenever the `RECV_INITIAL_METADATA` op is set.

Closes #33283

Closes #33565

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/33565 from stanhu:sh-ruby-fix-issue-33283 850889558c
PiperOrigin-RevId: 614088694
2024-03-08 17:20:56 -08:00
apolcyn 06d0a6c0fd
[ruby] improve handling for recv_message op failures (#34016)
[ruby] improve handling for recv_message op failures (don't assume recv_message ops won't fail e.g. if the call was cancelled by the peer)
2023-08-10 12:25:29 -07:00
Craig Tiller d410f1d0aa
[surface] Ensure SEND_STATUS & RECV_MESSAGE do not inhabit the same batch (#31554)
Add a check that SEND_STATUS_FROM_SERVER and RECV_MESSAGE are not in the same batch.

This is necessary pre-work for #31204 and implements part of grpc/proposal#336.

Also eliminates fling instead of updating it:

My expectation is nobody has looked at this corner in many years
It's not a benchmark we want: concentrating on a microbenchmark that doesn't include a binding layer caused us to favor designs that emphasized a lightweight core at the expense of a expensive bindings. We should consider the whole.

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2022-11-11 14:18:29 -08:00
apolcyn 6f1dcffef8
ruby: fix a unit test to make sure it always terminates the RPC (#31494) 2022-10-31 10:59:46 -07:00
apolcyn 236953cb2f
ruby: remove tests that try to assert a certain behabior after forking (#31353)
incorrectly
2022-10-17 11:53:17 -07:00
apolcyn 36e820e1f9
Add logs to a ruby test (#30604) 2022-08-17 11:21:24 -07:00
apolcyn b2be531018
make ruby unit tests work on ruby 3 (#30603) 2022-08-17 11:20:53 -07:00
apolcyn c16fa00f94
Fix ruby test flake (#29827) 2022-05-27 15:18:22 -07:00
Esun Kim 47586fb36e
Revert "Revert "Added absl::Status support to error_utils (#27358)" (#27418)" (#27429)
This reverts commit 933676c56c.
2021-09-21 14:42:57 -07:00
Craig Tiller 933676c56c
Revert "Added absl::Status support to error_utils (#27358)" (#27418)
This reverts commit 9b3f75d322.
2021-09-21 09:48:57 -07:00
Esun Kim 9b3f75d322
Added absl::Status support to error_utils (#27358) 2021-09-20 18:03:17 -07:00
Hannah Shi 0fc521067b
Ruby: support for PSM security (#25330)
* support for PSM security, SSL fallback

* Ruby Server, support for PSM security, SSL fallback

* address review comments

* add more tests, address review comments

* add XdsChannelCredentials class for PSM security, ruby client

* XdsServerCredentials

* address review comments

* re-run tools/distrib/clang_format_code.sh

* address comments, add entries to grpc_class_init_test

* fix to pass end2end ci test

* re-run tools/distrib/clang_format_code.sh

* address comments
2021-03-04 13:32:30 -08:00
apolcyn cac3cebe1a
Relax ruby test check on protobuf error message (#25507) 2021-02-19 15:54:06 -08:00
Stanley Cheung 45e41137a8
Replaces disrespectful terms (#25501) 2021-02-19 01:27:17 -08:00
Yash Tibrewal 7c8defd5c9
Merge pull request #25377 from yashykt/removedisrespecfulterm2
Replace disrespectful term
2021-02-10 15:20:27 -08:00
Yash Tibrewal f4e55b85bc Replace disrespectful term 2021-02-08 15:29:53 -08:00
Yash Tibrewal 7a5288d2a0 Replace disrespectful words 2021-02-08 14:29:18 -08:00
Jan Tattermusch a35cd4f89d build protoc artifacts with cmake 2020-12-09 11:54:44 +01:00
Stanley Cheung f873ad04a0
Merge pull request #23765 from HannahShiSFB/issue23672
Ruby: use absolute module name for request/response namespaces
2020-08-14 11:26:14 -07:00
Alexander Polcyn cd13d5ab88 Copy channel args hash before appending ruby user agent 2020-08-13 12:51:45 -07:00
Hannah Shi c8986bc73e use absolute package name, add test cases 2020-08-11 22:52:01 +00:00
Yash Tibrewal d35c1c13cd
Merge pull request #23636 from yashykt/settingsdeadline
Receive SETTINGS frame on clients before declaring subchannel READY
2020-08-03 14:04:02 -07:00
Yash Tibrewal e310d4366c Receive SETTINGS frame on clients before declaring subchannel READY 2020-07-31 02:01:40 -07:00
Alexander Polcyn a12cf6996b Fix ruby segfault on nil optional creds params 2020-07-29 15:26:08 -07:00
Stanley Cheung 0f34ccbfa8 Fix ruby protoc plugin when message is in another package 2020-07-16 14:02:05 -07:00
Alexander Polcyn b88c0a22c7 Fix use-after-free in ruby call creds 2020-06-26 13:26:54 -07:00
apolcyn fed09cbe2c
Merge pull request #20417 from casperisfine/ruby-27-frozen-strings
Fix Ruby 2.7 compatibility in GenericService.underscore
2020-05-14 16:32:28 -07:00
Alexander Polcyn 90f13f08f0 plumb recv_stats_op error_string field up to the ruby surface 2020-05-12 18:23:22 -07:00
Jean Boussier d6bebcd248 Fix Ruby 2.7 compatibility in GenericService.underscore 2020-04-27 12:38:46 +02:00
Oshiumi fc70267f0e Fix generating output with nested resource 2020-04-07 01:51:59 +09:00
jiangtaoli2016 951abee174 Revert "Append old ca.pem"
This reverts commit 13c6b6c612.
2020-03-20 16:49:15 -07:00
jiangtaoli2016 13c6b6c612 Append old ca.pem 2020-03-20 14:48:02 -07:00
jiangtaoli2016 2620763fdd Update test creds for php, python, ruby 2020-03-18 16:48:22 -07:00
tanjunchen 64cdea5a07 fix some spelling mistakes in document 2019-10-04 09:07:35 +08:00
apolcyn 79fc2e5c56
Merge pull request #19939 from blowmage/ruby-struct-status-rb
Define Struct::Status in Ruby
2019-08-15 23:48:21 -07:00
Mike Moore 0f8dced6c4
Define Struct::Status in Ruby
Update error end2end test for loading when calling to_status.
Update error end2end test for loading when calling to_rpc_status.
2019-08-15 17:34:51 -06:00
Joe Bolinger f463965084 Allow :: in ruby_package 2019-08-15 09:45:47 -07:00
Mike Moore 5f30da6dd1
Update variable names in spec 2019-04-22 16:35:07 -06:00
Mike Moore abcdf2d183
Party like its 2015 2019-04-22 16:32:26 -06:00
Mike Moore b47f2048b8
Log ParseError raised in BadStatus#to_rpc_status 2019-04-18 22:26:39 -06:00
Mike Moore 71db662452
Add tests for error methods 2019-04-18 03:01:28 -06:00
ganmacs bd1fdfaabe Return unimplemented
when calling a method which is server_streamer and is not implemented by user
2018-11-25 17:31:53 +09:00
Alexander Polcyn f6e8417627 Move package_options.proto file for ruby test 2018-10-17 19:44:52 -07:00
ganmacs 50c31d18e5 Use logger to suppress output debug output during test 2018-09-19 19:06:46 +09:00
apolcyn a07fcbcc27
Merge pull request #16014 from wework/protobuf/ruby_package
support for ruby_package options
2018-09-14 15:19:21 -07:00
Nick Gordon 3fe2c98877 Updates to the ruby generator for protobuf 3.6.0 changes
test for verifying the ruby_package option
added WeWork to the AUTHORS file
2018-09-14 11:28:24 -04:00
Dylan Thacker-Smith 78f3f44efb ruby: Raise instead of hanging if grpc is used before and after fork 2018-09-13 21:18:30 -04:00
Chris Lamb fba18d8551 Fix a number of spelling errors. 2018-08-22 16:52:46 +01:00
apolcyn 24416c7a19
Merge pull request #15834 from ganmacs/ensure-that-cancelled-server_streamer-call-raise-cancell
GRPC::Cancelled should be occured when calling Enumrable#next on canceled call
2018-06-22 15:27:58 -07:00
ganmacs c1b64e3493 GRPC::Cancelled should be occured when calling Enumrable#next on canceled call 2018-06-23 04:19:28 +09:00