Commit Graph

29366 Commits

Author SHA1 Message Date
Mehrdad Afshari 90dbd2b670 Alter health/reflection packages' build criterion
Using the presence of the `*_pb2_grpc` module, as opposed to the absence
of the build script (`*_commands` module) is a problematic choice,
because even if a generated file is present, the test infrastructure may
want to regenerate it under a different environment (e.g. different
Python/proto package version).  This will ensure the protos always get
recompiled if we have a `*_commands` module present, signaling we are in
a build environment, thereby making the process hermetic.
2017-11-20 18:37:34 -08:00
Nathaniel Manista 018153cd1a
Merge pull request #13406 from nathanielmanistaatgoogle/interop_required_args
Require port and server_port interop flags.
2017-11-20 17:35:46 -08:00
Nathaniel Manista ec4791254e
Merge pull request #13188 from cauthu/python-server-cert-reload
Add Python support for server SSL certificate reloading.
2017-11-20 16:26:44 -08:00
Yang Gao e295ec7cc8
Merge pull request #13454 from yang-g/lockfree_event
Avoid calling dtor on grpc_fd before putting it in freelist
2017-11-20 16:06:24 -08:00
Giang Nguyen bcf083fa90 Add Python support for server SSL cert reloading
Previously, a secure server is configured with SSL credentials during
initialization, and those credentials will be used for the lifetime of
the server. If the user wants the server to use new credentials, the
user has to restart the server, resulting in server downtime. This
change enables the user to optionally configure the server with a
"certificiate config fetcher," such that on every new client
connection, the server will call the config fetcher before performing
the handshake, allowing the user application to optionally specify new
certificate configuration for the server to use (the fetcher can
return a "no change" and the server continues to use its current
certificate configuration).
2017-11-20 23:09:56 +00:00
Mehrdad Afshari 61ea3e22a1
Merge pull request #13463 from mehrdada/fix-check_grpcio_tools
Do not require bazel for check_grpcio_tools.py
2017-11-20 13:50:39 -08:00
yang-g ed49fe5510 Resolve comments 2017-11-20 13:49:54 -08:00
Nicolas Noble c567ceb01a
Merge pull request #13173 from kwasimensah/patch-1
Add logic to work around buggy Android NDKs
2017-11-20 12:32:23 -08:00
Mehrdad Afshari 9b4315682b Do not require bazel for check_grpcio_tools.py
The `make_grpcio_tools.py` rube-goldberg machinery relies on
`bazel` to extract the list of files required to compile the
`grpcio-tools` package that are provided by the `protobuf`
submodule.  In order to ensure that list is up to date,
`check_grpcio_tools.py` sanity check does the same `bazel`
query, and checks the full contents against the already
existing list in the repository.  This has the downside of
requiring `bazel` to run that particular check at sanity test
time, and flakiness has been seen there.

