Commit Graph

2594 Commits

Author SHA1 Message Date
Esun Kim be4e684a82 Migrated tsi/alts from nanopb to upb 2019-08-08 16:39:05 -07:00
Juanli Shen fb21394c43
Merge pull request #18745 from AspirinSJL/xds_to_lb
Use EDS in xDS policy
2019-08-08 13:36:45 -07:00
Richard Belleville d932d2368e
Merge pull request #19852 from gnossen/server_termination
Quit waiting for a day
2019-08-08 09:53:10 -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
Richard Belleville 3db8828876 Add TODOs for prefix stripping 2019-08-06 15:24:09 -07:00
Richard Belleville 0aa30c6f23 Remove unintentional dependencies 2019-08-05 16:34:47 -07:00
Richard Belleville e32980fba2 Quit waiting for a day 2019-08-05 16:19:49 -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 c4b7831f20 Make sanity test happy 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 e64961d658 Shorten long lines. 2019-08-01 16:22:02 -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
Igor Zhilianin 1c54390f4f Check call.trailing_metadata() for None before iterating it 2019-07-22 23:54:47 +03:00
yunjiaw26 1e607d3dc0
Merge pull request #19544 from yunjiaw26/thread_pool
Threadpool
2019-07-18 15:02:59 -07:00
Lidi Zheng dbec6006a6 Fix the entry condition of Bazel hack 2019-07-16 14:15:13 -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 d6e3d04cf8 Capitalize comment 2019-07-09 15:57:19 -07:00
Richard Belleville 674de80123 Function in an internal environment 2019-07-09 14:12:27 -07:00
Yunjia Wang 15d2f0390b Merge remote-tracking branch 'upstream/master' into thread_pool 2019-07-09 10:00:40 -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 af986fa3d5 Revert "Merge pull request #19581 from lidizheng/rf-signal"
This reverts commit 6d62eb1b70, reversing
changes made to 70dd0b9b3b.
2019-07-08 12:50:03 -07:00
Lidi Zheng 06d8d07a98 Remove the unused import 2019-07-08 11:12:10 -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 f7182fe4f2 Add explanation to _signal_client 2019-07-03 14:32:01 -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
Richard Belleville 9caf5d32b6
Merge pull request #19537 from gnossen/terminate_bazel_hack
Terminate bazel hack
2019-07-03 09:52:37 -07:00
Richard Belleville 85b4e7948c Remove debug prints 2019-07-02 14:01:59 -07:00
Richard Belleville c9ce403dc4 Ensure bazel_hack terminates when running test_gevent. 2019-07-02 14:00:46 -07:00
Yunjia Wang 410451c126 Add threadpool implementation 2019-07-01 14:02:58 -07:00
Soheil Hassas Yeganeh dbf88dd66f Revert "Revert "Introduce string_view and use it for gpr_split_host_port.""
This reverts commit 80c177d4c4.
2019-06-27 20:56:15 -04:00
Yunjia Wang 5b6c9473cd Merge remote-tracking branch 'upstream/master' into mpmcqueue 2019-06-26 13:59:28 -07:00
Soheil Hassas Yeganeh 80c177d4c4
Revert "Introduce string_view and use it for gpr_split_host_port." 2019-06-26 16:22:13 -04: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
Yunjia Wang 343541c13c Merge remote-tracking branch 'upstream/master' into mpmcqueue 2019-06-25 19:45:18 -07:00
Lidi Zheng 9427d1c9ce
Revert "Surface exceptions in gevent IO manager" 2019-06-21 17:24:05 -07:00
Soheil Hassas Yeganeh ef0f9bf7ec Introduce string_view and use it for gpr_split_host_port. 2019-06-20 23:19:34 -04:00
Yunjia Wang fb05f0bf9c Merge remote-tracking branch 'upstream/master' into mpmcqueue 2019-06-19 16:25:16 -07:00
Yunjia Wang ad22f9d7bf Add delete operator overload 2019-06-19 16:24:59 -07:00
Esun Kim cd27a36924 Regenerate projects 2019-06-18 15:40:50 -07:00
Yunjia Wang 8ebd58b3ba Merge remote-tracking branch 'upstream/master' into mpmcqueue 2019-06-17 17:17:02 -07:00
Yunjia Wang 1def76bf1d Add Makefile 2019-06-17 17:16:46 -07:00
Lidi Zheng 3ab7332769
Merge pull request #19356 from lidizheng/i15880
Surface exceptions in gevent IO manager
2019-06-17 16:47:02 -07:00
Lidi Zheng e0a95c3267 Add more missing functions 2019-06-14 16:53:14 -07:00
Lidi Zheng 536765b2f3 Surface exceptions in gevent IO manager 2019-06-14 15:21:07 -07:00
Lidi Zheng a91728737a
Merge pull request #19292 from mehrdada/clean-del
Clean up Python Channel.__del__ logic
2019-06-11 11:16:30 -07:00
Mehrdad Afshari 9847c6364a Silence pylint 2019-06-10 23:31:51 +00:00
Mehrdad Afshari 45a0e5bd4f Clean up Channel.__del__ logic 2019-06-07 15:54:59 -07:00
Lily Li 195aae6cb5 add compatibility check badge to README 2019-06-06 16:34:48 -07:00
Lidi Zheng c0dd83e9a0 Add documentation about CallCredentials restriction 2019-06-04 11:12:23 -07:00
Lidi Zheng f6f7ef60c6
Merge pull request #19174 from lidizheng/expose-exception
Surface exception from metadata credentails plugin methods
2019-05-29 15:39:06 -07:00
Lidi Zheng d835d1bb1f Surface exception from metadata credentails plugin methods 2019-05-29 10:41:38 -07:00
Richard Belleville 0ebeb40718
Merge pull request #19084 from gnossen/python2-deprecation-notice
Add python deprecation notices.
2019-05-28 13:06:52 -07:00
Srini Polavarapu ec640a53c6 Merge pull request #19105 from gnossen/twine_check_artifacts
Produce Python Wheels with a Valid long_description field
2019-05-28 10:11:34 -07:00
Esun Kim 90fbdc92f5 Roll-forward "Config migration"
This reverts commit 236ae12bb1.
2019-05-20 15:47:24 -07:00
Richard Belleville 5d95bf037d Actually include README.rst in all packages 2019-05-20 14:21:25 -07:00
Richard Belleville cb9e2188ab Add python deprecation notices. 2019-05-20 13:05:37 -07:00
Lidi Zheng ebfed6ad7b
Merge pull request #19030 from mehrdada/unsubscribe_all
Unsubscribe all connectivity callbacks on Channel.close
2019-05-17 10:04:57 -07:00
murgatroid99 70e850a023 Merge branch 'master' into cares_windows_platform_detection 2019-05-14 17:41:25 -07:00
Mehrdad Afshari c7343ea03d Unsubscribe all connectivity callbacks on Channel.close 2019-05-14 16:30:57 -07:00
murgatroid99 7743130f64 Consolidate conditional localhost resolution into existing file 2019-05-14 15:26:56 -07:00
Alexander Polcyn 236ae12bb1 Revert "Config migration"
This reverts commit 87905ae5ea.
2019-05-14 14:36:33 -07:00
murgatroid99 90e52f00a1 Moved code back into one file with a #ifdef 2019-05-10 14:47:26 -07:00
murgatroid99 4b4006f833 libuv cares: scope manual localhost resolution to only Windows 2019-05-10 11:15:12 -07:00
Srini Polavarapu 6bc2ff1b5f Regenerate projects 2019-05-10 10:38:59 -07:00
Esun Kim 87905ae5ea Config migration 2019-05-09 12:29:38 -07:00
Esun Kim 0217450e2c Sanitized some sources 2019-05-03 10:05:32 -07:00
Michael Lumish 95a4a0ef76
Merge pull request #18809 from murgatroid99/cares_libuv
Add cares glue for libuv event loop
2019-05-02 13:43:52 -07:00
Richard Belleville 7809dee619
Merge pull request #18922 from grpc/revert-revert-due-to-unintentional-unrevert
Revert "Merge pull request #18912 from grpc/revert-bazel-changes"
2019-05-02 10:30:43 -07:00
Lidi Zheng f1dfe791ab
Merge pull request #18842 from lidizheng/respect-interval
Respect interval_us setting for TestServicer
2019-05-01 11:13:56 -07:00
Esun Kim 1518ecbd76 Added new configuration system to core/grp.
More generic configuration system is introduced in order to i) unify the
way how modules access the configurations instead of using low-level
get/setenv functions and ii) enable the customization for where configuration
is stored. This could be extended to support flag, file, etc.

