Merge branch 'master' of https://github.com/grpc/grpc into channel-tracing

reviewable/pr13883/r8
ncteisen 7 years ago
commit 6684230224
  1. 2
      doc/PROTOCOL-HTTP2.md
  2. 14
      src/compiler/php_generator.cc
  3. 2
      src/core/lib/gpr/cpu_posix.cc
  4. 6
      src/core/lib/gprpp/memory.h
  5. 16
      src/csharp/experimental/README.md
  6. 37
      src/csharp/experimental/build_native_ext_for_android.sh
  7. 5
      test/core/client_channel/resolvers/fake_resolver_test.cc
  8. 2
      test/cpp/util/grpc_tool.cc
  9. 12
      tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile
  10. 12
      tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile

@ -191,7 +191,7 @@ grpc-java-android/0.9.1 (gingerbread/1.2.4; nexus5; tmobile)
Unless explicitly defined to be, gRPC Calls are not assumed to be idempotent. Specifically:
* Calls that cannot be proven to have started will not be retried.
* There is no mechanisim for duplicate suppression as it is not necessary.
* There is no mechanism for duplicate suppression as it is not necessary.
* Calls that are marked as idempotent may be sent multiple times.

@ -18,10 +18,12 @@
#include <map>
#include <google/protobuf/compiler/php/php_generator.h>
#include "src/compiler/config.h"
#include "src/compiler/generator_helpers.h"
#include "src/compiler/php_generator_helpers.h"
using google::protobuf::compiler::php::GeneratedClassName;
using grpc::protobuf::Descriptor;
using grpc::protobuf::FileDescriptor;
using grpc::protobuf::MethodDescriptor;
@ -55,8 +57,10 @@ grpc::string MessageIdentifierName(const grpc::string& name,
const FileDescriptor* file) {
std::vector<grpc::string> tokens = grpc_generator::tokenize(name, ".");
std::ostringstream oss;
oss << PackageName(file) << "\\"
<< grpc_generator::CapitalizeFirstLetter(tokens[tokens.size() - 1]);
if (PackageName(file) != "") {
oss << PackageName(file) << "\\";
}
oss << grpc_generator::CapitalizeFirstLetter(tokens[tokens.size() - 1]);
return oss.str();
}
@ -67,9 +71,9 @@ void PrintMethod(const MethodDescriptor* method, Printer* out) {
vars["service_name"] = method->service()->full_name();
vars["name"] = method->name();
vars["input_type_id"] =
MessageIdentifierName(input_type->full_name(), input_type->file());
vars["output_type_id"] =
MessageIdentifierName(output_type->full_name(), output_type->file());
MessageIdentifierName(GeneratedClassName(input_type), input_type->file());
vars["output_type_id"] = MessageIdentifierName(
GeneratedClassName(output_type), output_type->file());
out->Print("/**\n");
out->Print(GetPHPComments(method, " *").c_str());

@ -37,7 +37,7 @@ static long ncpus = 0;
static pthread_key_t thread_id_key;
static void init_ncpus() {
ncpus = sysconf(_SC_NPROCESSORS_ONLN);
ncpus = sysconf(_SC_NPROCESSORS_CONF);
if (ncpus < 1 || ncpus > INT32_MAX) {
gpr_log(GPR_ERROR, "Cannot determine number of CPUs: assuming 1");
ncpus = 1;

@ -30,12 +30,12 @@
namespace grpc_core {
// The alignment of memory returned by gpr_malloc().
constexpr size_t kAllignmentForDefaultAllocationInBytes = 8;
constexpr size_t kAlignmentForDefaultAllocationInBytes = 8;
// Alternative to new, since we cannot use it (for fear of libstdc++)
template <typename T, typename... Args>
inline T* New(Args&&... args) {
void* p = alignof(T) > kAllignmentForDefaultAllocationInBytes
void* p = alignof(T) > kAlignmentForDefaultAllocationInBytes
? gpr_malloc_aligned(sizeof(T), alignof(T))
: gpr_malloc(sizeof(T));
return new (p) T(std::forward<Args>(args)...);
@ -45,7 +45,7 @@ inline T* New(Args&&... args) {
template <typename T>
inline void Delete(T* p) {
p->~T();
if (alignof(T) > kAllignmentForDefaultAllocationInBytes) {
if (alignof(T) > kAlignmentForDefaultAllocationInBytes) {
gpr_free_aligned(p);
} else {
gpr_free(p);

@ -0,0 +1,16 @@
This directory contains useful resources for getting gRPC C# to work on
not-yet-supported platforms.
# Unity & Xamarin
gRPC C# currently doesn't support Unity or Xamarin, but some proof-of-concept
work has been done. Some of the resources are shared in this directory to
ease community work on Unity & Xamarin support.
## Crosscompiling `grpc_csharp_ext` for Android
* Install [Android NDK](https://developer.android.com/ndk/index.html)
* Run `./build_native_ext_for_android.sh` to crosscompile using cmake.
## Crosscompiling `grpc_csharp_ext` for iOS
TBD

@ -0,0 +1,37 @@
#!/bin/sh
# Copyright 2018 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Helper script to crosscompile grpc_csharp_ext native extension for Android.
cd "$(dirname "$0")/../../../cmake"
mkdir -p build
cd build
# set to the location where Android SDK is installed
ANDROID_NDK_PATH="$HOME/android-ndk-r16b"
cmake ../.. \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=15 \
-DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a \
-DCMAKE_ANDROID_NDK="${ANDROID_NDK_PATH}" \
-DCMAKE_ANDROID_STL_TYPE=c++_static \
-DRUN_HAVE_POSIX_REGEX=0 \
-DRUN_HAVE_STD_REGEX=0 \
-DRUN_HAVE_STEADY_CLOCK=0 \
-DCMAKE_BUILD_TYPE=Release
make grpc_csharp_ext

@ -234,6 +234,11 @@ static void test_fake_resolver() {
grpc_timeout_milliseconds_to_deadline(100)) ==
nullptr);
// Clean up.
// Note: Need to explicitly unref the resolver and flush the exec_ctx
// to make sure that the final resolver callback (with error set to
// "Resolver Shutdown") is invoked before on_res_arg goes out of scope.
resolver.reset();
grpc_core::ExecCtx::Get()->Flush();
GRPC_COMBINER_UNREF(combiner, "test_fake_resolver");
}

@ -747,6 +747,8 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
}
}
Status status = call.Finish(&server_trailing_metadata);
PrintMetadata(server_trailing_metadata,
"Received trailing metadata from server:");
if (status.ok()) {
fprintf(stderr, "Rpc succeeded with OK status\n");
return true;

@ -18,19 +18,7 @@ FROM quay.io/pypa/manylinux1_x86_64
# Update the package manager
RUN yum update -y
#############################################################
# Update Git to allow cloning submodules with --reference arg
RUN yum remove -y git
RUN yum install -y curl-devel expat-devel gettext-devel linux-headers openssl-devel zlib-devel gcc
RUN cd /usr/src && \
curl -O -L https://kernel.org/pub/software/scm/git/git-2.0.5.tar.gz && \
tar xzf git-2.0.5.tar.gz
RUN cd /usr/src/git-2.0.5 && \
make prefix=/usr/local/git all && \
make prefix=/usr/local/git install
ENV PATH /usr/local/git/bin:$PATH
RUN source /etc/bashrc
###################################
# Install Python build requirements

@ -18,19 +18,7 @@ FROM quay.io/pypa/manylinux1_i686
# Update the package manager
RUN yum update -y
#############################################################
# Update Git to allow cloning submodules with --reference arg
RUN yum remove -y git
RUN yum install -y curl-devel expat-devel gettext-devel linux-headers openssl-devel zlib-devel gcc
RUN cd /usr/src && \
curl -O -L https://kernel.org/pub/software/scm/git/git-2.0.5.tar.gz && \
tar xzf git-2.0.5.tar.gz
RUN cd /usr/src/git-2.0.5 && \
make prefix=/usr/local/git all && \
make prefix=/usr/local/git install
ENV PATH /usr/local/git/bin:$PATH
RUN source /etc/bashrc
###################################
# Install Python build requirements

Loading…
Cancel
Save