This commit changes the code generation process to include
the git hash of the submodule at the time `make_grpcio_tools.py`
is invoked and stores it in the generated file and instead of
doing the whole process at test time, the `check_grpcio_tools.py`
sanity test simply checks the submodule version at test time
and verifies it against the version included in the file by
`make_grpcio_tools.py` thus removing the `bazel` dependency
at test time and increasing test robustness and speed.
2017-11-20 12:14:23 -08:00
Noah Eisen ad671ff561
Merge pull request #13391 from ncteisen/more-eager-free
Eagerly Free Slices in Case of Partial Write
2017-11-20 10:08:07 -08:00
kwasimensah 8abe26237e
Fix pthread cleanup logic
Don't delete the key in the pthread_key_create destructor. The key isn't specific to instances of values.
2017-11-19 16:01:50 -05:00
ncteisen abbdbf9374 Attempt to fix TSAN 2017-11-17 19:02:04 -08:00
Noah Eisen 9addd2eef2
Merge pull request #13109 from ncteisen/tracing++
C++ize Tracing System
2017-11-17 18:32:42 -08:00
yang-g 26521b38d2 Avoid calling dtor on grpc_fd before putting it in freelist 2017-11-17 17:15:37 -08:00
ncteisen 0392f8acc3 Merge branch 'master' of https://github.com/grpc/grpc into tracing++ 2017-11-17 16:17:21 -08:00
ncteisen aa3b19741f Rename tracer_peer to tracer_util 2017-11-17 15:56:48 -08:00
Sree Kuchibhotla 90c8cf6acc
Merge pull request #13435 from sreecha/disable-realtime-caching
Disable caching start-time for all clock-types except GPR_CLOCK_MONOTONIC
2017-11-17 13:55:44 -08:00
ncteisen c4dd9cfe18 reviewer feedback 2017-11-17 13:39:01 -08:00
Michael Lumish dbca3d9b76
Merge pull request #13433 from murgatroid99/uv_resource_quota_fixes
Fix uses of resource quota in UV TCP code
2017-11-17 12:31:46 -08:00
ncteisen 692915ee07 Swtich to using grpc_bb_take_first 2017-11-17 11:45:49 -08:00
kpayson64 510fcb84b6
Merge pull request #13409 from kpayson64/fix_json_run_localhost
Fix TSAN json_run_localhost flake
2017-11-17 11:35:05 -08:00
Jan Tattermusch 7ce4e17710
Merge pull request #13439 from jtattermusch/csharp_no_concurrent_dict
Use regular dict in C# completion registry
2017-11-17 20:14:55 +01:00
Sree Kuchibhotla 9f4759ac14 Disable caching start-time for all clocktypes except GPR_CLOCK_MONOTONIC
Caching the start-time for GPR_CLOCK_REALTIME has been causing errors in
cases where the system time is changed (after caching the time). In such
cases, the following functions produce incorrect results (and are off by
how much ever the system time was changed)
  grpc_millis_to_timespec() and grpc_timespec_to_millis_round_down()