Default configuration system uses environment variables as before so
basically this is expected to work just as it did. This behavior can
change by redefining GPR_GLOBAL_CONFIG_DEFINE_*type* macros.

* Migrated configuration

GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS
GRPC_EXPERIMENTAL_DISABLE_FLOW_CONTROL
GRPC_ABORT_ON_LEAKS
GRPC_NOT_USE_SYSTEM_SSL_ROOTS
2019-04-30 15:49:24 -07:00
Richard Belleville 930cec4e27 Revert "Merge pull request #18912 from grpc/revert-bazel-changes"
This reverts commit c9a259aa3a, reversing
changes made to 9c882bc725.
2019-04-30 11:17:11 -07:00
Richard Belleville 50b5240d0a Revert "Merge pull request #18859 from grpc/internal_py_proto_library"
This reverts commit 5b720f19c1, reversing
changes made to a64ae3c0d5.
2019-04-29 17:47:56 -07:00
Richard Belleville 5b720f19c1
Merge pull request #18859 from grpc/internal_py_proto_library
Remove dependency on pubref/rules_proto.
2019-04-29 14:59:15 -07:00
Lidi Zheng c864bea0c6 Move TestService to a separate file to simplify its dependency 2019-04-26 10:43:32 -07:00
Lidi Zheng 2268e49399
Merge pull request #18873 from lidizheng/fix-typo
Fix a small typo in Python health servicer test
2019-04-26 10:15:04 -07:00
Muxi Yan efbeb750ec
Merge pull request #18814 from muxi/fix-cfstream-build-yaml
Build system fix for default CFStream
2019-04-26 08:14:30 -07:00
Lidi Zheng ec76108df2 Fix a small typo in Python health servicer test 2019-04-25 17:09:19 -07:00
Richard Belleville afdc59712d Merge branch 'master' into internal_py_proto_library 2019-04-25 10:01:41 -07:00
Richard Belleville 05f37c8143 Remove dependency on pubref/rules_proto.
This commit resolves #18331.
This commit resolves #18256.
This commit resolves... another TODO that apparently didn't have an
associated github issue.

