Commit Graph

1857 Commits

Author SHA1 Message Date
Esun Kim cf444b9cab Regenerate projects 2019-09-10 14:08:50 -07:00
Esun Kim c965ca1494 Pull out configuration from ssl_utils 2019-09-09 11:18:17 -07:00
Mark D. Roth 21c5424477 Add API for accessing per-call backend metric data in LB policies. 2019-08-28 12:48:06 -07:00
Lidi Zheng e25e7c921d
Merge pull request #19971 from lidizheng/local
Expose local credentials on Python layer
2019-08-23 10:05:42 -07:00
Lidi Zheng f8624d356f
Merge pull request #20013 from lidizheng/vtable-heap
Make default vtable for pointer argumnet a constant
2019-08-20 16:28:01 -07:00
Lidi Zheng 25f21d4824 Make default vtable for pointer argumnet a constant 2019-08-20 15:42:27 -07:00
Richard Belleville ee99f9aa4c Remove TODO 2019-08-20 14:25:14 -07:00
Richard Belleville 09a270d6ad Gracefully handle errors from callbacks.
In https://github.com/grpc/grpc/issues/19910, it was pointed out that
raising an exception from a Future callback would cause the channel spin
thread to terminate. If there are outstanding events on the channel,
this will cause calls to Channel.close() to block indefinitely.

This commit ensures that the channel spin thread does not die. Instead,
exceptions will be logged at ERROR level.
2019-08-20 14:17:38 -07:00
Richard Belleville 967f55efd6 Add explanatory comment. 2019-08-19 14:20:01 -07:00
Richard Belleville ca2fcd647a Add docstring 2019-08-19 13:36:53 -07:00
Richard Belleville 4f04a80a69 Add note about something seemingly suspect. 2019-08-19 13:27:56 -07:00
Richard Belleville 2a9998bc13 Properly handle exceptions in signal handlers for in-flight outgoing RPCs 2019-08-19 13:19:04 -07:00
Lidi Zheng c45fb12ffb Add experimental API note. 2019-08-16 17:33:19 -07:00
Lidi Zheng 227a7cb47b Adopt reviewer's suggestion 2019-08-16 15:43:06 -07:00
Juanli Shen a802b14be6 Add xds resolver 2019-08-16 15:09:32 -07:00
Lidi Zheng 40fe76ad30 Fix import 2019-08-16 14:17:05 -07:00
Lidi Zheng 0d203d39b8 Adopt reviewers' advice 2019-08-16 11:17:35 -07:00
Lidi Zheng f681fe89af Make yapf happy 2019-08-15 20:16:01 -07:00
Lidi Zheng 5db1ae34b4 Expose local credentials on Python layer 2019-08-15 20:13:39 -07:00
Esun Kim be4e684a82 Migrated tsi/alts from nanopb to upb 2019-08-08 16:39:05 -07:00
Juanli Shen 79f191114e Use EDS in xds LB policy 2019-08-07 22:43:45 -07:00
Richard Belleville 835786a476
Merge pull request #19822 from gnossen/py_proto_library
Separate py_grpc_library and py_proto_library.
2019-08-07 16:33:31 -07:00
Esun Kim c6b0bd08c7 Updated grpclb to use upb 2019-08-07 13:25:49 -07:00
Esun Kim 6ddfb384c1 Added google/protobuf/descriptor.upb.* to google_api_upb 2019-08-07 12:08:06 -07:00
Esun Kim f7454a9876 Modified health_check to use upb proto instead of nanopb 2019-08-07 09:16:08 -07:00
Esun Kim 8dfa3c2255 Remove upb targets from BUILD 2019-08-06 17:40:02 -07:00
Esun Kim f88bd06ee5 Go UPB! 2019-08-06 15:27:14 -07:00
Lidi Zheng 3e84f47d3f Apply the spin wait mechansim 2019-08-02 15:38:29 -07:00
Richard Belleville e1980a7a5a Merge remote-tracking branch 'origin/master' into py_proto_library 2019-08-02 15:02:31 -07:00
Lidi Zheng 42e8bd21b4 Add a workaround for CPython issue 35935 2019-08-02 14:56:58 -07:00
Lidi Zheng 518b55a433 Simplify implementation 2019-08-02 14:56:58 -07:00
Lidi Zheng 59555d5b0c Add timeout argument to wait_for_termination 2019-08-02 14:56:58 -07:00
Lidi Zheng 8f6ee97345 "EXPERIMENTAL API" added in docstring 2019-08-02 14:56:58 -07:00
Lidi Zheng 7257508294 Add a unit test for wait_for_termination 2019-08-02 14:56:57 -07:00
Lidi Zheng 9f6243e824 Add wait_for_termination method to grpc.Server 2019-08-02 14:56:57 -07:00
Karthik Ravi Shankar fcb43f9dee Regenerate projects 2019-08-01 17:34:02 -07:00
Lidi Zheng 7631e410cf
Merge pull request #19586 from gnossen/revert_revert_signal_handling
Revert "Merge pull request #19583 from gnossen/revert_signal_handling"
2019-08-01 17:08:31 -07:00
Richard Belleville 9ac75a6d16 Merge remote-tracking branch 'origin/master' into py_proto_library 2019-08-01 15:25:16 -07:00
Richard Belleville 7b2c8c27b0 Separate py_grpc_library and py_proto_library.
By popular demand, we'll now be offering separate py_grpc_library and
py_proto_library targets sharing the same interface as within google3.
This change necessitated some modifications to how we pull in our own
Python-level dependencies and how we make those available to those
pulling in our project via Bazel.