This can cause problems especially when using the above functions to
get timer deadlines or completion queue timeouts.
(In the worst case scenarios, the timeouts/deadlines will always occur (if the
timeout inverval / deadline was less than the system change delta)

Ideally we should be reverting https://github.com/grpc/grpc/pull/11866
but since that is a large change (which introduced new APIs in
exec_ctx.cc), I am doing this change to effectively revert to the old
behavior (while still keeping the new APIs introduced in exec_ctx)
2017-11-17 09:44:07 -08:00
murgatroid99 5dc3cc1b01 Clang format 2017-11-17 09:40:57 -08:00
Jan Tattermusch ddcdf84186 use regular dict in completion registry 2017-11-17 17:56:31 +01:00
Jan Tattermusch d9186a7e9d
Merge pull request #13418 from jtattermusch/csharp_honor_optimizationtarget
C# benchmark improvements
2017-11-17 14:01:02 +01:00
Ken Payson 7cf8d72c25 Fix TSAN json_run_localhost flake 2017-11-16 18:36:38 -08:00
kpayson64 c35a660300
Merge pull request #13422 from kpayson64/quic_tsan_fix
Use lock when popping requests on server shutdown
2017-11-16 18:35:01 -08:00
murgatroid99 3dc4bc2f06 Fix uses of resource quota in UV TCP code 2017-11-16 18:30:41 -08:00
Yuchen Zeng 6d6636987b
Merge pull request #13388 from y-zeng/flow_control
Flow control fixes
2017-11-16 14:57:30 -08:00
Noah Eisen ad3bdbeb4a
Merge pull request #13335 from ncteisen/inline-closure
Inline Closure
2017-11-16 14:43:06 -08:00
ncteisen 34fec74986 No more API change, no test change 2017-11-16 14:33:00 -08:00
ncteisen 588d6d9294 unref before write failures for completness 2017-11-16 14:28:30 -08:00
ncteisen 311fa5f818 Reviewer feedback: no API change 2017-11-16 14:25:50 -08:00
Mark D. Roth 7fb7774b39
Merge pull request #13417 from markdroth/grpclb_memory_leak_fix
Restart LB call after client load report completion, if needed.
2017-11-16 13:46:46 -08:00
Ken Payson 24908a61e4 Use lock when popping requests on server shutdown
Doing this without a lock causes TSAN failures for quic.

There isn't much need to be clever here because this only impacts
shutdown performance, which doesn't really matter.
2017-11-16 12:35:43 -08:00
kwasimensah 0bf12cfd32
Fix clang-format issues 2017-11-16 15:07:00 -05:00
ncteisen 3035950cb4 clang fmt 2017-11-16 11:48:10 -08:00
Yuchen Zeng 1028787b5a Add constant kMaxDt 2017-11-16 11:26:43 -08:00
ncteisen 232af482b5 inline helper and remove extern c 2017-11-16 11:09:15 -08:00
adelez 82c8f94530
Merge pull request #13411 from adelez/fix_python
Fix manual docker command output for Python.
2017-11-16 10:41:50 -08:00
Jan Tattermusch 1aacb19838 balance queuedContinuationCounter for inlined handlers 2017-11-16 18:29:37 +01:00
Jan Tattermusch ea6cc57f1e C# benchmarks: honor optimizationtarget channel arg 2017-11-16 18:04:37 +01:00
ncteisen b2aa06ae99 Reviewer feedback: friend func not clasS 2017-11-16 09:02:58 -08:00
ncteisen 9006013267 Reviewer feedback: singleton TraceFlagList 2017-11-16 08:44:17 -08:00
Mark D. Roth 6c8ee58f95 Restart LB call after client load report completion, if needed. 2017-11-16 08:35:25 -08:00
Jan Tattermusch 57a66242d0
Merge pull request #13394 from murgatroid99/node_interop_test_invocation_fix
Update Node interop test invocation to use new fixtures
2017-11-16 11:30:23 +01:00
Mehrdad Afshari f6d4008c5f
Merge pull request #13233 from mehrdada/fix-grpcio-reflection-health-packaging
Fix grpcio_{reflection,health_checking} packaging
2017-11-15 20:40:28 -08:00
apolcyn 767e1cb912
Merge pull request #13405 from apolcyn/grpc_config_txt_prefix
Query for TXT service configs with _gprc_config prefix
2017-11-15 17:23:48 -08:00
Mehrdad Afshari 9d1ba2efd9 Fix grpcio_{health_checking,reflection} packaging
The previous packaging structure exhibited strange behavior of
slowness when trying to use pip to install grpcio-reflection
or grpcio-health-checking in a single line with grpcio-tools.

The root cause seems to be the complicated interaction between
pip and setuptools and the fact that we ship a single .tar.gz
"source" archive for `grpcio_reflection` and
`grpcio_health_checking` packages.  `pip` tries to build this
"source" package, and our build process wants to generate
code for the `.proto` files in the package.  However, we have
already processed the `.proto` files into `_pb2.py` files in
our artifact build process, and installing `grpcio_tools`
to get `grpcio_{reflection,health_checking}` seems excessive.
The behavior gets worse since `setuptools`, while building
the package from source, tries to fetch `grpcio_tools` from
source and build that too.  This takes a while, since it
involves compiling a bunch of native code from `protobuf` and
`grpc` and requires a C compiler to boot.

This commit modifies the Python artifact for the two packages
so that they will not include the raw `.proto` files in the
distribution uploaded to PyPI, nor would they contain the
Python module that does the preprocessing code generation
from the respective .proto files.  Instead, a specific code
path is taken when the generated `_pb2_grpc` Python module is
not present in the package to provide such functionality
when built from the gRPC git repository (and hence when built
from our CI infrastructure.)
2017-11-15 16:36:25 -08:00