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
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
Esun Kim
cd27a36924
Regenerate projects
2019-06-18 15:40:50 -07:00
Srini Polavarapu
6bc2ff1b5f
Regenerate projects
2019-05-10 10:38:59 -07:00
Esun Kim
0217450e2c
Sanitized some sources
2019-05-03 10:05:32 -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
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
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
Lidi Zheng
072fbc44a0
Respect interval_us setting for TestServicer
2019-04-23 16:37:51 -07:00
SataQiu
bca4a6db2c
fix some spellings mistakes
2019-04-21 11:07:21 +08:00
Lidi Zheng
123fd943f1
Revert "Revert "Merge pull request #18547 from lidizheng/fix-gevent""
...
This reverts commit a922bd7a03 .
2019-04-16 14:13:04 -07:00
Richard Belleville
a922bd7a03
Revert "Merge pull request #18547 from lidizheng/fix-gevent"
...
This reverts commit 09d1011663 , reversing
changes made to e076a30f16 .
2019-04-15 12:47:50 -07:00
Richard Belleville
55bbf1cc1c
Merge pull request #18732 from grpc/compression_reversion_reversion
...
Unrevert Python Compression
2019-04-15 10:20:08 -07:00
Lidi Zheng
5721c518d9
Add DNS resolver test & Disable C-Ares for custom iomgr
2019-04-12 14:44:37 -07:00
Richard Belleville
392ffea8d5
Fix tests for internal runs
2019-04-11 14:31:58 -07:00
Richard Belleville
f900eec41d
Revert "Merge pull request #18727 from grpc/revert_compression"
...
This reverts commit 8054a731d1 , reversing
changes made to c3d3cf8053 .
2019-04-11 13:04:54 -07:00
Richard Belleville
167540efd4
Revert "Merge pull request #18564 from grpc/compression"
...
This reverts commit 9dfeb14be0 , reversing
changes made to 7009f2df58 .
2019-04-11 10:10:29 -07:00
Richard Belleville
5afd77398e
Implement compression API within gRPC Python.
2019-04-09 15:14:03 -07:00
Lidi Zheng
0231bf3b01
Regenerate projects
2019-03-29 16:24:50 -07:00
Lidi Zheng
56605cd55d
Merge pull request #18488 from lidizheng/example-errors
...
Add Python example for error handling
2019-03-28 14:47:30 -07:00
Lidi Zheng
478fec7d50
Merge pull request #18300 from lidizheng/disable-flaky-windows-gevent-test
...
Disable two flaky gevent tests
2019-03-27 11:40:04 -07:00
Lidi Zheng
f527cfbbac
Adopt review's advice
...
* Add a unit test
* Integrate with Bazel
* Polish README.md
2019-03-25 12:24:11 -07:00
Lidi Zheng
4c3b577650
Add expectation to negative timeout test case
2019-03-15 17:42:50 -07:00
Lidi Zheng
dfb5a2dbc6
Disable negative deadline test in gevent
2019-03-15 13:01:28 -07:00
Lidi Zheng
c3ecc61867
Use C-Core API to perform time conversion
2019-03-15 11:48:10 -07:00
Lidi Zheng
4966adaeae
Disable two flaky gevent tests
2019-03-07 15:19:16 -08:00
Nicolas Noble
0fc01a302f
Merge pull request #18171 from huynq0911/fix_duplicated_word
...
Fix some typos
2019-02-27 19:15:53 -08:00
Nguyen Quang Huy
c9acd8380f
Fix some typos
...
Correct some words spelling for reading more easily.
2019-02-26 15:46:13 +07:00
Eric Gribkoff
1c2303c635
use isinstance for internal api to not catch mocks
2019-02-25 21:44:26 -08:00
Eric Gribkoff
d6e8c4fdb1
Merge pull request #18129 from ericgribkoff/abort_test_test
...
Disable test_abort_does_not_leak_local_vars
2019-02-22 14:04:26 -08:00
Lidi Zheng
9a548969ed
Merge branch 'master' into bzl-py3-fix
2019-02-21 14:14:23 -08:00
Eric Gribkoff
8ba4d3a801
Disable test_abort_does_not_leak_local_vars
...
This test relies on gc timing and has been flaky
(https://github.com/grpc/grpc/issues/17927 ).
2019-02-21 14:02:06 -08:00
Eric Gribkoff
deb1081536
Disable flaky health service test
2019-02-21 12:09:36 -08:00
Eric Gribkoff
af3d32214c
increase timeout
2019-02-20 19:44:13 -08:00
Eric Gribkoff
a2495502df
add enter_graceful_shutdown() to health service
2019-02-20 15:55:19 -08:00
Lidi Zheng
cb3966b881
Use `tuple` instead of `list`/`map` combination
2019-02-20 14:07:34 -08:00
Lidi Zheng
61bea3891b
Another attempt to fix this problem cleanly
2019-02-20 14:07:34 -08:00
Lidi Zheng
e9c67f23f3
Add a new environment variable GRPC_BAZEL_BUILD
2019-02-20 14:07:34 -08:00
Lidi Zheng
48ccc2477c
Prevent the Bazel hack from affecting environment other than Bazel
2019-02-20 14:07:34 -08:00
Lidi Zheng
d209deb14b
Revert "Revert "Merge pull request #17644 from lidizheng/bzl-py3""
...
This reverts commit 7da0aacef2 .
2019-02-20 14:07:34 -08:00
Eric Gribkoff
ae44187910
Merge branch 'master' into non_blocking_stream
2019-02-20 11:22:25 -08:00
Eric Gribkoff
bf7107b9dc
comments
2019-02-20 11:00:04 -08:00
Eric Gribkoff
2ba9a5aaa8
bazel dep
2019-02-20 10:33:02 -08:00
Kim Bao Long
0203bf74f5
Remove the redundant words in comments
...
Although it is spelling mistakes, it might make an affects while reading docs.
Co-Authored-By: Nguyen Phuong An <AnNP@vn.fujitsu.com>
Signed-off-by: Kim Bao Long <longkb@vn.fujitsu.com>
2019-02-20 16:21:59 +07:00
Eric Gribkoff
da1f8d7c66
rpc test fix
2019-02-19 15:46:49 -08:00
Eric Gribkoff
003212648f
fixup
2019-02-19 15:08:42 -08:00
Eric Gribkoff
77f325a9af
bazel target
2019-02-19 14:54:02 -08:00
Eric Gribkoff
a5c96cf765
fix test
2019-02-19 14:38:11 -08:00
Eric Gribkoff
830d7d1e61
order
2019-02-19 14:02:29 -08:00
Eric Gribkoff
00f85c28c9
update tests.json
2019-02-19 13:46:52 -08:00
Eric Gribkoff
9345eac211
non-blocking server streaming for health service
2019-02-19 13:24:31 -08:00
Eric Gribkoff
b7947776f8
Merge pull request #16513 from ericgribkoff/python_unit_fork_tests
...
Add fork tests as Python unit tests
2019-02-15 18:31:45 -08:00
Eric Gribkoff
ff0d2195cf
address comments
2019-02-15 17:00:21 -08:00
Eric Gribkoff
2ea6d3ef0b
Add fork tests as Python unit tests
2019-02-15 09:50:46 -08:00
Srini Polavarapu
b0efc103e3
Regenerate projects
2019-02-12 21:07:42 -08:00
Eric Gribkoff
5a20b60cda
fix flake in test_abort_does_not_leak_local_vars
2019-02-05 09:21:02 -08:00
Eric Gribkoff
28252eb0dd
force gc in test
2019-02-01 15:32:34 -08:00
Eric Gribkoff
c5255e9a5e
python: do not store raised exception in _Context.abort()
...
Python 3 exceptions include a `__traceback__` attribute that includes
refs to all local variables. Saving the exception results in leaking
references to the, among other things, the Cython grpc_call wrapper and
prevents garbage collection and release of core resources, even after
the server is shutdown.
See
https://www.python.org/dev/peps/pep-3134/#open-issue-garbage-collection
2019-02-01 09:32:39 -08:00
Eric Gribkoff
7da0aacef2
Revert "Merge pull request #17644 from lidizheng/bzl-py3"
...
This reverts commit a25828ad78 , reversing
changes made to 5176fd80fc .
2019-01-29 13:50:16 -08:00
Vijay Pai
8fb2f4abea
Fix a common typo
2019-01-29 10:04:43 -08:00
Lidi Zheng
5198ccd89c
Revert "Add basic benchmark test for Python"
2019-01-29 00:40:01 -08:00
Lidi Zheng
a25828ad78
Merge pull request #17644 from lidizheng/bzl-py3
...
[gRPC] Enable Python 3 for Bazel to Run Tests
2019-01-28 16:23:33 -08:00
Lidi Zheng
fcbb126baf
Point the hack of proto message comparison to new issue
2019-01-28 14:56:52 -08:00
Lidi Zheng
16b8279ebe
Merge pull request #17793 from lidizheng/py-bm
...
Add basic benchmark test for Python
2019-01-28 11:00:37 -08:00
Lidi Zheng
7e90dad675
Adopt reviewer's advices
2019-01-28 10:55:19 -08:00
Lidi Zheng
f817d49e47
Update the README.md
2019-01-25 14:03:37 -08:00
Lidi Zheng
141e42f9b9
Revert "Remove the fake package dependency && temporarily skip the Channelz tests"
...
This reverts commit 08a90f03d4 .
2019-01-24 13:45:07 -08:00
Lidi Zheng
b60c5cdc82
Adopte reviewer's suggestion
2019-01-23 12:27:43 -08:00
Lidi Zheng
95d4120f46
Add copyright to BUILD file
2019-01-22 18:34:17 -08:00
Lidi Zheng
4f451c78a4
Add basic benchmark test for Python
2019-01-22 16:50:47 -08:00
Lidi Zheng
17fa4b0caf
Use monkey patch function to solve namespace package issue
2019-01-16 11:22:57 -08:00
Lidi Zheng
222db62721
Revert the compare of protobuf message to comparing encoded result
2019-01-11 17:03:51 -08:00
Lidi Zheng
7df3475a9f
Enable Bazel Python 3 for every PR
...
* Reverted hack in _reflection_servicer_test.py
* To see if Kokoro is happy about it
2019-01-09 14:36:23 -08:00
Lidi Zheng
0d931d9c8f
Make Python 3 pass all unit tests
2019-01-07 13:41:02 -08:00
Lidi Zheng
814c858f3f
Enable Python 3
2019-01-04 18:45:01 -08:00
Eric Gribkoff
b542cc8917
Merge pull request #17642 from ericgribkoff/restore_fork_support_flag
...
restore cython flag value to default after test
2019-01-04 15:20:10 -08:00
Eric Gribkoff
9685299cd3
Merge pull request #17641 from ericgribkoff/logging_test_fix
...
Do not reload grpc in unit tests
2019-01-04 15:19:41 -08:00
Eric Gribkoff
4b2086eecd
restore cython flag value to default after test
2019-01-04 14:12:11 -08:00
Eric Gribkoff
d79d2f1ca7
Do not reload grpc in unit tests
...
This can break subsequently run tests, including any which have already
stored references to gRPC enums (such as grpc.StatusCode.OK). The
subsequent tests will compare now be comparing the old enums to the
reloaded enums, and they will not match. This causes errors in
_metadata_code_details_test and a hang in _metadata_flags_test, when run
in sequence locally after _logging_test.
It's unclear why this has been working on Kokoro, but it is reproducible
locally and is behavior that should be avoided.
2019-01-04 14:03:31 -08:00
Sanjay Pujare
94d5587643
Regenerate projects
2019-01-03 15:35:20 -08:00
Richard Belleville
87e45f384c
Merge pull request #17580 from grpc/expose-version
...
Expose version
2018-12-27 16:20:11 -08:00
Richard Belleville
dd4830eae8
Make gRPC version string available as grpc.__version__
2018-12-27 13:50:30 -08:00
Eric Gribkoff
4e3e46df22
fix test
2018-12-27 11:53:54 -08:00
Eric Gribkoff
e678187996
use test constants, fix formatting
2018-12-27 09:39:53 -08:00
Eric Gribkoff
b74af8c70b
skip test with gevent
2018-12-26 15:04:38 -08:00
Eric Gribkoff
71e7e6ddc7
Add Watch method to health check service
2018-12-26 12:39:58 -08:00
Eric Gribkoff
b6b745f22d
disable broken gevent test
2018-12-21 15:04:42 -08:00
Eric Gribkoff
2f029bade0
Clean up server and channel objects in tests
2018-12-21 15:04:42 -08:00
Jan Tattermusch
95511c0cfd
Merge pull request #17407 from jtattermusch/interop_csharp_sni_fix
...
better testing of SNI for C-based languages
2018-12-21 11:12:46 +01:00
Lidi Zheng
97453a3d81
Merge pull request #17303 from lidizheng/sanity-python-3
...
Run pylint test in Python 3
2018-12-20 11:22:37 -08:00
Jan Tattermusch
4f261a071e
do not use server override in python interop client by default
2018-12-20 14:49:54 +01:00
Eric Gribkoff
6211f4589b
removed unused traceback import
2018-12-19 08:34:13 -08:00