There is now a grpc_python_deps() Bazel workspace rule that pulls in the
appropriate dependencies, which should be called from the client
project's WORKSPACE file. A test has been added to the bazel/test/
directory to verify that this behavior works as intended.

It's worth noting that the protobuf repository's usage of Starlark
bind() caused a great deal of trouble in ensuring that we could also
pull in six.

This change also required a change in the way generated proto code is
imported in the channelz and health-check modules, as well as in their
associated tests. We were importing them two different ways, each
relative. This resulted in two different module objects being imported
into the process, which were incompatible. I am not sure exactly what
caused this behavior to begin, as this should have been possible before
this PR. As a workaround, I am simply trying two different absolute
imports and using the one that works. This should function both inside
and outside of Bazel environments.
2019-08-01 15:16:22 -07:00
Qiancheng Zhao 29480c4f6b add client idle filter 2019-07-24 10:04:41 -07:00
yunjiaw26 1e607d3dc0
Merge pull request #19544 from yunjiaw26/thread_pool
Threadpool
2019-07-18 15:02:59 -07:00
Lidi Zheng c8a277add4 Several documentation fixes 2019-07-15 16:54:56 -07:00
Lidi Zheng 11e60b8f30 Add documentation for compression enums 2019-07-09 16:50:53 -07:00
Richard Belleville e30dcefeab Revert "Merge pull request #19583 from gnossen/revert_signal_handling"
This reverts commit 1e7ec75eff, reversing
changes made to 6d62eb1b70.
2019-07-08 14:50:49 -07:00
Richard Belleville 2014a519fc Revert "Merge pull request #19481 from gnossen/main_thread_starvation"
This reverts commit 8f044f741f, reversing
changes made to 5ae9afdc55.
2019-07-08 12:50:13 -07:00
Richard Belleville 8f044f741f
Merge pull request #19481 from gnossen/main_thread_starvation
Enforce a finite bound on the time gap between signal receipt and signal handler execution.
2019-07-03 16:21:02 -07:00
Richard Belleville af1b09f7e7 Enforce a Finite Time Gap Bound between Signal Receipt and Signal Handler Execution
Previously, signal handlers were only given a chance to run upon receipt of an
entry in the RPC stream. Since there is no time bound on how long that might
take, there can be an arbitrarily long time gap between receipt of the signal
and the execution of the application's signal handlers.

Signal handlers are only run on the main thread. The cpython implementation
takes great care to ensure that the main thread does not block for an
arbitrarily long period between signal checks.

Our indefinite blocking was due to wait() invocations on condition variables
without a timeout.

This changes all usages of wait() in the the channel implementation to use a
wrapper that is responsive to signals even while waiting on an RPC.

A test has been added to verify this.

Tests are currently disabled under gevent due to
https://github.com/grpc/grpc/issues/18980, but a fix for that has been
found and should be merged shortly.
2019-07-03 13:35:33 -07:00
Yunjia Wang 410451c126 Add threadpool implementation 2019-07-01 14:02:58 -07:00
Yunjia Wang 5b6c9473cd Merge remote-tracking branch 'upstream/master' into mpmcqueue 2019-06-26 13:59:28 -07:00
Soheil Hassas Yeganeh f9516b04d5
Merge pull request #19218 from soheilhy/string-view
Introduce string_view and use it for gpr_split_host_port.
2019-06-26 13:15:52 -04:00