We swap out pubref's implementation of py_proto_library with our own,
which more closely mirrors the interface of the internal
py_proto_library, taking the descriptor file output of a proto_library
rule as input.

One minor change in behavior was introduced for simplicity. When a
py_proto_library depends on a proto_library with a source proto file in
a subdirectory of the bazel package, the import module of the resultant
python library will reflect the package, *not* the full directory of the
proto file, including both the bazel package and the subdirectories, as
pubref did previously. This behavior also more closely mirrors google
internal behavior.

This commit also introduces a slightly more stringent bazel format
script. Buildifier on its own will not take care of long lines, but by
running yapf first, we end up with a more legible file. At the moment,
there is no sanity check associated with this formatter.
2019-04-24 17:36:08 -07:00
Arjun Roy 8ce42f67b2 Shrink arena size by 40 bytes and add additional
alignment options (for cache-alignment).

We shrink by:
1) Removing an unnecessary zone pointer.
2) Replacing gpr_mu (40 bytes when using pthread_mutex_t) with
std::atomic_flag.

We also header-inline the fastpath alloc (ie. when not doing a zone
alloc) and move the malloc() for a zone alloc outside of the mutex
critical zone, which allows us to replace the mutex with a spinlock.

We also cache-align created arenas.
2019-04-24 16:39:03 -07:00
Lidi Zheng 072fbc44a0 Respect interval_us setting for TestServicer 2019-04-23 16:37:51 -07:00
murgatroid99 dc1bcf8762 Consolidate helper function from windows and libuv 2019-04-22 17:31:55 -07:00