From 4f8a416f703b2196958777f897e9d3b1caf5b9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Vo=C3=9F?= Date: Wed, 27 Sep 2017 09:43:14 +0200 Subject: [PATCH 01/30] Increase reference count on state used in tcp connect. The state is used both in the callback for the actual connect as well as in the additional timeout that is setup for the operation. Both code paths decrease the reference count and if they happen to be queued at the same time, memory is corrupted. Subsequent behavior is undefined and segfaults can be observed as a result. Fixes #12608 --- src/core/lib/iomgr/tcp_client_uv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index 786c456b735..f2b23aae2e6 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -145,7 +145,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, connect->resource_quota = resource_quota; uv_tcp_init(uv_default_loop(), connect->tcp_handle); connect->connect_req.data = connect; - connect->refs = 1; + connect->refs = 2; // One for the connect operation, one for the timer. if (GRPC_TRACER_ON(grpc_tcp_trace)) { gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: asynchronously connecting", From d05f2f77d297e8d24480f87bbab9ee73cf014f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Vo=C3=9F?= Date: Sat, 30 Sep 2017 13:01:42 +0200 Subject: [PATCH 02/30] Fix up whitespace --- src/core/lib/iomgr/tcp_client_uv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index f2b23aae2e6..0d9e7ed5f6e 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -145,7 +145,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, connect->resource_quota = resource_quota; uv_tcp_init(uv_default_loop(), connect->tcp_handle); connect->connect_req.data = connect; - connect->refs = 2; // One for the connect operation, one for the timer. + connect->refs = 2; // One for the connect operation, one for the timer. if (GRPC_TRACER_ON(grpc_tcp_trace)) { gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: asynchronously connecting", From 5e8c48669ffcd14469184bcc708a994b2eaa85a4 Mon Sep 17 00:00:00 2001 From: Chris Bacon Date: Tue, 3 Oct 2017 15:15:54 +0100 Subject: [PATCH 03/30] De-register cancellation token Fixes #12800 --- src/csharp/Grpc.Core/Internal/AsyncCall.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index 17109de587b..09fb722c816 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -34,6 +34,9 @@ namespace Grpc.Core.Internal readonly CallInvocationDetails details; readonly INativeCall injectedNativeCall; // for testing + // Dispose of to de-register cancellation token registration + IDisposable cancellationTokenRegistration; + // Completion of a pending unary response if not null. TaskCompletionSource unaryResponseTcs; @@ -320,6 +323,7 @@ namespace Grpc.Core.Internal protected override void OnAfterReleaseResources() { details.Channel.RemoveCallReference(this); + cancellationTokenRegistration?.Dispose(); } protected override bool IsClient @@ -405,7 +409,7 @@ namespace Grpc.Core.Internal var token = details.Options.CancellationToken; if (token.CanBeCanceled) { - token.Register(() => this.Cancel()); + cancellationTokenRegistration = token.Register(() => this.Cancel()); } } From bb872c02d9c988f80ddb5add8e9291a9766b2c65 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Oct 2017 16:59:49 +0200 Subject: [PATCH 04/30] allow cancelling MoveNext operations --- src/csharp/Grpc.Core/IAsyncStreamReader.cs | 5 +++++ .../Internal/ClientResponseStream.cs | 20 +++++++++---------- .../Grpc.Core/Internal/ServerRequestStream.cs | 11 +++++----- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/src/csharp/Grpc.Core/IAsyncStreamReader.cs b/src/csharp/Grpc.Core/IAsyncStreamReader.cs index 42bfbb87e01..4a169fcca5d 100644 --- a/src/csharp/Grpc.Core/IAsyncStreamReader.cs +++ b/src/csharp/Grpc.Core/IAsyncStreamReader.cs @@ -41,6 +41,11 @@ namespace Grpc.Core /// (MoveNext will return false) and the CancellationToken /// associated with the call will be cancelled to signal the failure. /// + /// + /// MoveNext() operations can be cancelled via a cancellation token. Cancelling + /// an individual read operation has the same effect as cancelling the entire call + /// (which will also result in the read operation returning prematurely). + /// /// /// The message type. public interface IAsyncStreamReader : IAsyncEnumerator diff --git a/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs b/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs index 851b6ca213c..ab649ee7662 100644 --- a/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs +++ b/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs @@ -49,19 +49,19 @@ namespace Grpc.Core.Internal public async Task MoveNext(CancellationToken token) { - if (token != CancellationToken.None) + var cancellationTokenRegistration = token.CanBeCanceled ? token.Register(() => call.Cancel()) : (IDisposable) null; + using (cancellationTokenRegistration) { - throw new InvalidOperationException("Cancellation of individual reads is not supported."); - } - var result = await call.ReadMessageAsync().ConfigureAwait(false); - this.current = result; + var result = await call.ReadMessageAsync().ConfigureAwait(false); + this.current = result; - if (result == null) - { - await call.StreamingResponseCallFinishedTask.ConfigureAwait(false); - return false; + if (result == null) + { + await call.StreamingResponseCallFinishedTask.ConfigureAwait(false); + return false; + } + return true; } - return true; } public void Dispose() diff --git a/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs b/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs index c65b960afb2..058dddb7ebb 100644 --- a/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs +++ b/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs @@ -49,13 +49,14 @@ namespace Grpc.Core.Internal public async Task MoveNext(CancellationToken token) { - if (token != CancellationToken.None) + + var cancellationTokenRegistration = token.CanBeCanceled ? token.Register(() => call.Cancel()) : (IDisposable) null; + using (cancellationTokenRegistration) { - throw new InvalidOperationException("Cancellation of individual reads is not supported."); + var result = await call.ReadMessageAsync().ConfigureAwait(false); + this.current = result; + return result != null; } - var result = await call.ReadMessageAsync().ConfigureAwait(false); - this.current = result; - return result != null; } public void Dispose() From f8c9bcdc0f083e29302ab10cf11ea1c645edf4ae Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Oct 2017 17:39:59 +0200 Subject: [PATCH 05/30] introduce CallCancellationTest --- .../Grpc.Core.Tests/CallCancellationTest.cs | 182 ++++++++++++++++++ .../Grpc.Core.Tests/ClientServerTest.cs | 68 ------- src/csharp/tests.json | 1 + 3 files changed, 183 insertions(+), 68 deletions(-) create mode 100644 src/csharp/Grpc.Core.Tests/CallCancellationTest.cs diff --git a/src/csharp/Grpc.Core.Tests/CallCancellationTest.cs b/src/csharp/Grpc.Core.Tests/CallCancellationTest.cs new file mode 100644 index 00000000000..e4e859d5160 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/CallCancellationTest.cs @@ -0,0 +1,182 @@ +#region Copyright notice and license + +// Copyright 2015 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. + +#endregion + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Profiling; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Tests +{ + public class CallCancellationTest + { + const string Host = "127.0.0.1"; + + MockServiceHelper helper; + Server server; + Channel channel; + + [SetUp] + public void Init() + { + helper = new MockServiceHelper(Host); + server = helper.GetServer(); + server.Start(); + channel = helper.GetChannel(); + } + + [TearDown] + public void Cleanup() + { + channel.ShutdownAsync().Wait(); + server.ShutdownAsync().Wait(); + } + + [Test] + public async Task ClientStreamingCall_CancelAfterBegin() + { + var barrier = new TaskCompletionSource(); + + helper.ClientStreamingHandler = new ClientStreamingServerMethod(async (requestStream, context) => + { + barrier.SetResult(null); + await requestStream.ToListAsync(); + return ""; + }); + + var cts = new CancellationTokenSource(); + var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall(new CallOptions(cancellationToken: cts.Token))); + + await barrier.Task; // make sure the handler has started. + cts.Cancel(); + + try + { + // cannot use Assert.ThrowsAsync because it uses Task.Wait and would deadlock. + await call.ResponseAsync; + Assert.Fail(); + } + catch (RpcException ex) + { + Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode); + } + } + + [Test] + public async Task ClientStreamingCall_ServerSideReadAfterCancelNotificationReturnsNull() + { + var handlerStartedBarrier = new TaskCompletionSource(); + var cancelNotificationReceivedBarrier = new TaskCompletionSource(); + var successTcs = new TaskCompletionSource(); + + helper.ClientStreamingHandler = new ClientStreamingServerMethod(async (requestStream, context) => + { + handlerStartedBarrier.SetResult(null); + + // wait for cancellation to be delivered. + context.CancellationToken.Register(() => cancelNotificationReceivedBarrier.SetResult(null)); + await cancelNotificationReceivedBarrier.Task; + + var moveNextResult = await requestStream.MoveNext(); + successTcs.SetResult(!moveNextResult ? "SUCCESS" : "FAIL"); + return ""; + }); + + var cts = new CancellationTokenSource(); + var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall(new CallOptions(cancellationToken: cts.Token))); + + await handlerStartedBarrier.Task; + cts.Cancel(); + + try + { + await call.ResponseAsync; + Assert.Fail(); + } + catch (RpcException ex) + { + Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode); + } + Assert.AreEqual("SUCCESS", await successTcs.Task); + } + + [Test] + public async Task ClientStreamingCall_CancelServerSideRead() + { + helper.ClientStreamingHandler = new ClientStreamingServerMethod(async (requestStream, context) => + { + var cts = new CancellationTokenSource(); + var moveNextTask = requestStream.MoveNext(cts.Token); + await Task.Delay(100); + cts.Cancel(); + await moveNextTask; + return ""; + }); + + var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall()); + try + { + // cannot use Assert.ThrowsAsync because it uses Task.Wait and would deadlock. + await call.ResponseAsync; + Assert.Fail(); + } + catch (RpcException ex) + { + Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode); + } + } + + [Test] + public async Task ServerStreamingCall_CancelClientSideRead() + { + helper.ServerStreamingHandler = new ServerStreamingServerMethod(async (request, responseStream, context) => + { + await responseStream.WriteAsync("abc"); + await Task.Delay(10000); + await responseStream.WriteAsync("def"); + }); + + var call = Calls.AsyncServerStreamingCall(helper.CreateServerStreamingCall(), ""); + await call.ResponseStream.MoveNext(); + Assert.AreEqual("abc", call.ResponseStream.Current); + + var cts = new CancellationTokenSource(); + var moveNextTask = call.ResponseStream.MoveNext(cts.Token); + await Task.Delay(100); + cts.Cancel(); + + try + { + // cannot use Assert.ThrowsAsync because it uses Task.Wait and would deadlock. + await moveNextTask; + Assert.Fail(); + } + catch (RpcException ex) + { + Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode); + } + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs index 72d9035a6ff..90dd365b07e 100644 --- a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs @@ -272,74 +272,6 @@ namespace Grpc.Core.Tests Assert.AreEqual("xyz-value", call.GetTrailers()[0].Value); } - [Test] - public async Task ClientStreamingCall_CancelAfterBegin() - { - var barrier = new TaskCompletionSource(); - - helper.ClientStreamingHandler = new ClientStreamingServerMethod(async (requestStream, context) => - { - barrier.SetResult(null); - await requestStream.ToListAsync(); - return ""; - }); - - var cts = new CancellationTokenSource(); - var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall(new CallOptions(cancellationToken: cts.Token))); - - await barrier.Task; // make sure the handler has started. - cts.Cancel(); - - try - { - // cannot use Assert.ThrowsAsync because it uses Task.Wait and would deadlock. - await call.ResponseAsync; - Assert.Fail(); - } - catch (RpcException ex) - { - Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode); - } - } - - [Test] - public async Task ClientStreamingCall_ServerSideReadAfterCancelNotificationReturnsNull() - { - var handlerStartedBarrier = new TaskCompletionSource(); - var cancelNotificationReceivedBarrier = new TaskCompletionSource(); - var successTcs = new TaskCompletionSource(); - - helper.ClientStreamingHandler = new ClientStreamingServerMethod(async (requestStream, context) => - { - handlerStartedBarrier.SetResult(null); - - // wait for cancellation to be delivered. - context.CancellationToken.Register(() => cancelNotificationReceivedBarrier.SetResult(null)); - await cancelNotificationReceivedBarrier.Task; - - var moveNextResult = await requestStream.MoveNext(); - successTcs.SetResult(!moveNextResult ? "SUCCESS" : "FAIL"); - return ""; - }); - - var cts = new CancellationTokenSource(); - var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall(new CallOptions(cancellationToken: cts.Token))); - - await handlerStartedBarrier.Task; - cts.Cancel(); - - try - { - await call.ResponseAsync; - Assert.Fail(); - } - catch (RpcException ex) - { - Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode); - } - Assert.AreEqual("SUCCESS", await successTcs.Task); - } - [Test] public async Task AsyncUnaryCall_EchoMetadata() { diff --git a/src/csharp/tests.json b/src/csharp/tests.json index 78410510526..65a0ed293f6 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -10,6 +10,7 @@ "Grpc.Core.Tests.AppDomainUnloadTest", "Grpc.Core.Tests.AuthContextTest", "Grpc.Core.Tests.AuthPropertyTest", + "Grpc.Core.Tests.CallCancellationTest", "Grpc.Core.Tests.CallCredentialsTest", "Grpc.Core.Tests.CallOptionsTest", "Grpc.Core.Tests.ChannelCredentialsTest", From 90e9140211976db14e3752dff84442cbed2b3c94 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 4 Oct 2017 14:02:22 -0700 Subject: [PATCH 06/30] 1.7.x is now 1.7.0-pre1 --- BUILD | 4 ++-- CMakeLists.txt | 2 +- Makefile | 4 ++-- build.yaml | 2 +- gRPC-Core.podspec | 2 +- gRPC-ProtoRPC.podspec | 2 +- gRPC-RxLibrary.podspec | 2 +- gRPC.podspec | 2 +- package.json | 2 +- package.xml | 4 ++-- src/cpp/common/version_cc.cc | 2 +- src/csharp/Grpc.Core/Version.csproj.include | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages_dotnetcli.bat | 2 +- src/csharp/build_packages_dotnetcli.sh | 4 ++-- src/node/health_check/package.json | 4 ++-- src/node/tools/package.json | 2 +- src/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/GRPCClient/private/version.h | 2 +- src/php/ext/grpc/version.h | 2 +- src/python/grpcio/grpc/_grpcio_metadata.py | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/python/grpcio_health_checking/grpc_version.py | 2 +- src/python/grpcio_reflection/grpc_version.py | 2 +- src/python/grpcio_testing/grpc_version.py | 2 +- src/python/grpcio_tests/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- 31 files changed, 36 insertions(+), 36 deletions(-) diff --git a/BUILD b/BUILD index dfcded21976..5eaafae3fde 100644 --- a/BUILD +++ b/BUILD @@ -36,9 +36,9 @@ load( # This should be updated along with build.yaml g_stands_for = "gambit" -core_version = "4.0.0-dev" +core_version = "5.0.0-dev" -version = "1.7.0-dev" +version = "1.7.0-pre1" GPR_PUBLIC_HDRS = [ "include/grpc/support/alloc.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e448c92b66..f2514323c83 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ cmake_minimum_required(VERSION 2.8) set(PACKAGE_NAME "grpc") -set(PACKAGE_VERSION "1.7.0-dev") +set(PACKAGE_VERSION "1.7.0-pre1") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") diff --git a/Makefile b/Makefile index 517ddfd90e0..c7f9f7da814 100644 --- a/Makefile +++ b/Makefile @@ -411,8 +411,8 @@ Q = @ endif CORE_VERSION = 5.0.0-dev -CPP_VERSION = 1.7.0-dev -CSHARP_VERSION = 1.7.0-dev +CPP_VERSION = 1.7.0-pre1 +CSHARP_VERSION = 1.7.0-pre1 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 9b5aacc4c8f..4ef08c21300 100644 --- a/build.yaml +++ b/build.yaml @@ -14,7 +14,7 @@ settings: '#10': See the expand_version.py for all the quirks here core_version: 5.0.0-dev g_stands_for: gambit - version: 1.7.0-dev + version: 1.7.0-pre1 filegroups: - name: census public_headers: diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index d34c271dbaf..8497035c829 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.7.0-dev' + version = '1.7.0-pre1' s.version = version s.summary = 'Core cross-platform gRPC library, written in C' s.homepage = 'https://grpc.io' diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index cb40330dab5..4b7b36a6874 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-ProtoRPC' - version = '1.7.0-dev' + version = '1.7.0-pre1' s.version = version s.summary = 'RPC library for Protocol Buffers, based on gRPC' s.homepage = 'https://grpc.io' diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec index 52bd8ed0ae1..673239cb90a 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-RxLibrary' - version = '1.7.0-dev' + version = '1.7.0-pre1' s.version = version s.summary = 'Reactive Extensions library for iOS/OSX.' s.homepage = 'https://grpc.io' diff --git a/gRPC.podspec b/gRPC.podspec index 79315e46f31..8ce4d5e854d 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '1.7.0-dev' + version = '1.7.0-pre1' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'https://grpc.io' diff --git a/package.json b/package.json index 2e31275bf02..55a5a6bcdae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.7.0-dev", + "version": "1.7.0-pre1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", diff --git a/package.xml b/package.xml index 0eea122b24e..2c2e5c83e3f 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2017-08-24 - 1.7.0dev - 1.7.0dev + 1.7.0RC1 + 1.7.0RC1 beta diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index 2e9a51316d4..766c6148fee 100644 --- a/src/cpp/common/version_cc.cc +++ b/src/cpp/common/version_cc.cc @@ -22,5 +22,5 @@ #include namespace grpc { -grpc::string Version() { return "1.7.0-dev"; } +grpc::string Version() { return "1.7.0-pre1"; } } diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include index 124ecab14cd..76fd55cf930 100755 --- a/src/csharp/Grpc.Core/Version.csproj.include +++ b/src/csharp/Grpc.Core/Version.csproj.include @@ -1,7 +1,7 @@ - 1.7.0-dev + 1.7.0-pre1 3.3.0 diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 588cc845165..fbffbb079c6 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -38,6 +38,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "1.7.0-dev"; + public const string CurrentVersion = "1.7.0-pre1"; } } diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat index c419d870492..8377f6ccc78 100755 --- a/src/csharp/build_packages_dotnetcli.bat +++ b/src/csharp/build_packages_dotnetcli.bat @@ -13,7 +13,7 @@ @rem limitations under the License. @rem Current package versions -set VERSION=1.7.0-dev +set VERSION=1.7.0-pre1 @rem Adjust the location of nuget.exe set NUGET=C:\nuget\nuget.exe diff --git a/src/csharp/build_packages_dotnetcli.sh b/src/csharp/build_packages_dotnetcli.sh index 124dfbb257e..30d2bc6bfcf 100755 --- a/src/csharp/build_packages_dotnetcli.sh +++ b/src/csharp/build_packages_dotnetcli.sh @@ -39,7 +39,7 @@ dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts -nuget pack Grpc.nuspec -Version "1.7.0-dev" -OutputDirectory ../../artifacts -nuget pack Grpc.Tools.nuspec -Version "1.7.0-dev" -OutputDirectory ../../artifacts +nuget pack Grpc.nuspec -Version "1.7.0-pre1" -OutputDirectory ../../artifacts +nuget pack Grpc.Tools.nuspec -Version "1.7.0-pre1" -OutputDirectory ../../artifacts (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json index 3c7d3707ee0..0942d28018f 100644 --- a/src/node/health_check/package.json +++ b/src/node/health_check/package.json @@ -1,6 +1,6 @@ { "name": "grpc-health-check", - "version": "1.7.0-dev", + "version": "1.7.0-pre1", "author": "Google Inc.", "description": "Health check service for use with gRPC", "repository": { @@ -15,7 +15,7 @@ } ], "dependencies": { - "grpc": "^1.7.0-dev", + "grpc": "^1.7.0-pre1", "lodash": "^3.9.3", "google-protobuf": "^3.0.0" }, diff --git a/src/node/tools/package.json b/src/node/tools/package.json index d9b1fb86c91..6863b3a57d2 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "1.7.0-dev", + "version": "1.7.0-pre1", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "https://grpc.io/", diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 7d073c9a848..19eb0ca1ab2 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler-gRPCPlugin' - v = '1.7.0-dev' + v = '1.7.0-pre1' s.version = v s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.' s.description = <<-DESC diff --git a/src/objective-c/GRPCClient/private/version.h b/src/objective-c/GRPCClient/private/version.h index 843954e84a0..82748febfd8 100644 --- a/src/objective-c/GRPCClient/private/version.h +++ b/src/objective-c/GRPCClient/private/version.h @@ -23,4 +23,4 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.7.0-dev" +#define GRPC_OBJC_VERSION_STRING @"1.7.0-pre1" diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h index 07d8eee7fe2..4be72ba2bce 100644 --- a/src/php/ext/grpc/version.h +++ b/src/php/ext/grpc/version.h @@ -20,6 +20,6 @@ #ifndef VERSION_H #define VERSION_H -#define PHP_GRPC_VERSION "1.7.0dev" +#define PHP_GRPC_VERSION "1.7.0RC1" #endif /* VERSION_H */ diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index a4eb358c4ee..6cceafffe72 100644 --- a/src/python/grpcio/grpc/_grpcio_metadata.py +++ b/src/python/grpcio/grpc/_grpcio_metadata.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!! -__version__ = """1.7.0.dev0""" +__version__ = """1.7.0rc1""" diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 3194a893d7e..1a5121247ea 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='1.7.0.dev0' +VERSION='1.7.0rc1' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index ef68bad17a0..5c8f192fb84 100644 --- a/src/python/grpcio_health_checking/grpc_version.py +++ b/src/python/grpcio_health_checking/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!! -VERSION='1.7.0.dev0' +VERSION='1.7.0rc1' diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index 55ab959cc57..827006c1621 100644 --- a/src/python/grpcio_reflection/grpc_version.py +++ b/src/python/grpcio_reflection/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!! -VERSION='1.7.0.dev0' +VERSION='1.7.0rc1' diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py index 592d08efc36..e765bf3f935 100644 --- a/src/python/grpcio_testing/grpc_version.py +++ b/src/python/grpcio_testing/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!! -VERSION='1.7.0.dev0' +VERSION='1.7.0rc1' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index 9e54dc9f75b..36048082537 100644 --- a/src/python/grpcio_tests/grpc_version.py +++ b/src/python/grpcio_tests/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! -VERSION='1.7.0.dev0' +VERSION='1.7.0rc1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 228c01a92c4..1dc79b706ba 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -14,5 +14,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '1.7.0.dev' + VERSION = '1.7.0.pre1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index ea0c4ae56cc..a27404f9460 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -14,6 +14,6 @@ module GRPC module Tools - VERSION = '1.7.0.dev' + VERSION = '1.7.0.pre1' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index a4178a58c1f..81a92d6bd6a 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='1.7.0.dev0' +VERSION='1.7.0rc1' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index d81b7b4d115..715237aa4b2 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.0-dev +PROJECT_NUMBER = 1.7.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index eacb40c2123..46ce98f7b32 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.0-dev +PROJECT_NUMBER = 1.7.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From fb4cb27da275bc196ca6b449e7e55f6c40b40009 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 29 Sep 2017 17:08:59 -0700 Subject: [PATCH 07/30] Add PB_NO_PACKED_STRUCTS to gRPC-Core --- gRPC-Core.podspec | 1 + templates/gRPC-Core.podspec.template | 1 + 2 files changed, 2 insertions(+) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index d34c271dbaf..e375ced2f67 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -84,6 +84,7 @@ Pod::Spec.new do |s| # build. 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"', } s.default_subspecs = 'Interface', 'Implementation' diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 22814849172..5dc020d7d93 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -119,6 +119,7 @@ # build. 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"', } s.default_subspecs = 'Interface', 'Implementation' From 4f05af59ea53794170a3748a103bb14b780f1755 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Mon, 11 Sep 2017 13:40:12 -0700 Subject: [PATCH 08/30] fix memory leak of ruby call objects --- src/ruby/ext/grpc/rb_call.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index 5550bb7d5f1..29c4a94816b 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -101,6 +101,7 @@ static void grpc_rb_call_destroy(void *p) { return; } destroy_call((grpc_rb_call *)p); + xfree(p); } static size_t md_ary_datasize(const void *p) { From ee35223174a0c48707d4148a5e87e0ec4942d41c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 Oct 2017 16:11:34 +0200 Subject: [PATCH 09/30] improve docs --- src/csharp/Grpc.Core/IAsyncStreamReader.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/IAsyncStreamReader.cs b/src/csharp/Grpc.Core/IAsyncStreamReader.cs index 4a169fcca5d..3751d549e39 100644 --- a/src/csharp/Grpc.Core/IAsyncStreamReader.cs +++ b/src/csharp/Grpc.Core/IAsyncStreamReader.cs @@ -44,7 +44,9 @@ namespace Grpc.Core /// /// MoveNext() operations can be cancelled via a cancellation token. Cancelling /// an individual read operation has the same effect as cancelling the entire call - /// (which will also result in the read operation returning prematurely). + /// (which will also result in the read operation returning prematurely), but the per-read cancellation + /// tokens passed to MoveNext() only result in cancelling the call if the read operation haven't finished + /// yet. /// /// /// The message type. From 32d196f1b1859d6a0eaa906f65a82c42ad1b2c87 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 Oct 2017 16:34:00 +0200 Subject: [PATCH 10/30] remove delays in tests --- src/csharp/Grpc.Core.Tests/CallCancellationTest.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/CallCancellationTest.cs b/src/csharp/Grpc.Core.Tests/CallCancellationTest.cs index e4e859d5160..e040f52380a 100644 --- a/src/csharp/Grpc.Core.Tests/CallCancellationTest.cs +++ b/src/csharp/Grpc.Core.Tests/CallCancellationTest.cs @@ -129,7 +129,6 @@ namespace Grpc.Core.Tests { var cts = new CancellationTokenSource(); var moveNextTask = requestStream.MoveNext(cts.Token); - await Task.Delay(100); cts.Cancel(); await moveNextTask; return ""; @@ -154,8 +153,10 @@ namespace Grpc.Core.Tests helper.ServerStreamingHandler = new ServerStreamingServerMethod(async (request, responseStream, context) => { await responseStream.WriteAsync("abc"); - await Task.Delay(10000); - await responseStream.WriteAsync("def"); + while (!context.CancellationToken.IsCancellationRequested) + { + await Task.Delay(10); + } }); var call = Calls.AsyncServerStreamingCall(helper.CreateServerStreamingCall(), ""); @@ -164,7 +165,6 @@ namespace Grpc.Core.Tests var cts = new CancellationTokenSource(); var moveNextTask = call.ResponseStream.MoveNext(cts.Token); - await Task.Delay(100); cts.Cancel(); try From 05e0d2da35d822e0d3cad368ceb3848c6e035e4a Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 18 Sep 2017 17:30:20 -0700 Subject: [PATCH 11/30] Generate forward declaration in pbrpc.h --- src/compiler/objective_c_generator.cc | 21 +++++++++++++++++++++ src/compiler/objective_c_generator.h | 4 ++++ src/compiler/objective_c_plugin.cc | 18 ++++++++++-------- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index c05d15375b3..33b5fedd5c8 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -17,6 +17,7 @@ */ #include +#include #include #include "src/compiler/config.h" @@ -29,7 +30,9 @@ using ::google::protobuf::compiler::objectivec::ClassName; using ::grpc::protobuf::io::Printer; using ::grpc::protobuf::MethodDescriptor; using ::grpc::protobuf::ServiceDescriptor; +using ::grpc::protobuf::FileDescriptor; using ::std::map; +using ::std::set; namespace grpc_objective_c_generator { namespace { @@ -190,6 +193,24 @@ void PrintMethodImplementations(Printer *printer, } // namespace +::grpc::string GetAllMessageClasses(const FileDescriptor *file) { + ::grpc::string output; + set< ::grpc::string> classes; + for (int i = 0; i < file->service_count(); i++) { + const auto service = file->service(i); + for (int i = 0; i < service->method_count(); i++) { + const auto method = service->method(i); + classes.insert(ClassName(method->input_type())); + classes.insert(ClassName(method->output_type())); + } + } + for (auto one_class : classes) { + output += " @class " + one_class + ";\n"; + } + + return output; +} + ::grpc::string GetHeader(const ServiceDescriptor *service) { ::grpc::string output; { diff --git a/src/compiler/objective_c_generator.h b/src/compiler/objective_c_generator.h index edbee7ff524..e912a52415f 100644 --- a/src/compiler/objective_c_generator.h +++ b/src/compiler/objective_c_generator.h @@ -24,8 +24,12 @@ namespace grpc_objective_c_generator { using ::grpc::protobuf::ServiceDescriptor; +using ::grpc::protobuf::FileDescriptor; using ::grpc::string; +// Returns forward declaration of classes in the generated header file. +string GetAllMessageClasses(const FileDescriptor *file); + // Returns the content to be included in the "global_scope" insertion point of // the generated header file. string GetHeader(const ServiceDescriptor *service); diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 96a3375e962..de878cf143b 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -58,9 +58,10 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { "#import \n" "#import \n"; - // TODO(jcanizales): Instead forward-declare the input and output types - // and import the files in the .pbrpc.m ::grpc::string proto_imports; + proto_imports += "#if GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO\n" + + grpc_objective_c_generator::GetAllMessageClasses(file) + + "#else\n"; for (int i = 0; i < file->dependency_count(); i++) { ::grpc::string header = grpc_objective_c_generator::MessageHeaderName(file->dependency(i)); @@ -70,19 +71,20 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { grpc_generator::StripPrefix(&base_name, "google/protobuf/"); // create the import code snippet proto_imports += - "#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n" - " #import <" + + " #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n" + " #import <" + ::grpc::string(ProtobufLibraryFrameworkName) + "/" + base_name + ">\n" - "#else\n" - " #import \"" + + " #else\n" + " #import \"" + header + "\"\n" - "#endif\n"; + " #endif\n"; } else { - proto_imports += ::grpc::string("#import \"") + header + "\"\n"; + proto_imports += ::grpc::string(" #import \"") + header + "\"\n"; } } + proto_imports += "#endif\n"; ::grpc::string declarations; for (int i = 0; i < file->service_count(); i++) { From 9635d4670c342663542081c4bb7f5e67536cd805 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 19 Sep 2017 09:46:12 -0700 Subject: [PATCH 12/30] Generate dependency header import in pbrpc.m --- src/compiler/objective_c_plugin.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index de878cf143b..e751d0562e2 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -108,6 +108,28 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ".pbrpc.h\"\n\n" "#import \n" "#import \n"; + for (int i = 0; i < file->dependency_count(); i++) { + ::grpc::string header = + grpc_objective_c_generator::MessageHeaderName(file->dependency(i)); + const grpc::protobuf::FileDescriptor *dependency = file->dependency(i); + if (IsProtobufLibraryBundledProtoFile(dependency)) { + ::grpc::string base_name = header; + grpc_generator::StripPrefix(&base_name, "google/protobuf/"); + // create the import code snippet + imports += + "#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n" + " #import <" + + ::grpc::string(ProtobufLibraryFrameworkName) + "/" + base_name + + ">\n" + "#else\n" + " #import \"" + + header + + "\"\n" + "#endif\n"; + } else { + imports += ::grpc::string("#import \"") + header + "\"\n"; + } + } ::grpc::string definitions; for (int i = 0; i < file->service_count(); i++) { From 2cbec4ce195c8b6365ea41bdf26fa5c5cd5cf2e5 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 5 Oct 2017 11:30:39 -0700 Subject: [PATCH 13/30] Add test for forward declaration --- src/objective-c/tests/RemoteTestClient/RemoteTest.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec index 1796c6d7462..ad834815951 100644 --- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec @@ -47,7 +47,7 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { # This is needed by all pods that depend on Protobuf: - 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', + 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO=1', # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', } From 405762733aea4f22dd36a9677a751d2808154b0b Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 6 Oct 2017 13:46:27 -0700 Subject: [PATCH 14/30] Make platform-specific headers textual --- gRPC-Core.podspec | 11 +++++ include/grpc/module.modulemap | 32 ++++++++++----- src/objective-c/BoringSSL.podspec | 6 ++- templates/gRPC-Core.podspec.template | 10 +---- .../include/grpc/module.modulemap.template | 41 +++++++++++++++---- 5 files changed, 70 insertions(+), 30 deletions(-) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 46f8a3b999c..3faba23ca39 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -106,6 +106,8 @@ Pod::Spec.new do |s| ss.source_files = 'include/grpc/support/alloc.h', 'include/grpc/support/atm.h', 'include/grpc/support/atm_gcc_atomic.h', + 'include/grpc/support/atm_gcc_sync.h', + 'include/grpc/support/atm_windows.h', 'include/grpc/support/avl.h', 'include/grpc/support/cmdline.h', 'include/grpc/support/cpu.h', @@ -120,13 +122,18 @@ Pod::Spec.new do |s| 'include/grpc/support/sync_custom.h', 'include/grpc/support/sync_generic.h', 'include/grpc/support/sync_posix.h', + 'include/grpc/support/sync_windows.h', 'include/grpc/support/thd.h', 'include/grpc/support/time.h', 'include/grpc/support/tls.h', + 'include/grpc/support/tls_gcc.h', + 'include/grpc/support/tls_msvc.h', 'include/grpc/support/tls_pthread.h', 'include/grpc/support/useful.h', 'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h', + 'include/grpc/impl/codegen/atm_gcc_sync.h', + 'include/grpc/impl/codegen/atm_windows.h', 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', @@ -134,6 +141,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync_custom.h', 'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_posix.h', + 'include/grpc/impl/codegen/sync_windows.h', 'include/grpc/impl/codegen/byte_buffer.h', 'include/grpc/impl/codegen/byte_buffer_reader.h', 'include/grpc/impl/codegen/compression_types.h', @@ -145,6 +153,8 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/status.h', 'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h', + 'include/grpc/impl/codegen/atm_gcc_sync.h', + 'include/grpc/impl/codegen/atm_windows.h', 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', @@ -152,6 +162,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync_custom.h', 'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_posix.h', + 'include/grpc/impl/codegen/sync_windows.h', 'include/grpc/grpc_security.h', 'include/grpc/byte_buffer.h', 'include/grpc/byte_buffer_reader.h', diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap index 226cc6cf871..342adc0dc93 100644 --- a/include/grpc/module.modulemap +++ b/include/grpc/module.modulemap @@ -4,7 +4,6 @@ framework module grpc { header "support/alloc.h" header "support/atm.h" - header "support/atm_gcc_atomic.h" header "support/avl.h" header "support/cmdline.h" header "support/cpu.h" @@ -16,23 +15,17 @@ framework module grpc { header "support/string_util.h" header "support/subprocess.h" header "support/sync.h" - header "support/sync_custom.h" header "support/sync_generic.h" - header "support/sync_posix.h" header "support/thd.h" header "support/time.h" header "support/tls.h" - header "support/tls_pthread.h" header "support/useful.h" header "impl/codegen/atm.h" - header "impl/codegen/atm_gcc_atomic.h" header "impl/codegen/gpr_slice.h" header "impl/codegen/gpr_types.h" header "impl/codegen/port_platform.h" header "impl/codegen/sync.h" - header "impl/codegen/sync_custom.h" header "impl/codegen/sync_generic.h" - header "impl/codegen/sync_posix.h" header "impl/codegen/byte_buffer.h" header "impl/codegen/byte_buffer_reader.h" header "impl/codegen/compression_types.h" @@ -43,14 +36,11 @@ framework module grpc { header "impl/codegen/slice.h" header "impl/codegen/status.h" header "impl/codegen/atm.h" - header "impl/codegen/atm_gcc_atomic.h" header "impl/codegen/gpr_slice.h" header "impl/codegen/gpr_types.h" header "impl/codegen/port_platform.h" header "impl/codegen/sync.h" - header "impl/codegen/sync_custom.h" header "impl/codegen/sync_generic.h" - header "impl/codegen/sync_posix.h" header "grpc_security.h" header "byte_buffer.h" header "byte_buffer_reader.h" @@ -65,6 +55,28 @@ framework module grpc { header "support/workaround_list.h" header "census.h" + textual header "support/atm_gcc_atomic.h" + textual header "support/atm_gcc_sync.h" + textual header "support/atm_windows.h" + textual header "support/sync_custom.h" + textual header "support/sync_posix.h" + textual header "support/sync_windows.h" + textual header "support/tls_gcc.h" + textual header "support/tls_msvc.h" + textual header "support/tls_pthread.h" + textual header "impl/codegen/atm_gcc_atomic.h" + textual header "impl/codegen/atm_gcc_sync.h" + textual header "impl/codegen/atm_windows.h" + textual header "impl/codegen/sync_custom.h" + textual header "impl/codegen/sync_posix.h" + textual header "impl/codegen/sync_windows.h" + textual header "impl/codegen/atm_gcc_atomic.h" + textual header "impl/codegen/atm_gcc_sync.h" + textual header "impl/codegen/atm_windows.h" + textual header "impl/codegen/sync_custom.h" + textual header "impl/codegen/sync_posix.h" + textual header "impl/codegen/sync_windows.h" + export * module * { export * } } diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index 37798ec3c6b..c61afc1a8f7 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -31,7 +31,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL' - version = '9.0' + version = '9.1' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.' # Adapted from the homepage: @@ -67,9 +67,10 @@ Pod::Spec.new do |s| # "The name and email addresses of the library maintainers, not the Podspec maintainer." s.authors = 'Adam Langley', 'David Benjamin', 'Matt Braithwaite' + major_version = version[0] + '.0' s.source = { :git => 'https://boringssl.googlesource.com/boringssl', - :tag => "version_for_cocoapods_#{version}", + :tag => "version_for_cocoapods_#{major_version}", } name = 'openssl' @@ -186,6 +187,7 @@ Pod::Spec.new do |s| cat > include/openssl/BoringSSL.modulemap < framework module grpc { umbrella header "grpc.h" ${header_lines(grpc_public_headers_no_dir(libs))} + ${textual_header_lines(grpc_public_textual_headers_no_dir(libs))} + export * module * { export * } } From 7a1fe0d2fb8265a3803ffdb9478197fd60076fdb Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 6 Oct 2017 15:33:10 -0700 Subject: [PATCH 15/30] Fix GID related subspec lint problem --- gRPC.podspec | 3 +++ templates/gRPC.podspec.template | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gRPC.podspec b/gRPC.podspec index 8ce4d5e854d..6c200905416 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -63,10 +63,13 @@ Pod::Spec.new do |s| end s.subspec 'GID' do |ss| + ss.ios.deployment_target = '7.0' + ss.header_mappings_dir = "#{src_dir}" ss.source_files = "#{src_dir}/GRPCCall+GID.{h,m}" + ss.dependency "#{s.name}/Main", version ss.dependency 'Google/SignIn' end end diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index 5c92f9f9c42..4b360cfb4c4 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -65,10 +65,13 @@ end s.subspec 'GID' do |ss| + ss.ios.deployment_target = '7.0' + ss.header_mappings_dir = "#{src_dir}" ss.source_files = "#{src_dir}/GRPCCall+GID.{h,m}" + ss.dependency "#{s.name}/Main", version ss.dependency 'Google/SignIn' end end From 43cd1e731667dcdca610aa5f3435184f74519386 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 6 Oct 2017 16:27:47 -0700 Subject: [PATCH 16/30] Add comment --- templates/include/grpc/module.modulemap.template | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/include/grpc/module.modulemap.template b/templates/include/grpc/module.modulemap.template index 9dde240e437..e18bc3de50d 100644 --- a/templates/include/grpc/module.modulemap.template +++ b/templates/include/grpc/module.modulemap.template @@ -27,6 +27,9 @@ out = [hdr.split('/', 2)[2] for hdr in out] return out + # Generate the list of platform-specific headers as textual headers so that + # they are not built when the module is built but only when they are named by + # an #include directive. def grpc_public_textual_headers_no_dir(libs): out = [] for lib in libs: From 9714e0376a2890b850496c981694af5f91a49353 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 10 Oct 2017 11:18:49 -0700 Subject: [PATCH 17/30] Add thread pool reset on fork with FORKING_SUPPORT_ENABLED --- BUILD | 6 ++ CMakeLists.txt | 29 +++++++ Makefile | 29 +++++++ binding.gyp | 3 + build.yaml | 7 ++ config.m4 | 3 + config.w32 | 3 + gRPC-Core.podspec | 10 +++ grpc.gemspec | 8 ++ grpc.gyp | 9 ++ include/grpc/fork.h | 24 ++++++ include/grpc/impl/codegen/fork.h | 49 +++++++++++ include/grpc/module.modulemap | 3 + package.xml | 8 ++ setup.py | 2 +- src/core/lib/iomgr/fork_posix.c | 83 +++++++++++++++++++ src/core/lib/iomgr/fork_windows.c | 42 ++++++++++ src/core/lib/support/fork.c | 62 ++++++++++++++ src/core/lib/support/fork.h | 35 ++++++++ src/core/lib/support/thd_internal.h | 30 +++++++ src/core/lib/support/thd_posix.c | 56 +++++++++++++ src/core/lib/support/thd_windows.c | 2 + src/core/lib/surface/init.c | 6 ++ src/python/grpcio/grpc_core_dependencies.py | 3 + .../core/surface/public_headers_must_be_c89.c | 2 + tools/doxygen/Doxyfile.c++ | 2 + tools/doxygen/Doxyfile.c++.internal | 4 + tools/doxygen/Doxyfile.core | 3 + tools/doxygen/Doxyfile.core.internal | 8 ++ .../generated/sources_and_headers.json | 11 +++ 30 files changed, 541 insertions(+), 1 deletion(-) create mode 100644 include/grpc/fork.h create mode 100644 include/grpc/impl/codegen/fork.h create mode 100644 src/core/lib/iomgr/fork_posix.c create mode 100644 src/core/lib/iomgr/fork_windows.c create mode 100644 src/core/lib/support/fork.c create mode 100644 src/core/lib/support/fork.h create mode 100644 src/core/lib/support/thd_internal.h diff --git a/BUILD b/BUILD index 5eaafae3fde..222cdac6df1 100644 --- a/BUILD +++ b/BUILD @@ -476,6 +476,7 @@ grpc_cc_library( "src/core/lib/support/env_linux.c", "src/core/lib/support/env_posix.c", "src/core/lib/support/env_windows.c", + "src/core/lib/support/fork.c", "src/core/lib/support/histogram.c", "src/core/lib/support/host_port.c", "src/core/lib/support/log.c", @@ -517,6 +518,7 @@ grpc_cc_library( "src/core/lib/support/backoff.h", "src/core/lib/support/block_annotate.h", "src/core/lib/support/env.h", + "src/core/lib/support/fork.h", "src/core/lib/support/memory.h", "src/core/lib/support/mpscq.h", "src/core/lib/support/murmur_hash.h", @@ -524,6 +526,7 @@ grpc_cc_library( "src/core/lib/support/stack_lockfree.h", "src/core/lib/support/string.h", "src/core/lib/support/string_windows.h", + "src/core/lib/support/thd_internal.h", "src/core/lib/support/time_precise.h", "src/core/lib/support/tmpfile.h", ], @@ -542,6 +545,7 @@ grpc_cc_library( "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/fork.h", "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", @@ -597,6 +601,8 @@ grpc_cc_library( "src/core/lib/iomgr/ev_windows.c", "src/core/lib/iomgr/exec_ctx.c", "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/fork_posix.c", + "src/core/lib/iomgr/fork_windows.c", "src/core/lib/iomgr/gethostname_fallback.c", "src/core/lib/iomgr/gethostname_host_name_max.c", "src/core/lib/iomgr/gethostname_sysconf.c", diff --git a/CMakeLists.txt b/CMakeLists.txt index f2514323c83..4586bcaf289 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -795,6 +795,7 @@ add_library(gpr src/core/lib/support/env_linux.c src/core/lib/support/env_posix.c src/core/lib/support/env_windows.c + src/core/lib/support/fork.c src/core/lib/support/histogram.c src/core/lib/support/host_port.c src/core/lib/support/log.c @@ -889,6 +890,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -988,6 +990,8 @@ add_library(grpc src/core/lib/iomgr/ev_windows.c src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/executor.c + src/core/lib/iomgr/fork_posix.c + src/core/lib/iomgr/fork_windows.c src/core/lib/iomgr/gethostname_fallback.c src/core/lib/iomgr/gethostname_host_name_max.c src/core/lib/iomgr/gethostname_sysconf.c @@ -1265,6 +1269,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -1277,6 +1282,7 @@ foreach(_hdr include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h + include/grpc/fork.h include/grpc/grpc.h include/grpc/grpc_posix.h include/grpc/grpc_security_constants.h @@ -1339,6 +1345,8 @@ add_library(grpc_cronet src/core/lib/iomgr/ev_windows.c src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/executor.c + src/core/lib/iomgr/fork_posix.c + src/core/lib/iomgr/fork_windows.c src/core/lib/iomgr/gethostname_fallback.c src/core/lib/iomgr/gethostname_host_name_max.c src/core/lib/iomgr/gethostname_sysconf.c @@ -1574,6 +1582,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -1658,6 +1667,8 @@ add_library(grpc_test_util src/core/lib/iomgr/ev_windows.c src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/executor.c + src/core/lib/iomgr/fork_posix.c + src/core/lib/iomgr/fork_windows.c src/core/lib/iomgr/gethostname_fallback.c src/core/lib/iomgr/gethostname_host_name_max.c src/core/lib/iomgr/gethostname_sysconf.c @@ -1853,6 +1864,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -1921,6 +1933,8 @@ add_library(grpc_test_util_unsecure src/core/lib/iomgr/ev_windows.c src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/executor.c + src/core/lib/iomgr/fork_posix.c + src/core/lib/iomgr/fork_windows.c src/core/lib/iomgr/gethostname_fallback.c src/core/lib/iomgr/gethostname_host_name_max.c src/core/lib/iomgr/gethostname_sysconf.c @@ -2116,6 +2130,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -2170,6 +2185,8 @@ add_library(grpc_unsecure src/core/lib/iomgr/ev_windows.c src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/executor.c + src/core/lib/iomgr/fork_posix.c + src/core/lib/iomgr/fork_windows.c src/core/lib/iomgr/gethostname_fallback.c src/core/lib/iomgr/gethostname_host_name_max.c src/core/lib/iomgr/gethostname_sysconf.c @@ -2414,6 +2431,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -2425,6 +2443,7 @@ foreach(_hdr include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h + include/grpc/fork.h include/grpc/grpc.h include/grpc/grpc_posix.h include/grpc/grpc_security_constants.h @@ -2692,6 +2711,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -2703,6 +2723,7 @@ foreach(_hdr include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h + include/grpc/fork.h include/grpc/grpc.h include/grpc/grpc_posix.h include/grpc/grpc_security_constants.h @@ -2927,6 +2948,8 @@ add_library(grpc++_cronet src/core/lib/iomgr/ev_windows.c src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/executor.c + src/core/lib/iomgr/fork_posix.c + src/core/lib/iomgr/fork_windows.c src/core/lib/iomgr/gethostname_fallback.c src/core/lib/iomgr/gethostname_host_name_max.c src/core/lib/iomgr/gethostname_sysconf.c @@ -3188,6 +3211,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -3199,6 +3223,7 @@ foreach(_hdr include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h + include/grpc/fork.h include/grpc/grpc.h include/grpc/grpc_posix.h include/grpc/grpc_security_constants.h @@ -3620,6 +3645,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -3760,6 +3786,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -3931,6 +3958,7 @@ foreach(_hdr include/grpc/impl/codegen/atm_gcc_atomic.h include/grpc/impl/codegen/atm_gcc_sync.h include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/fork.h include/grpc/impl/codegen/gpr_slice.h include/grpc/impl/codegen/gpr_types.h include/grpc/impl/codegen/port_platform.h @@ -3942,6 +3970,7 @@ foreach(_hdr include/grpc/byte_buffer.h include/grpc/byte_buffer_reader.h include/grpc/compression.h + include/grpc/fork.h include/grpc/grpc.h include/grpc/grpc_posix.h include/grpc/grpc_security_constants.h diff --git a/Makefile b/Makefile index c7f9f7da814..406670f3d22 100644 --- a/Makefile +++ b/Makefile @@ -2809,6 +2809,7 @@ LIBGPR_SRC = \ src/core/lib/support/env_linux.c \ src/core/lib/support/env_posix.c \ src/core/lib/support/env_windows.c \ + src/core/lib/support/fork.c \ src/core/lib/support/histogram.c \ src/core/lib/support/host_port.c \ src/core/lib/support/log.c \ @@ -2873,6 +2874,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -2979,6 +2981,8 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/ev_windows.c \ src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fork_posix.c \ + src/core/lib/iomgr/fork_windows.c \ src/core/lib/iomgr/gethostname_fallback.c \ src/core/lib/iomgr/gethostname_host_name_max.c \ src/core/lib/iomgr/gethostname_sysconf.c \ @@ -3221,6 +3225,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -3233,6 +3238,7 @@ PUBLIC_HEADERS_C += \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ + include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security_constants.h \ @@ -3330,6 +3336,8 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/ev_windows.c \ src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fork_posix.c \ + src/core/lib/iomgr/fork_windows.c \ src/core/lib/iomgr/gethostname_fallback.c \ src/core/lib/iomgr/gethostname_host_name_max.c \ src/core/lib/iomgr/gethostname_sysconf.c \ @@ -3530,6 +3538,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -3648,6 +3657,8 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/ev_windows.c \ src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fork_posix.c \ + src/core/lib/iomgr/fork_windows.c \ src/core/lib/iomgr/gethostname_fallback.c \ src/core/lib/iomgr/gethostname_host_name_max.c \ src/core/lib/iomgr/gethostname_sysconf.c \ @@ -3810,6 +3821,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -3902,6 +3914,8 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/lib/iomgr/ev_windows.c \ src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fork_posix.c \ + src/core/lib/iomgr/fork_windows.c \ src/core/lib/iomgr/gethostname_fallback.c \ src/core/lib/iomgr/gethostname_host_name_max.c \ src/core/lib/iomgr/gethostname_sysconf.c \ @@ -4064,6 +4078,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -4129,6 +4144,8 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/ev_windows.c \ src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fork_posix.c \ + src/core/lib/iomgr/fork_windows.c \ src/core/lib/iomgr/gethostname_fallback.c \ src/core/lib/iomgr/gethostname_host_name_max.c \ src/core/lib/iomgr/gethostname_sysconf.c \ @@ -4339,6 +4356,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -4350,6 +4368,7 @@ PUBLIC_HEADERS_C += \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ + include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security_constants.h \ @@ -4596,6 +4615,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -4607,6 +4627,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ + include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security_constants.h \ @@ -4869,6 +4890,8 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/iomgr/ev_windows.c \ src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fork_posix.c \ + src/core/lib/iomgr/fork_windows.c \ src/core/lib/iomgr/gethostname_fallback.c \ src/core/lib/iomgr/gethostname_host_name_max.c \ src/core/lib/iomgr/gethostname_sysconf.c \ @@ -5093,6 +5116,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -5104,6 +5128,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ + include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security_constants.h \ @@ -5518,6 +5543,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -5635,6 +5661,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -5811,6 +5838,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/port_platform.h \ @@ -5822,6 +5850,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ + include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security_constants.h \ diff --git a/binding.gyp b/binding.gyp index b4f90382103..cb0a2fbab19 100644 --- a/binding.gyp +++ b/binding.gyp @@ -608,6 +608,7 @@ 'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_posix.c', 'src/core/lib/support/env_windows.c', + 'src/core/lib/support/fork.c', 'src/core/lib/support/histogram.c', 'src/core/lib/support/host_port.c', 'src/core/lib/support/log.c', @@ -690,6 +691,8 @@ 'src/core/lib/iomgr/ev_windows.c', 'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fork_posix.c', + 'src/core/lib/iomgr/fork_windows.c', 'src/core/lib/iomgr/gethostname_fallback.c', 'src/core/lib/iomgr/gethostname_host_name_max.c', 'src/core/lib/iomgr/gethostname_sysconf.c', diff --git a/build.yaml b/build.yaml index 4ef08c21300..97cc0fb61f2 100644 --- a/build.yaml +++ b/build.yaml @@ -75,6 +75,7 @@ filegroups: - src/core/lib/support/env_linux.c - src/core/lib/support/env_posix.c - src/core/lib/support/env_windows.c + - src/core/lib/support/fork.c - src/core/lib/support/histogram.c - src/core/lib/support/host_port.c - src/core/lib/support/log.c @@ -146,6 +147,7 @@ filegroups: - src/core/lib/support/backoff.h - src/core/lib/support/block_annotate.h - src/core/lib/support/env.h + - src/core/lib/support/fork.h - src/core/lib/support/memory.h - src/core/lib/support/mpscq.h - src/core/lib/support/murmur_hash.h @@ -153,6 +155,7 @@ filegroups: - src/core/lib/support/stack_lockfree.h - src/core/lib/support/string.h - src/core/lib/support/string_windows.h + - src/core/lib/support/thd_internal.h - src/core/lib/support/time_precise.h - src/core/lib/support/tmpfile.h uses: @@ -163,6 +166,7 @@ filegroups: - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_windows.h + - include/grpc/impl/codegen/fork.h - include/grpc/impl/codegen/gpr_slice.h - include/grpc/impl/codegen/gpr_types.h - include/grpc/impl/codegen/port_platform.h @@ -218,6 +222,8 @@ filegroups: - src/core/lib/iomgr/ev_windows.c - src/core/lib/iomgr/exec_ctx.c - src/core/lib/iomgr/executor.c + - src/core/lib/iomgr/fork_posix.c + - src/core/lib/iomgr/fork_windows.c - src/core/lib/iomgr/gethostname_fallback.c - src/core/lib/iomgr/gethostname_host_name_max.c - src/core/lib/iomgr/gethostname_sysconf.c @@ -328,6 +334,7 @@ filegroups: - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h + - include/grpc/fork.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h diff --git a/config.m4 b/config.m4 index 72f8a1e710b..8c780b101d1 100644 --- a/config.m4 +++ b/config.m4 @@ -54,6 +54,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/support/env_linux.c \ src/core/lib/support/env_posix.c \ src/core/lib/support/env_windows.c \ + src/core/lib/support/fork.c \ src/core/lib/support/histogram.c \ src/core/lib/support/host_port.c \ src/core/lib/support/log.c \ @@ -119,6 +120,8 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/ev_windows.c \ src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fork_posix.c \ + src/core/lib/iomgr/fork_windows.c \ src/core/lib/iomgr/gethostname_fallback.c \ src/core/lib/iomgr/gethostname_host_name_max.c \ src/core/lib/iomgr/gethostname_sysconf.c \ diff --git a/config.w32 b/config.w32 index 5347baedc22..f7cb23dd30a 100644 --- a/config.w32 +++ b/config.w32 @@ -31,6 +31,7 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\support\\env_linux.c " + "src\\core\\lib\\support\\env_posix.c " + "src\\core\\lib\\support\\env_windows.c " + + "src\\core\\lib\\support\\fork.c " + "src\\core\\lib\\support\\histogram.c " + "src\\core\\lib\\support\\host_port.c " + "src\\core\\lib\\support\\log.c " + @@ -96,6 +97,8 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\iomgr\\ev_windows.c " + "src\\core\\lib\\iomgr\\exec_ctx.c " + "src\\core\\lib\\iomgr\\executor.c " + + "src\\core\\lib\\iomgr\\fork_posix.c " + + "src\\core\\lib\\iomgr\\fork_windows.c " + "src\\core\\lib\\iomgr\\gethostname_fallback.c " + "src\\core\\lib\\iomgr\\gethostname_host_name_max.c " + "src\\core\\lib\\iomgr\\gethostname_sysconf.c " + diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 3faba23ca39..48f8f43e8d5 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -134,6 +134,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_windows.h', + 'include/grpc/impl/codegen/fork.h', 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', @@ -155,6 +156,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', 'include/grpc/impl/codegen/atm_windows.h', + 'include/grpc/impl/codegen/fork.h', 'include/grpc/impl/codegen/gpr_slice.h', 'include/grpc/impl/codegen/gpr_types.h', 'include/grpc/impl/codegen/port_platform.h', @@ -167,6 +169,7 @@ Pod::Spec.new do |s| 'include/grpc/byte_buffer.h', 'include/grpc/byte_buffer_reader.h', 'include/grpc/compression.h', + 'include/grpc/fork.h', 'include/grpc/grpc.h', 'include/grpc/grpc_posix.h', 'include/grpc/grpc_security_constants.h', @@ -193,6 +196,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/backoff.h', 'src/core/lib/support/block_annotate.h', 'src/core/lib/support/env.h', + 'src/core/lib/support/fork.h', 'src/core/lib/support/memory.h', 'src/core/lib/support/mpscq.h', 'src/core/lib/support/murmur_hash.h', @@ -200,6 +204,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/string.h', 'src/core/lib/support/string_windows.h', + 'src/core/lib/support/thd_internal.h', 'src/core/lib/support/time_precise.h', 'src/core/lib/support/tmpfile.h', 'src/core/lib/profiling/basic_timers.c', @@ -217,6 +222,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_posix.c', 'src/core/lib/support/env_windows.c', + 'src/core/lib/support/fork.c', 'src/core/lib/support/histogram.c', 'src/core/lib/support/host_port.c', 'src/core/lib/support/log.c', @@ -505,6 +511,8 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/ev_windows.c', 'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fork_posix.c', + 'src/core/lib/iomgr/fork_windows.c', 'src/core/lib/iomgr/gethostname_fallback.c', 'src/core/lib/iomgr/gethostname_host_name_max.c', 'src/core/lib/iomgr/gethostname_sysconf.c', @@ -738,6 +746,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/backoff.h', 'src/core/lib/support/block_annotate.h', 'src/core/lib/support/env.h', + 'src/core/lib/support/fork.h', 'src/core/lib/support/memory.h', 'src/core/lib/support/mpscq.h', 'src/core/lib/support/murmur_hash.h', @@ -745,6 +754,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/string.h', 'src/core/lib/support/string_windows.h', + 'src/core/lib/support/thd_internal.h', 'src/core/lib/support/time_precise.h', 'src/core/lib/support/tmpfile.h', 'src/core/ext/transport/chttp2/transport/bin_decoder.h', diff --git a/grpc.gemspec b/grpc.gemspec index acf71cab782..83f81a30f15 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -75,6 +75,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h ) + s.files += %w( include/grpc/impl/codegen/fork.h ) s.files += %w( include/grpc/impl/codegen/gpr_slice.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) @@ -91,6 +92,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/backoff.h ) s.files += %w( src/core/lib/support/block_annotate.h ) s.files += %w( src/core/lib/support/env.h ) + s.files += %w( src/core/lib/support/fork.h ) s.files += %w( src/core/lib/support/memory.h ) s.files += %w( src/core/lib/support/mpscq.h ) s.files += %w( src/core/lib/support/murmur_hash.h ) @@ -98,6 +100,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/stack_lockfree.h ) s.files += %w( src/core/lib/support/string.h ) s.files += %w( src/core/lib/support/string_windows.h ) + s.files += %w( src/core/lib/support/thd_internal.h ) s.files += %w( src/core/lib/support/time_precise.h ) s.files += %w( src/core/lib/support/tmpfile.h ) s.files += %w( src/core/lib/profiling/basic_timers.c ) @@ -115,6 +118,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/env_linux.c ) s.files += %w( src/core/lib/support/env_posix.c ) s.files += %w( src/core/lib/support/env_windows.c ) + s.files += %w( src/core/lib/support/fork.c ) s.files += %w( src/core/lib/support/histogram.c ) s.files += %w( src/core/lib/support/host_port.c ) s.files += %w( src/core/lib/support/log.c ) @@ -159,6 +163,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) s.files += %w( include/grpc/impl/codegen/atm_windows.h ) + s.files += %w( include/grpc/impl/codegen/fork.h ) s.files += %w( include/grpc/impl/codegen/gpr_slice.h ) s.files += %w( include/grpc/impl/codegen/gpr_types.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) @@ -171,6 +176,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/byte_buffer.h ) s.files += %w( include/grpc/byte_buffer_reader.h ) s.files += %w( include/grpc/compression.h ) + s.files += %w( include/grpc/fork.h ) s.files += %w( include/grpc/grpc.h ) s.files += %w( include/grpc/grpc_posix.h ) s.files += %w( include/grpc/grpc_security_constants.h ) @@ -441,6 +447,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/ev_windows.c ) s.files += %w( src/core/lib/iomgr/exec_ctx.c ) s.files += %w( src/core/lib/iomgr/executor.c ) + s.files += %w( src/core/lib/iomgr/fork_posix.c ) + s.files += %w( src/core/lib/iomgr/fork_windows.c ) s.files += %w( src/core/lib/iomgr/gethostname_fallback.c ) s.files += %w( src/core/lib/iomgr/gethostname_host_name_max.c ) s.files += %w( src/core/lib/iomgr/gethostname_sysconf.c ) diff --git a/grpc.gyp b/grpc.gyp index 6331b76f473..dd7851f8f4d 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -172,6 +172,7 @@ 'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_posix.c', 'src/core/lib/support/env_windows.c', + 'src/core/lib/support/fork.c', 'src/core/lib/support/histogram.c', 'src/core/lib/support/host_port.c', 'src/core/lib/support/log.c', @@ -256,6 +257,8 @@ 'src/core/lib/iomgr/ev_windows.c', 'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fork_posix.c', + 'src/core/lib/iomgr/fork_windows.c', 'src/core/lib/iomgr/gethostname_fallback.c', 'src/core/lib/iomgr/gethostname_host_name_max.c', 'src/core/lib/iomgr/gethostname_sysconf.c', @@ -557,6 +560,8 @@ 'src/core/lib/iomgr/ev_windows.c', 'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fork_posix.c', + 'src/core/lib/iomgr/fork_windows.c', 'src/core/lib/iomgr/gethostname_fallback.c', 'src/core/lib/iomgr/gethostname_host_name_max.c', 'src/core/lib/iomgr/gethostname_sysconf.c', @@ -763,6 +768,8 @@ 'src/core/lib/iomgr/ev_windows.c', 'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fork_posix.c', + 'src/core/lib/iomgr/fork_windows.c', 'src/core/lib/iomgr/gethostname_fallback.c', 'src/core/lib/iomgr/gethostname_host_name_max.c', 'src/core/lib/iomgr/gethostname_sysconf.c', @@ -954,6 +961,8 @@ 'src/core/lib/iomgr/ev_windows.c', 'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fork_posix.c', + 'src/core/lib/iomgr/fork_windows.c', 'src/core/lib/iomgr/gethostname_fallback.c', 'src/core/lib/iomgr/gethostname_host_name_max.c', 'src/core/lib/iomgr/gethostname_sysconf.c', diff --git a/include/grpc/fork.h b/include/grpc/fork.h new file mode 100644 index 00000000000..ca45e1139c0 --- /dev/null +++ b/include/grpc/fork.h @@ -0,0 +1,24 @@ +/* + * + * Copyright 2017 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. + * + */ + +#ifndef GRPC_FORK_H +#define GRPC_FORK_H + +#include + +#endif /* GRPC_FORK_H */ diff --git a/include/grpc/impl/codegen/fork.h b/include/grpc/impl/codegen/fork.h new file mode 100644 index 00000000000..03c0c4eede5 --- /dev/null +++ b/include/grpc/impl/codegen/fork.h @@ -0,0 +1,49 @@ +/* + * + * Copyright 2017 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. + * + */ + +#ifndef GRPC_IMPL_CODEGEN_FORK_H +#define GRPC_IMPL_CODEGEN_FORK_H + +/** + * gRPC applications should call this before calling fork(). There should be no + * active gRPC function calls between calling grpc_prefork() and + * grpc_postfork_parent()/grpc_postfork_child(). + * + * Returns 1 on success, 0 otherwise. + * + * Typical use: + * assert(grpc_prefork() == 1); + * int pid = fork(); + * if (pid) { + * grpc_postfork_parent(); + * // Parent process.. + * } else { + * grpc_postfork_child(); + * // Child process... + * } + */ + +int grpc_prefork(); + +void grpc_postfork_parent(); + +void grpc_postfork_child(); + +void grpc_fork_handlers_auto_register(); + +#endif /* GRPC_IMPL_CODEGEN_FORK_H */ diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap index 342adc0dc93..0faa448b70f 100644 --- a/include/grpc/module.modulemap +++ b/include/grpc/module.modulemap @@ -21,6 +21,7 @@ framework module grpc { header "support/tls.h" header "support/useful.h" header "impl/codegen/atm.h" + header "impl/codegen/fork.h" header "impl/codegen/gpr_slice.h" header "impl/codegen/gpr_types.h" header "impl/codegen/port_platform.h" @@ -36,6 +37,7 @@ framework module grpc { header "impl/codegen/slice.h" header "impl/codegen/status.h" header "impl/codegen/atm.h" + header "impl/codegen/fork.h" header "impl/codegen/gpr_slice.h" header "impl/codegen/gpr_types.h" header "impl/codegen/port_platform.h" @@ -45,6 +47,7 @@ framework module grpc { header "byte_buffer.h" header "byte_buffer_reader.h" header "compression.h" + header "fork.h" header "grpc.h" header "grpc_posix.h" header "grpc_security_constants.h" diff --git a/package.xml b/package.xml index 2c2e5c83e3f..472dabbb8de 100644 --- a/package.xml +++ b/package.xml @@ -87,6 +87,7 @@ + @@ -103,6 +104,7 @@ + @@ -110,6 +112,7 @@ + @@ -127,6 +130,7 @@ + @@ -171,6 +175,7 @@ + @@ -183,6 +188,7 @@ + @@ -453,6 +459,8 @@ + + diff --git a/setup.py b/setup.py index 90c9316b0da..fcb5a1cf720 100644 --- a/setup.py +++ b/setup.py @@ -169,7 +169,7 @@ if "win32" in sys.platform: # on msvc, but only for 32 bits DEFINE_MACROS += (('NTDDI_VERSION', 0x06000000),) else: - DEFINE_MACROS += (('HAVE_CONFIG_H', 1),) + DEFINE_MACROS += (('HAVE_CONFIG_H', 1), ('GRPC_ENABLE_FORK_SUPPORT', 1),) LDFLAGS = tuple(EXTRA_LINK_ARGS) CFLAGS = tuple(EXTRA_COMPILE_ARGS) diff --git a/src/core/lib/iomgr/fork_posix.c b/src/core/lib/iomgr/fork_posix.c new file mode 100644 index 00000000000..5f2880db379 --- /dev/null +++ b/src/core/lib/iomgr/fork_posix.c @@ -0,0 +1,83 @@ +/* + * + * Copyright 2017 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_POSIX_FORK + +#include + +#include +#include +#include +#include + +#include "src/core/lib/iomgr/ev_posix.h" +#include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/timer_manager.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/fork.h" +#include "src/core/lib/support/thd_internal.h" + +/* + * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK + * AROUND VERY SPECIFIC USE CASES. + */ + +int grpc_prefork() { + if (!grpc_fork_support_enabled()) { + gpr_log(GPR_ERROR, + "Fork support not enabled; try running with the " + "environment variable GRPC_ENABLE_FORK_SUPPORT=1"); + return 0; + } + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_timer_manager_set_threading(false); + grpc_executor_set_threading(&exec_ctx, false); + grpc_exec_ctx_finish(&exec_ctx); + if (!gpr_await_threads( + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(3, GPR_TIMESPAN)))) { + gpr_log(GPR_ERROR, "gRPC thread still active! Cannot fork!"); + return 0; + } + return 1; +} + +void grpc_postfork_parent() { + grpc_timer_manager_set_threading(true); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_executor_set_threading(&exec_ctx, true); + grpc_exec_ctx_finish(&exec_ctx); +} + +void grpc_postfork_child() { + grpc_timer_manager_set_threading(true); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_executor_set_threading(&exec_ctx, true); + grpc_exec_ctx_finish(&exec_ctx); +} + +void grpc_fork_handlers_auto_register() { + if (grpc_fork_support_enabled()) { + pthread_atfork(grpc_prefork, grpc_postfork_parent, grpc_postfork_child); + } +} + +#endif // GRPC_POSIX_FORK diff --git a/src/core/lib/iomgr/fork_windows.c b/src/core/lib/iomgr/fork_windows.c new file mode 100644 index 00000000000..965ddfbd0ba --- /dev/null +++ b/src/core/lib/iomgr/fork_windows.c @@ -0,0 +1,42 @@ +/* + * + * Copyright 2017 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifndef GRPC_POSIX_FORK + +#include +#include + +/* + * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK + * AROUND VERY SPECIFIC USE CASES. + */ + +int grpc_prefork() { + gpr_log(GPR_ERROR, "Forking not supported on Windows"); + return 0; +} + +void grpc_postfork_parent() {} + +void grpc_postfork_child() {} + +void grpc_fork_handlers_auto_register() {} + +#endif // GRPC_POSIX_FORK diff --git a/src/core/lib/support/fork.c b/src/core/lib/support/fork.c new file mode 100644 index 00000000000..2f29af899dd --- /dev/null +++ b/src/core/lib/support/fork.c @@ -0,0 +1,62 @@ +/* + * + * Copyright 2017 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. + * + */ + +#include "src/core/lib/support/fork.h" + +#include + +#include +#include + +#include "src/core/lib/support/env.h" + +/* + * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK + * AROUND VERY SPECIFIC USE CASES. + */ + +static int override_fork_support_enabled = -1; +static int fork_support_enabled; + +void grpc_fork_support_init() { +#ifdef GRPC_ENABLE_FORK_SUPPORT + fork_support_enabled = 1; +#else + fork_support_enabled = 0; + char *env = gpr_getenv("GRPC_ENABLE_FORK_SUPPORT"); + if (env != NULL) { + static const char *truthy[] = {"yes", "Yes", "YES", "true", + "True", "TRUE", "1"}; + for (size_t i = 0; i < GPR_ARRAY_SIZE(truthy); i++) { + if (0 == strcmp(env, truthy[i])) { + fork_support_enabled = 1; + } + } + gpr_free(env); + } +#endif + if (override_fork_support_enabled != -1) { + fork_support_enabled = override_fork_support_enabled; + } +} + +int grpc_fork_support_enabled() { return fork_support_enabled; } + +void grpc_enable_fork_support(int enable) { + override_fork_support_enabled = enable; +} diff --git a/src/core/lib/support/fork.h b/src/core/lib/support/fork.h new file mode 100644 index 00000000000..215d4214a61 --- /dev/null +++ b/src/core/lib/support/fork.h @@ -0,0 +1,35 @@ +/* + * + * Copyright 2017 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. + * + */ + +#ifndef GRPC_CORE_LIB_SUPPORT_FORK_H +#define GRPC_CORE_LIB_SUPPORT_FORK_H + +/* + * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK + * AROUND VERY SPECIFIC USE CASES. + */ + +void grpc_fork_support_init(void); + +int grpc_fork_support_enabled(void); + +// Test only: Must be called before grpc_init(), and overrides +// environment variables/compile flags +void grpc_enable_fork_support(int enable); + +#endif /* GRPC_CORE_LIB_SUPPORT_FORK_H */ diff --git a/src/core/lib/support/thd_internal.h b/src/core/lib/support/thd_internal.h new file mode 100644 index 00000000000..38bffc847d6 --- /dev/null +++ b/src/core/lib/support/thd_internal.h @@ -0,0 +1,30 @@ +/* + * + * Copyright 2015 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. + * + */ + +#ifndef GRPC_CORE_LIB_SUPPORT_THD_INTERNAL_H +#define GRPC_CORE_LIB_SUPPORT_THD_INTERNAL_H + +#include + +/* Internal interfaces between modules within the gpr support library. */ +void gpr_thd_init(); + +/* Wait for all outstanding threads to finish, up to deadline */ +int gpr_await_threads(gpr_timespec deadline); + +#endif /* GRPC_CORE_LIB_SUPPORT_THD_INTERNAL_H */ diff --git a/src/core/lib/support/thd_posix.c b/src/core/lib/support/thd_posix.c index 98afd10df7c..219297c046b 100644 --- a/src/core/lib/support/thd_posix.c +++ b/src/core/lib/support/thd_posix.c @@ -24,22 +24,34 @@ #include #include +#include #include #include #include #include #include +#include "src/core/lib/support/fork.h" + +static gpr_mu g_mu; +static gpr_cv g_cv; +static int g_thread_count; +static int g_awaiting_threads; + struct thd_arg { void (*body)(void *arg); /* body of a thread */ void *arg; /* argument to a thread */ }; +static void inc_thd_count(); +static void dec_thd_count(); + /* Body of every thread started via gpr_thd_new. */ static void *thread_body(void *v) { struct thd_arg a = *(struct thd_arg *)v; free(v); (*a.body)(a.arg); + dec_thd_count(); return NULL; } @@ -54,6 +66,7 @@ int gpr_thd_new(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg, GPR_ASSERT(a != NULL); a->body = thd_body; a->arg = arg; + inc_thd_count(); GPR_ASSERT(pthread_attr_init(&attr) == 0); if (gpr_thd_options_is_detached(options)) { @@ -68,6 +81,7 @@ int gpr_thd_new(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg, if (!thread_started) { /* don't use gpr_free, as this was allocated using malloc (see above) */ free(a); + dec_thd_count(); } *t = (gpr_thd_id)p; return thread_started; @@ -77,4 +91,46 @@ gpr_thd_id gpr_thd_currentid(void) { return (gpr_thd_id)pthread_self(); } void gpr_thd_join(gpr_thd_id t) { pthread_join((pthread_t)t, NULL); } +/***************************************** + * Only used when fork support is enabled + */ + +static void inc_thd_count() { + if (grpc_fork_support_enabled()) { + gpr_mu_lock(&g_mu); + g_thread_count++; + gpr_mu_unlock(&g_mu); + } +} + +static void dec_thd_count() { + if (grpc_fork_support_enabled()) { + gpr_mu_lock(&g_mu); + g_thread_count--; + if (g_awaiting_threads && g_thread_count == 0) { + gpr_cv_signal(&g_cv); + } + gpr_mu_unlock(&g_mu); + } +} + +void gpr_thd_init() { + gpr_mu_init(&g_mu); + gpr_cv_init(&g_cv); + g_thread_count = 0; + g_awaiting_threads = 0; +} + +int gpr_await_threads(gpr_timespec deadline) { + gpr_mu_lock(&g_mu); + g_awaiting_threads = 1; + int res = 0; + if (g_thread_count > 0) { + res = gpr_cv_wait(&g_cv, &g_mu, deadline); + } + g_awaiting_threads = 0; + gpr_mu_unlock(&g_mu); + return res == 0; +} + #endif /* GPR_POSIX_SYNC */ diff --git a/src/core/lib/support/thd_windows.c b/src/core/lib/support/thd_windows.c index 54533e9412b..4c6013bf335 100644 --- a/src/core/lib/support/thd_windows.c +++ b/src/core/lib/support/thd_windows.c @@ -50,6 +50,8 @@ static void destroy_thread(struct thd_info *t) { gpr_free(t); } +void gpr_thd_init(void) {} + /* Body of every thread started via gpr_thd_new. */ static DWORD WINAPI thread_body(void *v) { g_thd_info = (struct thd_info *)v; diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index b089da2c54f..b04fa3d1539 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -39,6 +40,8 @@ #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/support/fork.h" +#include "src/core/lib/support/thd_internal.h" #include "src/core/lib/surface/alarm_internal.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/call.h" @@ -62,9 +65,11 @@ static int g_initializations; static void do_basic_init(void) { gpr_log_verbosity_init(); + grpc_fork_support_init(); gpr_mu_init(&g_init_mu); grpc_register_built_in_plugins(); g_initializations = 0; + grpc_fork_handlers_auto_register(); } static bool append_filter(grpc_exec_ctx *exec_ctx, @@ -121,6 +126,7 @@ void grpc_init(void) { gpr_mu_lock(&g_init_mu); if (++g_initializations == 1) { gpr_time_init(); + gpr_thd_init(); grpc_stats_init(); grpc_slice_intern_init(); grpc_mdctx_global_init(); diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 7b684f2a585..792ac1751be 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -30,6 +30,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_posix.c', 'src/core/lib/support/env_windows.c', + 'src/core/lib/support/fork.c', 'src/core/lib/support/histogram.c', 'src/core/lib/support/host_port.c', 'src/core/lib/support/log.c', @@ -95,6 +96,8 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/ev_windows.c', 'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fork_posix.c', + 'src/core/lib/iomgr/fork_windows.c', 'src/core/lib/iomgr/gethostname_fallback.c', 'src/core/lib/iomgr/gethostname_host_name_max.c', 'src/core/lib/iomgr/gethostname_sysconf.c', diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index d36d116afb8..8a7828d4c21 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -29,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 715237aa4b2..7e34fd6517e 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -875,6 +875,7 @@ include/grpc++/support/time.h \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ +include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security_constants.h \ @@ -887,6 +888,7 @@ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/exec_ctx_fwd.h \ +include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/grpc_types.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 46ce98f7b32..6a6efa2bbc3 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -876,6 +876,7 @@ include/grpc++/support/time.h \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ +include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security_constants.h \ @@ -888,6 +889,7 @@ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/exec_ctx_fwd.h \ +include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ include/grpc/impl/codegen/grpc_types.h \ @@ -1031,6 +1033,7 @@ src/core/lib/support/atomic_with_std.h \ src/core/lib/support/backoff.h \ src/core/lib/support/block_annotate.h \ src/core/lib/support/env.h \ +src/core/lib/support/fork.h \ src/core/lib/support/memory.h \ src/core/lib/support/mpscq.h \ src/core/lib/support/murmur_hash.h \ @@ -1038,6 +1041,7 @@ src/core/lib/support/spinlock.h \ src/core/lib/support/stack_lockfree.h \ src/core/lib/support/string.h \ src/core/lib/support/string_windows.h \ +src/core/lib/support/thd_internal.h \ src/core/lib/support/time_precise.h \ src/core/lib/support/tmpfile.h \ src/core/lib/surface/alarm_internal.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index b8514fe3114..b9a3c3b4153 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -799,6 +799,7 @@ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/census.h \ include/grpc/compression.h \ +include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security.h \ @@ -816,6 +817,8 @@ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/exec_ctx_fwd.h \ +include/grpc/impl/codegen/fork.h \ +include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 33cafacdde1..8112c035674 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -799,6 +799,7 @@ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/census.h \ include/grpc/compression.h \ +include/grpc/fork.h \ include/grpc/grpc.h \ include/grpc/grpc_posix.h \ include/grpc/grpc_security.h \ @@ -816,6 +817,8 @@ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/exec_ctx_fwd.h \ +include/grpc/impl/codegen/fork.h \ +include/grpc/impl/codegen/fork.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_slice.h \ include/grpc/impl/codegen/gpr_types.h \ @@ -1126,6 +1129,8 @@ src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/exec_ctx.h \ src/core/lib/iomgr/executor.c \ src/core/lib/iomgr/executor.h \ +src/core/lib/iomgr/fork_posix.c \ +src/core/lib/iomgr/fork_windows.c \ src/core/lib/iomgr/gethostname.h \ src/core/lib/iomgr/gethostname_fallback.c \ src/core/lib/iomgr/gethostname_host_name_max.c \ @@ -1313,6 +1318,8 @@ src/core/lib/support/env.h \ src/core/lib/support/env_linux.c \ src/core/lib/support/env_posix.c \ src/core/lib/support/env_windows.c \ +src/core/lib/support/fork.c \ +src/core/lib/support/fork.h \ src/core/lib/support/histogram.c \ src/core/lib/support/host_port.c \ src/core/lib/support/log.c \ @@ -1340,6 +1347,7 @@ src/core/lib/support/sync.c \ src/core/lib/support/sync_posix.c \ src/core/lib/support/sync_windows.c \ src/core/lib/support/thd.c \ +src/core/lib/support/thd_internal.h \ src/core/lib/support/thd_posix.c \ src/core/lib/support/thd_windows.c \ src/core/lib/support/time.c \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index c46eb726c8a..eaf4eda609c 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -7782,6 +7782,7 @@ "src/core/lib/support/env_linux.c", "src/core/lib/support/env_posix.c", "src/core/lib/support/env_windows.c", + "src/core/lib/support/fork.c", "src/core/lib/support/histogram.c", "src/core/lib/support/host_port.c", "src/core/lib/support/log.c", @@ -7857,6 +7858,7 @@ "src/core/lib/support/backoff.h", "src/core/lib/support/block_annotate.h", "src/core/lib/support/env.h", + "src/core/lib/support/fork.h", "src/core/lib/support/memory.h", "src/core/lib/support/mpscq.h", "src/core/lib/support/murmur_hash.h", @@ -7864,6 +7866,7 @@ "src/core/lib/support/stack_lockfree.h", "src/core/lib/support/string.h", "src/core/lib/support/string_windows.h", + "src/core/lib/support/thd_internal.h", "src/core/lib/support/time_precise.h", "src/core/lib/support/tmpfile.h" ], @@ -7906,6 +7909,7 @@ "src/core/lib/support/backoff.h", "src/core/lib/support/block_annotate.h", "src/core/lib/support/env.h", + "src/core/lib/support/fork.h", "src/core/lib/support/memory.h", "src/core/lib/support/mpscq.h", "src/core/lib/support/murmur_hash.h", @@ -7913,6 +7917,7 @@ "src/core/lib/support/stack_lockfree.h", "src/core/lib/support/string.h", "src/core/lib/support/string_windows.h", + "src/core/lib/support/thd_internal.h", "src/core/lib/support/time_precise.h", "src/core/lib/support/tmpfile.h" ], @@ -7926,6 +7931,7 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/fork.h", "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", @@ -7943,6 +7949,7 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/fork.h", "include/grpc/impl/codegen/gpr_slice.h", "include/grpc/impl/codegen/gpr_types.h", "include/grpc/impl/codegen/port_platform.h", @@ -8030,6 +8037,8 @@ "src/core/lib/iomgr/ev_windows.c", "src/core/lib/iomgr/exec_ctx.c", "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/fork_posix.c", + "src/core/lib/iomgr/fork_windows.c", "src/core/lib/iomgr/gethostname_fallback.c", "src/core/lib/iomgr/gethostname_host_name_max.c", "src/core/lib/iomgr/gethostname_sysconf.c", @@ -8142,6 +8151,7 @@ "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", + "include/grpc/fork.h", "include/grpc/grpc.h", "include/grpc/grpc_posix.h", "include/grpc/grpc_security_constants.h", @@ -8275,6 +8285,7 @@ "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", + "include/grpc/fork.h", "include/grpc/grpc.h", "include/grpc/grpc_posix.h", "include/grpc/grpc_security_constants.h", From c5731324a4901233c45e1d41ff0be218cbe4e8f5 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Mon, 16 Oct 2017 13:17:02 -0700 Subject: [PATCH 18/30] Bug fixes for fork support --- include/grpc/impl/codegen/fork.h | 5 ++-- src/core/lib/iomgr/fork_posix.c | 45 +++++++++++++++++-------------- src/core/lib/iomgr/fork_windows.c | 5 +--- src/core/lib/iomgr/port.h | 4 +++ 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/include/grpc/impl/codegen/fork.h b/include/grpc/impl/codegen/fork.h index 03c0c4eede5..baec7a2f101 100644 --- a/include/grpc/impl/codegen/fork.h +++ b/include/grpc/impl/codegen/fork.h @@ -24,10 +24,9 @@ * active gRPC function calls between calling grpc_prefork() and * grpc_postfork_parent()/grpc_postfork_child(). * - * Returns 1 on success, 0 otherwise. * * Typical use: - * assert(grpc_prefork() == 1); + * grpc_prefork(); * int pid = fork(); * if (pid) { * grpc_postfork_parent(); @@ -38,7 +37,7 @@ * } */ -int grpc_prefork(); +void grpc_prefork(); void grpc_postfork_parent(); diff --git a/src/core/lib/iomgr/fork_posix.c b/src/core/lib/iomgr/fork_posix.c index 5f2880db379..a55b3a349a2 100644 --- a/src/core/lib/iomgr/fork_posix.c +++ b/src/core/lib/iomgr/fork_posix.c @@ -34,44 +34,49 @@ #include "src/core/lib/support/env.h" #include "src/core/lib/support/fork.h" #include "src/core/lib/support/thd_internal.h" +#include "src/core/lib/surface/init.h" /* * NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK * AROUND VERY SPECIFIC USE CASES. */ -int grpc_prefork() { +void grpc_prefork() { if (!grpc_fork_support_enabled()) { gpr_log(GPR_ERROR, "Fork support not enabled; try running with the " "environment variable GRPC_ENABLE_FORK_SUPPORT=1"); - return 0; + return; } - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_timer_manager_set_threading(false); - grpc_executor_set_threading(&exec_ctx, false); - grpc_exec_ctx_finish(&exec_ctx); - if (!gpr_await_threads( - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(3, GPR_TIMESPAN)))) { - gpr_log(GPR_ERROR, "gRPC thread still active! Cannot fork!"); - return 0; + if (grpc_is_initialized()) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_timer_manager_set_threading(false); + grpc_executor_set_threading(&exec_ctx, false); + grpc_exec_ctx_finish(&exec_ctx); + if (!gpr_await_threads( + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(3, GPR_TIMESPAN)))) { + gpr_log(GPR_ERROR, "gRPC thread still active! Cannot fork!"); + } } - return 1; } void grpc_postfork_parent() { - grpc_timer_manager_set_threading(true); - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_executor_set_threading(&exec_ctx, true); - grpc_exec_ctx_finish(&exec_ctx); + if (grpc_is_initialized()) { + grpc_timer_manager_set_threading(true); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_executor_set_threading(&exec_ctx, true); + grpc_exec_ctx_finish(&exec_ctx); + } } void grpc_postfork_child() { - grpc_timer_manager_set_threading(true); - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_executor_set_threading(&exec_ctx, true); - grpc_exec_ctx_finish(&exec_ctx); + if (grpc_is_initialized()) { + grpc_timer_manager_set_threading(true); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_executor_set_threading(&exec_ctx, true); + grpc_exec_ctx_finish(&exec_ctx); + } } void grpc_fork_handlers_auto_register() { diff --git a/src/core/lib/iomgr/fork_windows.c b/src/core/lib/iomgr/fork_windows.c index 965ddfbd0ba..f9986f33c75 100644 --- a/src/core/lib/iomgr/fork_windows.c +++ b/src/core/lib/iomgr/fork_windows.c @@ -28,10 +28,7 @@ * AROUND VERY SPECIFIC USE CASES. */ -int grpc_prefork() { - gpr_log(GPR_ERROR, "Forking not supported on Windows"); - return 0; -} +void grpc_prefork() { gpr_log(GPR_ERROR, "Forking not supported on Windows"); } void grpc_postfork_parent() {} diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 42033d0ba4b..1970d106d57 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -30,6 +30,7 @@ #define GRPC_HAVE_IP_PKTINFO 1 #define GRPC_HAVE_MSG_NOSIGNAL 1 #define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_POSIX_FORK 1 #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #define GRPC_POSIX_SOCKET 1 #define GRPC_POSIX_SOCKETADDR 1 @@ -59,6 +60,7 @@ #define GRPC_HAVE_MSG_NOSIGNAL 1 #define GRPC_HAVE_UNIX_SOCKET 1 #define GRPC_LINUX_MULTIPOLL_WITH_EPOLL 1 +#define GRPC_POSIX_FORK 1 #define GRPC_POSIX_HOST_NAME_MAX 1 #define GRPC_POSIX_SOCKET 1 #define GRPC_POSIX_SOCKETADDR 1 @@ -90,6 +92,7 @@ #define GRPC_HAVE_SO_NOSIGPIPE 1 #define GRPC_HAVE_UNIX_SOCKET 1 #define GRPC_MSG_IOVLEN_TYPE int +#define GRPC_POSIX_FORK 1 #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #define GRPC_POSIX_SOCKET 1 #define GRPC_POSIX_SOCKETADDR 1 @@ -103,6 +106,7 @@ #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_SO_NOSIGPIPE 1 #define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_POSIX_FORK 1 #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #define GRPC_POSIX_SOCKET 1 #define GRPC_POSIX_SOCKETADDR 1 From 5b76eb9824147c889294c8cf2f37d95e85c6b9a9 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 18 Oct 2017 17:10:33 -0700 Subject: [PATCH 19/30] Use prebuilt ruby artifact docker image from dockerhub --- tools/run_tests/artifacts/build_artifact_ruby.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/artifacts/build_artifact_ruby.sh b/tools/run_tests/artifacts/build_artifact_ruby.sh index 993aaaedbd9..9165a224840 100755 --- a/tools/run_tests/artifacts/build_artifact_ruby.sh +++ b/tools/run_tests/artifacts/build_artifact_ruby.sh @@ -42,6 +42,7 @@ tools/run_tests/helper_scripts/bundle_install_wrapper.sh set -ex +export DOCKERHUB_ORGANIZATION=grpctesting rake gem:native if [ "$SYSTEM" == "Darwin" ] ; then From 41bdeff8783f236c910ff75157da66afd007059a Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Tue, 17 Oct 2017 17:39:57 -0700 Subject: [PATCH 20/30] Fix call object memory leak in ruby, when call object is closed --- src/ruby/ext/grpc/rb_call.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index 29c4a94816b..e920fc86c52 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -221,6 +221,7 @@ static VALUE grpc_rb_call_close(VALUE self) { TypedData_Get_Struct(self, grpc_rb_call, &grpc_call_data_type, call); if (call != NULL) { destroy_call(call); + xfree(RTYPEDDATA_DATA(self)); RTYPEDDATA_DATA(self) = NULL; } return Qnil; From 99a375114a692e79b4807701d352b6026f05aba7 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 20 Oct 2017 14:39:46 -0700 Subject: [PATCH 21/30] Update max-allowed-version of googleauth ruby dependency --- grpc.gemspec | 2 +- templates/grpc.gemspec.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grpc.gemspec b/grpc.gemspec index 83f81a30f15..b7eb6d586ff 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.add_dependency 'google-protobuf', '~> 3.1' - s.add_dependency 'googleauth', '~> 0.5.1' + s.add_dependency 'googleauth', '>= 0.5.1', '< 0.7' s.add_dependency 'googleapis-common-protos-types', '~> 1.0.0' s.add_development_dependency 'bundler', '~> 1.9' diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index 215d5f9df9a..fb54de1c8e2 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -30,7 +30,7 @@ s.platform = Gem::Platform::RUBY s.add_dependency 'google-protobuf', '~> 3.1' - s.add_dependency 'googleauth', '~> 0.5.1' + s.add_dependency 'googleauth', '>= 0.5.1', '< 0.7' s.add_dependency 'googleapis-common-protos-types', '~> 1.0.0' s.add_development_dependency 'bundler', '~> 1.9' From 863a0500dffdefc258a68e5abacc1d01fbbb020b Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 21 Oct 2017 01:46:32 +0200 Subject: [PATCH 22/30] Flagging 1.7.0 --- BUILD | 4 ++-- CMakeLists.txt | 2 +- Makefile | 6 +++--- build.yaml | 4 ++-- gRPC-Core.podspec | 2 +- gRPC-ProtoRPC.podspec | 2 +- gRPC-RxLibrary.podspec | 2 +- gRPC.podspec | 2 +- package.json | 2 +- package.xml | 4 ++-- src/core/lib/surface/version.c | 2 +- src/cpp/common/version_cc.cc | 2 +- src/csharp/Grpc.Core/Version.csproj.include | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages_dotnetcli.bat | 2 +- src/csharp/build_packages_dotnetcli.sh | 4 ++-- src/node/health_check/package.json | 4 ++-- src/node/tools/package.json | 2 +- src/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/GRPCClient/private/version.h | 2 +- src/php/ext/grpc/version.h | 2 +- src/python/grpcio/grpc/_grpcio_metadata.py | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/python/grpcio_health_checking/grpc_version.py | 2 +- src/python/grpcio_reflection/grpc_version.py | 2 +- src/python/grpcio_testing/grpc_version.py | 2 +- src/python/grpcio_tests/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 34 files changed, 41 insertions(+), 41 deletions(-) diff --git a/BUILD b/BUILD index 222cdac6df1..397203d58a8 100644 --- a/BUILD +++ b/BUILD @@ -36,9 +36,9 @@ load( # This should be updated along with build.yaml g_stands_for = "gambit" -core_version = "5.0.0-dev" +core_version = "5.0.0" -version = "1.7.0-pre1" +version = "1.7.0" GPR_PUBLIC_HDRS = [ "include/grpc/support/alloc.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 4586bcaf289..816749473b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ cmake_minimum_required(VERSION 2.8) set(PACKAGE_NAME "grpc") -set(PACKAGE_VERSION "1.7.0-pre1") +set(PACKAGE_VERSION "1.7.0") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") diff --git a/Makefile b/Makefile index 406670f3d22..0aafe50e5c5 100644 --- a/Makefile +++ b/Makefile @@ -410,9 +410,9 @@ E = @echo Q = @ endif -CORE_VERSION = 5.0.0-dev -CPP_VERSION = 1.7.0-pre1 -CSHARP_VERSION = 1.7.0-pre1 +CORE_VERSION = 5.0.0 +CPP_VERSION = 1.7.0 +CSHARP_VERSION = 1.7.0 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 97cc0fb61f2..fbe6aef4dd9 100644 --- a/build.yaml +++ b/build.yaml @@ -12,9 +12,9 @@ settings: '#08': Use "-preN" suffixes to identify pre-release versions '#09': Per-language overrides are possible with (eg) ruby_version tag here '#10': See the expand_version.py for all the quirks here - core_version: 5.0.0-dev + core_version: 5.0.0 g_stands_for: gambit - version: 1.7.0-pre1 + version: 1.7.0 filegroups: - name: census public_headers: diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 48f8f43e8d5..aa198fe72c9 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.7.0-pre1' + version = '1.7.0' s.version = version s.summary = 'Core cross-platform gRPC library, written in C' s.homepage = 'https://grpc.io' diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index 4b7b36a6874..b88b2319b7d 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-ProtoRPC' - version = '1.7.0-pre1' + version = '1.7.0' s.version = version s.summary = 'RPC library for Protocol Buffers, based on gRPC' s.homepage = 'https://grpc.io' diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec index 673239cb90a..215fc735be5 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-RxLibrary' - version = '1.7.0-pre1' + version = '1.7.0' s.version = version s.summary = 'Reactive Extensions library for iOS/OSX.' s.homepage = 'https://grpc.io' diff --git a/gRPC.podspec b/gRPC.podspec index 6c200905416..3cda60cd1b8 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '1.7.0-pre1' + version = '1.7.0' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'https://grpc.io' diff --git a/package.json b/package.json index 55a5a6bcdae..b5dd83f3d7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.7.0-pre1", + "version": "1.7.0", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", diff --git a/package.xml b/package.xml index 472dabbb8de..17503926381 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2017-08-24 - 1.7.0RC1 - 1.7.0RC1 + 1.7.0 + 1.7.0 beta diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index fd6ea4daa9f..2f0610a202e 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -21,6 +21,6 @@ #include -const char *grpc_version_string(void) { return "5.0.0-dev"; } +const char *grpc_version_string(void) { return "5.0.0"; } const char *grpc_g_stands_for(void) { return "gambit"; } diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index 766c6148fee..01b033d04e0 100644 --- a/src/cpp/common/version_cc.cc +++ b/src/cpp/common/version_cc.cc @@ -22,5 +22,5 @@ #include namespace grpc { -grpc::string Version() { return "1.7.0-pre1"; } +grpc::string Version() { return "1.7.0"; } } diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include index 76fd55cf930..b34e64adca7 100755 --- a/src/csharp/Grpc.Core/Version.csproj.include +++ b/src/csharp/Grpc.Core/Version.csproj.include @@ -1,7 +1,7 @@ - 1.7.0-pre1 + 1.7.0 3.3.0 diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index fbffbb079c6..c0de225ca7d 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -38,6 +38,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "1.7.0-pre1"; + public const string CurrentVersion = "1.7.0"; } } diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat index 8377f6ccc78..f25c0038e38 100755 --- a/src/csharp/build_packages_dotnetcli.bat +++ b/src/csharp/build_packages_dotnetcli.bat @@ -13,7 +13,7 @@ @rem limitations under the License. @rem Current package versions -set VERSION=1.7.0-pre1 +set VERSION=1.7.0 @rem Adjust the location of nuget.exe set NUGET=C:\nuget\nuget.exe diff --git a/src/csharp/build_packages_dotnetcli.sh b/src/csharp/build_packages_dotnetcli.sh index 30d2bc6bfcf..a4ec409952b 100755 --- a/src/csharp/build_packages_dotnetcli.sh +++ b/src/csharp/build_packages_dotnetcli.sh @@ -39,7 +39,7 @@ dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts -nuget pack Grpc.nuspec -Version "1.7.0-pre1" -OutputDirectory ../../artifacts -nuget pack Grpc.Tools.nuspec -Version "1.7.0-pre1" -OutputDirectory ../../artifacts +nuget pack Grpc.nuspec -Version "1.7.0" -OutputDirectory ../../artifacts +nuget pack Grpc.Tools.nuspec -Version "1.7.0" -OutputDirectory ../../artifacts (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json index 0942d28018f..e04f75eb5d5 100644 --- a/src/node/health_check/package.json +++ b/src/node/health_check/package.json @@ -1,6 +1,6 @@ { "name": "grpc-health-check", - "version": "1.7.0-pre1", + "version": "1.7.0", "author": "Google Inc.", "description": "Health check service for use with gRPC", "repository": { @@ -15,7 +15,7 @@ } ], "dependencies": { - "grpc": "^1.7.0-pre1", + "grpc": "^1.7.0", "lodash": "^3.9.3", "google-protobuf": "^3.0.0" }, diff --git a/src/node/tools/package.json b/src/node/tools/package.json index 6863b3a57d2..c51553beb85 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "1.7.0-pre1", + "version": "1.7.0", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "https://grpc.io/", diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 19eb0ca1ab2..c1a4b9b0e68 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler-gRPCPlugin' - v = '1.7.0-pre1' + v = '1.7.0' s.version = v s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.' s.description = <<-DESC diff --git a/src/objective-c/GRPCClient/private/version.h b/src/objective-c/GRPCClient/private/version.h index 82748febfd8..978e9a50642 100644 --- a/src/objective-c/GRPCClient/private/version.h +++ b/src/objective-c/GRPCClient/private/version.h @@ -23,4 +23,4 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.7.0-pre1" +#define GRPC_OBJC_VERSION_STRING @"1.7.0" diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h index 4be72ba2bce..ff246302c4b 100644 --- a/src/php/ext/grpc/version.h +++ b/src/php/ext/grpc/version.h @@ -20,6 +20,6 @@ #ifndef VERSION_H #define VERSION_H -#define PHP_GRPC_VERSION "1.7.0RC1" +#define PHP_GRPC_VERSION "1.7.0" #endif /* VERSION_H */ diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index 6cceafffe72..7b3d2632dc4 100644 --- a/src/python/grpcio/grpc/_grpcio_metadata.py +++ b/src/python/grpcio/grpc/_grpcio_metadata.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!! -__version__ = """1.7.0rc1""" +__version__ = """1.7.0""" diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 1a5121247ea..eb8003ce57b 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='1.7.0rc1' +VERSION='1.7.0' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index 5c8f192fb84..56382d734fb 100644 --- a/src/python/grpcio_health_checking/grpc_version.py +++ b/src/python/grpcio_health_checking/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!! -VERSION='1.7.0rc1' +VERSION='1.7.0' diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index 827006c1621..e2c1d4d60da 100644 --- a/src/python/grpcio_reflection/grpc_version.py +++ b/src/python/grpcio_reflection/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!! -VERSION='1.7.0rc1' +VERSION='1.7.0' diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py index e765bf3f935..33d6869ef85 100644 --- a/src/python/grpcio_testing/grpc_version.py +++ b/src/python/grpcio_testing/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!! -VERSION='1.7.0rc1' +VERSION='1.7.0' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index 36048082537..9334327fef9 100644 --- a/src/python/grpcio_tests/grpc_version.py +++ b/src/python/grpcio_tests/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! -VERSION='1.7.0rc1' +VERSION='1.7.0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 1dc79b706ba..570915f8ed6 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -14,5 +14,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '1.7.0.pre1' + VERSION = '1.7.0' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index a27404f9460..e37662847f7 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -14,6 +14,6 @@ module GRPC module Tools - VERSION = '1.7.0.pre1' + VERSION = '1.7.0' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index 81a92d6bd6a..bcc2502dd9f 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='1.7.0rc1' +VERSION='1.7.0' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 7e34fd6517e..021a664a449 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.0-pre1 +PROJECT_NUMBER = 1.7.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 6a6efa2bbc3..bb07aa44a52 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.0-pre1 +PROJECT_NUMBER = 1.7.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index b9a3c3b4153..52dd9a151ec 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 5.0.0-dev +PROJECT_NUMBER = 5.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 8112c035674..ce6c1503f8e 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 5.0.0-dev +PROJECT_NUMBER = 5.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From 94d669e0223fc324feba212ec4e6a1709b769fc4 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Sun, 22 Oct 2017 14:56:10 -0700 Subject: [PATCH 23/30] Supress strict prototype warning in gRPC pods --- gRPC-Core.podspec | 1 + gRPC-ProtoRPC.podspec | 1 + gRPC-RxLibrary.podspec | 4 ++++ gRPC.podspec | 1 + templates/gRPC-Core.podspec.template | 1 + templates/gRPC-ProtoRPC.podspec.template | 1 + templates/gRPC-RxLibrary.podspec.template | 4 ++++ templates/gRPC.podspec.template | 1 + 8 files changed, 14 insertions(+) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 48f8f43e8d5..4d86a625b63 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -85,6 +85,7 @@ Pod::Spec.new do |s| 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } s.default_subspecs = 'Interface', 'Implementation' diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index 4b7b36a6874..ca265035b1e 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -52,5 +52,6 @@ Pod::Spec.new do |s| 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } end diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec index 673239cb90a..f9420686e77 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -44,4 +44,8 @@ Pod::Spec.new do |s| s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" s.private_header_files = "#{src_dir}/private/*.h" s.header_mappings_dir = "#{src_dir}" + + s.pod_target_xcconfig = { + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', + } end diff --git a/gRPC.podspec b/gRPC.podspec index 6c200905416..bb526e84424 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -50,6 +50,7 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } s.subspec 'Main' do |ss| diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index e34bc8331e9..2a583e0388a 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -112,6 +112,7 @@ 'USE_HEADERMAP' => 'NO', 'ALWAYS_SEARCH_USER_PATHS' => 'NO', 'GCC_PREPROCESSOR_DEFINITIONS' => '"$(inherited)" "COCOAPODS=1" "PB_NO_PACKED_STRUCTS=1"', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } s.default_subspecs = 'Interface', 'Implementation' diff --git a/templates/gRPC-ProtoRPC.podspec.template b/templates/gRPC-ProtoRPC.podspec.template index 4d99f6e19fc..d2dcc429ef1 100644 --- a/templates/gRPC-ProtoRPC.podspec.template +++ b/templates/gRPC-ProtoRPC.podspec.template @@ -54,5 +54,6 @@ 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } end diff --git a/templates/gRPC-RxLibrary.podspec.template b/templates/gRPC-RxLibrary.podspec.template index de4ee1e4385..14147d7dc1b 100644 --- a/templates/gRPC-RxLibrary.podspec.template +++ b/templates/gRPC-RxLibrary.podspec.template @@ -46,4 +46,8 @@ s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" s.private_header_files = "#{src_dir}/private/*.h" s.header_mappings_dir = "#{src_dir}" + + s.pod_target_xcconfig = { + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', + } end diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index 4b360cfb4c4..6616e74bd71 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -52,6 +52,7 @@ s.pod_target_xcconfig = { # This is needed by all pods that depend on gRPC-RxLibrary: 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', + 'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', } s.subspec 'Main' do |ss| From eec87415fea76bbb092111185299ebf6be679229 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 24 Oct 2017 11:15:17 +0200 Subject: [PATCH 24/30] unref resource quota on windows --- src/core/lib/iomgr/tcp_windows.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 2cbb97403b0..9b634a2a1fe 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -441,6 +441,7 @@ grpc_endpoint *grpc_tcp_create(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket, tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string); /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); + grpc_resource_quota_unref_internal(exec_ctx, resource_quota); return &tcp->base; } From e18928a02978228110c3937e112c001a721eabba Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Mon, 9 Oct 2017 11:26:53 -0700 Subject: [PATCH 25/30] Use Ruby 2.3 for Brew --- .../internal_ci/helper_scripts/prepare_build_macos_rc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 5a5898f94c4..a50e189e368 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -32,11 +32,12 @@ pip install google-api-python-client --user python export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json # If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests -if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then - brew install jq - ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) - export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" -fi +# TODO(matt-kwong): enable after fixing brew issue +# if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then +# brew install jq +# ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) +# export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" +# fi set +ex # rvm script is very verbose and exits with errorcode source $HOME/.rvm/scripts/rvm From c91983d456966dab5b4232f14a4a3f1084f4b3f1 Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Thu, 19 Oct 2017 15:12:31 -0700 Subject: [PATCH 26/30] Fix brew install issue; enable MacOS test filtering --- .../helper_scripts/prepare_build_macos_rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index a50e189e368..5196c7b536d 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -32,12 +32,12 @@ pip install google-api-python-client --user python export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json # If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests -# TODO(matt-kwong): enable after fixing brew issue -# if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then -# brew install jq -# ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) -# export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" -# fi +if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then + brew update + brew install jq + ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref) + export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch" +fi set +ex # rvm script is very verbose and exits with errorcode source $HOME/.rvm/scripts/rvm From 40ba62f2a2b4b03ee03ed67a1920c033285fd155 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 26 Oct 2017 20:17:26 -0700 Subject: [PATCH 27/30] Bump v1.7.x branch to 1.7.1 --- BUILD | 2 +- CMakeLists.txt | 2 +- Makefile | 4 ++-- build.yaml | 2 +- gRPC-Core.podspec | 2 +- gRPC-ProtoRPC.podspec | 2 +- gRPC-RxLibrary.podspec | 2 +- gRPC.podspec | 2 +- package.json | 2 +- package.xml | 4 ++-- src/cpp/common/version_cc.cc | 2 +- src/csharp/Grpc.Core/Version.csproj.include | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 4 ++-- src/csharp/build_packages_dotnetcli.bat | 2 +- src/csharp/build_packages_dotnetcli.sh | 4 ++-- src/node/health_check/package.json | 4 ++-- src/node/tools/package.json | 2 +- src/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/GRPCClient/private/version.h | 2 +- src/php/composer.json | 2 +- src/php/ext/grpc/version.h | 2 +- src/python/grpcio/grpc/_grpcio_metadata.py | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/python/grpcio_health_checking/grpc_version.py | 2 +- src/python/grpcio_reflection/grpc_version.py | 2 +- src/python/grpcio_testing/grpc_version.py | 2 +- src/python/grpcio_tests/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- 32 files changed, 37 insertions(+), 37 deletions(-) diff --git a/BUILD b/BUILD index 397203d58a8..e61fed86efc 100644 --- a/BUILD +++ b/BUILD @@ -38,7 +38,7 @@ g_stands_for = "gambit" core_version = "5.0.0" -version = "1.7.0" +version = "1.7.1" GPR_PUBLIC_HDRS = [ "include/grpc/support/alloc.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 816749473b3..a5f472f4b5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ cmake_minimum_required(VERSION 2.8) set(PACKAGE_NAME "grpc") -set(PACKAGE_VERSION "1.7.0") +set(PACKAGE_VERSION "1.7.1") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") diff --git a/Makefile b/Makefile index 0aafe50e5c5..eeb830e34b0 100644 --- a/Makefile +++ b/Makefile @@ -411,8 +411,8 @@ Q = @ endif CORE_VERSION = 5.0.0 -CPP_VERSION = 1.7.0 -CSHARP_VERSION = 1.7.0 +CPP_VERSION = 1.7.1 +CSHARP_VERSION = 1.7.1 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index fbe6aef4dd9..159bc2d0e33 100644 --- a/build.yaml +++ b/build.yaml @@ -14,7 +14,7 @@ settings: '#10': See the expand_version.py for all the quirks here core_version: 5.0.0 g_stands_for: gambit - version: 1.7.0 + version: 1.7.1 filegroups: - name: census public_headers: diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 213fb54680b..33d399d9419 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.7.0' + version = '1.7.1' s.version = version s.summary = 'Core cross-platform gRPC library, written in C' s.homepage = 'https://grpc.io' diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index 39a76b84b17..6ae01ed73b4 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-ProtoRPC' - version = '1.7.0' + version = '1.7.1' s.version = version s.summary = 'RPC library for Protocol Buffers, based on gRPC' s.homepage = 'https://grpc.io' diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec index a90a8bc70a8..aa1ec3bad90 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-RxLibrary' - version = '1.7.0' + version = '1.7.1' s.version = version s.summary = 'Reactive Extensions library for iOS/OSX.' s.homepage = 'https://grpc.io' diff --git a/gRPC.podspec b/gRPC.podspec index 16452cd7bf1..f2957a6a885 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '1.7.0' + version = '1.7.1' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'https://grpc.io' diff --git a/package.json b/package.json index b5dd83f3d7e..b9c2840e0d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.7.0", + "version": "1.7.1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", diff --git a/package.xml b/package.xml index 17503926381..4710deab245 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2017-08-24 - 1.7.0 - 1.7.0 + 1.7.1 + 1.7.1 beta diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index 01b033d04e0..27c386a20e0 100644 --- a/src/cpp/common/version_cc.cc +++ b/src/cpp/common/version_cc.cc @@ -22,5 +22,5 @@ #include namespace grpc { -grpc::string Version() { return "1.7.0"; } +grpc::string Version() { return "1.7.1"; } } diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include index b34e64adca7..12d8b5fb0be 100755 --- a/src/csharp/Grpc.Core/Version.csproj.include +++ b/src/csharp/Grpc.Core/Version.csproj.include @@ -1,7 +1,7 @@ - 1.7.0 + 1.7.1 3.3.0 diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index c0de225ca7d..f7971b761e1 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -33,11 +33,11 @@ namespace Grpc.Core /// /// Current AssemblyFileVersion of gRPC C# assemblies /// - public const string CurrentAssemblyFileVersion = "1.7.0.0"; + public const string CurrentAssemblyFileVersion = "1.7.1.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "1.7.0"; + public const string CurrentVersion = "1.7.1"; } } diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat index f25c0038e38..77a262fcb6d 100755 --- a/src/csharp/build_packages_dotnetcli.bat +++ b/src/csharp/build_packages_dotnetcli.bat @@ -13,7 +13,7 @@ @rem limitations under the License. @rem Current package versions -set VERSION=1.7.0 +set VERSION=1.7.1 @rem Adjust the location of nuget.exe set NUGET=C:\nuget\nuget.exe diff --git a/src/csharp/build_packages_dotnetcli.sh b/src/csharp/build_packages_dotnetcli.sh index a4ec409952b..6eac9da1fd7 100755 --- a/src/csharp/build_packages_dotnetcli.sh +++ b/src/csharp/build_packages_dotnetcli.sh @@ -39,7 +39,7 @@ dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts -nuget pack Grpc.nuspec -Version "1.7.0" -OutputDirectory ../../artifacts -nuget pack Grpc.Tools.nuspec -Version "1.7.0" -OutputDirectory ../../artifacts +nuget pack Grpc.nuspec -Version "1.7.1" -OutputDirectory ../../artifacts +nuget pack Grpc.Tools.nuspec -Version "1.7.1" -OutputDirectory ../../artifacts (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json index e04f75eb5d5..59fe3bcee15 100644 --- a/src/node/health_check/package.json +++ b/src/node/health_check/package.json @@ -1,6 +1,6 @@ { "name": "grpc-health-check", - "version": "1.7.0", + "version": "1.7.1", "author": "Google Inc.", "description": "Health check service for use with gRPC", "repository": { @@ -15,7 +15,7 @@ } ], "dependencies": { - "grpc": "^1.7.0", + "grpc": "^1.7.1", "lodash": "^3.9.3", "google-protobuf": "^3.0.0" }, diff --git a/src/node/tools/package.json b/src/node/tools/package.json index c51553beb85..bc94731d8f8 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "1.7.0", + "version": "1.7.1", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "https://grpc.io/", diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index c1a4b9b0e68..c0bf8f66654 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler-gRPCPlugin' - v = '1.7.0' + v = '1.7.1' s.version = v s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.' s.description = <<-DESC diff --git a/src/objective-c/GRPCClient/private/version.h b/src/objective-c/GRPCClient/private/version.h index 978e9a50642..5c8d85629c2 100644 --- a/src/objective-c/GRPCClient/private/version.h +++ b/src/objective-c/GRPCClient/private/version.h @@ -23,4 +23,4 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.7.0" +#define GRPC_OBJC_VERSION_STRING @"1.7.1" diff --git a/src/php/composer.json b/src/php/composer.json index 3606a18f341..0236a9efa2b 100644 --- a/src/php/composer.json +++ b/src/php/composer.json @@ -2,7 +2,7 @@ "name": "grpc/grpc-dev", "description": "gRPC library for PHP - for Developement use only", "license": "Apache-2.0", - "version": "1.7.0", + "version": "1.7.1", "require": { "php": ">=5.5.0", "google/protobuf": "^v3.3.0" diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h index ff246302c4b..14e7480d28b 100644 --- a/src/php/ext/grpc/version.h +++ b/src/php/ext/grpc/version.h @@ -20,6 +20,6 @@ #ifndef VERSION_H #define VERSION_H -#define PHP_GRPC_VERSION "1.7.0" +#define PHP_GRPC_VERSION "1.7.1" #endif /* VERSION_H */ diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index 7b3d2632dc4..e543b502507 100644 --- a/src/python/grpcio/grpc/_grpcio_metadata.py +++ b/src/python/grpcio/grpc/_grpcio_metadata.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!! -__version__ = """1.7.0""" +__version__ = """1.7.1""" diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index eb8003ce57b..fa44e29e00a 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='1.7.0' +VERSION='1.7.1' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index 56382d734fb..c1b030d3399 100644 --- a/src/python/grpcio_health_checking/grpc_version.py +++ b/src/python/grpcio_health_checking/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!! -VERSION='1.7.0' +VERSION='1.7.1' diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index e2c1d4d60da..80ac855af4e 100644 --- a/src/python/grpcio_reflection/grpc_version.py +++ b/src/python/grpcio_reflection/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!! -VERSION='1.7.0' +VERSION='1.7.1' diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py index 33d6869ef85..1622c6b75b9 100644 --- a/src/python/grpcio_testing/grpc_version.py +++ b/src/python/grpcio_testing/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!! -VERSION='1.7.0' +VERSION='1.7.1' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index 9334327fef9..de723be3e0d 100644 --- a/src/python/grpcio_tests/grpc_version.py +++ b/src/python/grpcio_tests/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! -VERSION='1.7.0' +VERSION='1.7.1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 570915f8ed6..f8d626158bf 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -14,5 +14,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '1.7.0' + VERSION = '1.7.1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index e37662847f7..65c81bc31f2 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -14,6 +14,6 @@ module GRPC module Tools - VERSION = '1.7.0' + VERSION = '1.7.1' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index bcc2502dd9f..c7c572272b5 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='1.7.0' +VERSION='1.7.1' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 021a664a449..a0d2cffc724 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.0 +PROJECT_NUMBER = 1.7.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index bb07aa44a52..1874830d82c 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.0 +PROJECT_NUMBER = 1.7.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From e3ee18ada980020ff718332509e0d1d33a8a0885 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Tue, 10 Oct 2017 09:49:10 -0700 Subject: [PATCH 28/30] Fix Windows's memory leak (cherry picked from commit 3290e49a1d5b896b7ce65d658ffef00bf65d35dd) clang-format. (cherry picked from commit c02dbe57c666e26f40e517b6f940f6cbd4bb43fc) --- src/core/lib/support/env_windows.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/lib/support/env_windows.c b/src/core/lib/support/env_windows.c index 652eeb61c67..a6499543f81 100644 --- a/src/core/lib/support/env_windows.c +++ b/src/core/lib/support/env_windows.c @@ -43,7 +43,10 @@ char *gpr_getenv(const char *name) { DWORD ret; ret = GetEnvironmentVariable(tname, NULL, 0); - if (ret == 0) return NULL; + if (ret == 0) { + gpr_free(tname); + return NULL; + } size = ret * (DWORD)sizeof(TCHAR); tresult = gpr_malloc(size); ret = GetEnvironmentVariable(tname, tresult, size); From b32070eff814fa9b6bf2f331aabce0a7ae1af553 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Tue, 31 Oct 2017 14:54:29 -0700 Subject: [PATCH 29/30] remove use of keyword args --- src/ruby/lib/grpc/generic/interceptors.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ruby/lib/grpc/generic/interceptors.rb b/src/ruby/lib/grpc/generic/interceptors.rb index 73faec4b9c7..24482f34515 100644 --- a/src/ruby/lib/grpc/generic/interceptors.rb +++ b/src/ruby/lib/grpc/generic/interceptors.rb @@ -41,7 +41,7 @@ module GRPC # @param [Method] method # @param [Hash] metadata # - def request_response(request:, call:, method:, metadata:) + def request_response(request: nil, call: nil, method: nil, metadata: nil) GRPC.logger.debug "Intercepting request response method #{method}" \ " for request #{request} with call #{call} and metadata: #{metadata}" yield @@ -55,7 +55,7 @@ module GRPC # @param [Method] method # @param [Hash] metadata # - def client_streamer(requests:, call:, method:, metadata:) + def client_streamer(requests: nil, call: nil, method: nil, metadata: nil) GRPC.logger.debug "Intercepting client streamer method #{method}" \ " for requests #{requests} with call #{call} and metadata: #{metadata}" yield @@ -69,7 +69,7 @@ module GRPC # @param [Method] method # @param [Hash] metadata # - def server_streamer(request:, call:, method:, metadata:) + def server_streamer(request: nil, call: nil, method: nil, metadata: nil) GRPC.logger.debug "Intercepting server streamer method #{method}" \ " for request #{request} with call #{call} and metadata: #{metadata}" yield @@ -83,7 +83,7 @@ module GRPC # @param [Method] method # @param [Hash] metadata # - def bidi_streamer(requests:, call:, method:, metadata:) + def bidi_streamer(requests: nil, call: nil, method: nil, metadata: nil) GRPC.logger.debug "Intercepting bidi streamer method #{method}" \ " for requests #{requests} with call #{call} and metadata: #{metadata}" yield @@ -102,7 +102,7 @@ module GRPC # @param [GRPC::ActiveCall::SingleReqView] call # @param [Method] method # - def request_response(request:, call:, method:) + def request_response(request: nil, call: nil, method: nil) GRPC.logger.debug "Intercepting request response method #{method}" \ " for request #{request} with call #{call}" yield @@ -114,7 +114,7 @@ module GRPC # @param [GRPC::ActiveCall::MultiReqView] call # @param [Method] method # - def client_streamer(call:, method:) + def client_streamer(call: nil, method: nil) GRPC.logger.debug "Intercepting client streamer method #{method}" \ " with call #{call}" yield @@ -127,7 +127,7 @@ module GRPC # @param [GRPC::ActiveCall::SingleReqView] call # @param [Method] method # - def server_streamer(request:, call:, method:) + def server_streamer(request: nil, call: nil, method: nil) GRPC.logger.debug "Intercepting server streamer method #{method}" \ " for request #{request} with call #{call}" yield @@ -140,7 +140,7 @@ module GRPC # @param [GRPC::ActiveCall::MultiReqView] call # @param [Method] method # - def bidi_streamer(requests:, call:, method:) + def bidi_streamer(requests: nil, call: nil, method: nil) GRPC.logger.debug "Intercepting bidi streamer method #{method}" \ " for requests #{requests} with call #{call}" yield From 9f5163eb85ad14f0a4dfd24846c56d6a20acc838 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 1 Nov 2017 11:07:28 -0700 Subject: [PATCH 30/30] Bump v1.7.x branch to 1.7.2 --- BUILD | 2 +- CMakeLists.txt | 2 +- Makefile | 4 ++-- build.yaml | 2 +- gRPC-Core.podspec | 2 +- gRPC-ProtoRPC.podspec | 2 +- gRPC-RxLibrary.podspec | 2 +- gRPC.podspec | 2 +- package.json | 2 +- package.xml | 4 ++-- src/cpp/common/version_cc.cc | 2 +- src/csharp/Grpc.Core/Version.csproj.include | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 4 ++-- src/csharp/build_packages_dotnetcli.bat | 2 +- src/csharp/build_packages_dotnetcli.sh | 4 ++-- src/node/health_check/package.json | 4 ++-- src/node/tools/package.json | 2 +- src/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/GRPCClient/private/version.h | 2 +- src/php/composer.json | 2 +- src/php/ext/grpc/version.h | 2 +- src/python/grpcio/grpc/_grpcio_metadata.py | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/python/grpcio_health_checking/grpc_version.py | 2 +- src/python/grpcio_reflection/grpc_version.py | 2 +- src/python/grpcio_testing/grpc_version.py | 2 +- src/python/grpcio_tests/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- 32 files changed, 37 insertions(+), 37 deletions(-) diff --git a/BUILD b/BUILD index e61fed86efc..d0c4715969e 100644 --- a/BUILD +++ b/BUILD @@ -38,7 +38,7 @@ g_stands_for = "gambit" core_version = "5.0.0" -version = "1.7.1" +version = "1.7.2" GPR_PUBLIC_HDRS = [ "include/grpc/support/alloc.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index a5f472f4b5f..ccfbccbfa00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ cmake_minimum_required(VERSION 2.8) set(PACKAGE_NAME "grpc") -set(PACKAGE_VERSION "1.7.1") +set(PACKAGE_VERSION "1.7.2") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") diff --git a/Makefile b/Makefile index eeb830e34b0..12d6d6e338d 100644 --- a/Makefile +++ b/Makefile @@ -411,8 +411,8 @@ Q = @ endif CORE_VERSION = 5.0.0 -CPP_VERSION = 1.7.1 -CSHARP_VERSION = 1.7.1 +CPP_VERSION = 1.7.2 +CSHARP_VERSION = 1.7.2 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 159bc2d0e33..ac5a6b27818 100644 --- a/build.yaml +++ b/build.yaml @@ -14,7 +14,7 @@ settings: '#10': See the expand_version.py for all the quirks here core_version: 5.0.0 g_stands_for: gambit - version: 1.7.1 + version: 1.7.2 filegroups: - name: census public_headers: diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 33d399d9419..889fa45c7c3 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.7.1' + version = '1.7.2' s.version = version s.summary = 'Core cross-platform gRPC library, written in C' s.homepage = 'https://grpc.io' diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index 6ae01ed73b4..8b67fba999e 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-ProtoRPC' - version = '1.7.1' + version = '1.7.2' s.version = version s.summary = 'RPC library for Protocol Buffers, based on gRPC' s.homepage = 'https://grpc.io' diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec index aa1ec3bad90..41310a51342 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-RxLibrary' - version = '1.7.1' + version = '1.7.2' s.version = version s.summary = 'Reactive Extensions library for iOS/OSX.' s.homepage = 'https://grpc.io' diff --git a/gRPC.podspec b/gRPC.podspec index f2957a6a885..bd404283d83 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '1.7.1' + version = '1.7.2' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'https://grpc.io' diff --git a/package.json b/package.json index b9c2840e0d6..2b7930ce70c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.7.1", + "version": "1.7.2", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", diff --git a/package.xml b/package.xml index 4710deab245..cd830df75a9 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2017-08-24 - 1.7.1 - 1.7.1 + 1.7.2 + 1.7.2 beta diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index 27c386a20e0..bba873c7829 100644 --- a/src/cpp/common/version_cc.cc +++ b/src/cpp/common/version_cc.cc @@ -22,5 +22,5 @@ #include namespace grpc { -grpc::string Version() { return "1.7.1"; } +grpc::string Version() { return "1.7.2"; } } diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include index 12d8b5fb0be..7cae4a55d40 100755 --- a/src/csharp/Grpc.Core/Version.csproj.include +++ b/src/csharp/Grpc.Core/Version.csproj.include @@ -1,7 +1,7 @@ - 1.7.1 + 1.7.2 3.3.0 diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index f7971b761e1..e4c97ffda76 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -33,11 +33,11 @@ namespace Grpc.Core /// /// Current AssemblyFileVersion of gRPC C# assemblies /// - public const string CurrentAssemblyFileVersion = "1.7.1.0"; + public const string CurrentAssemblyFileVersion = "1.7.2.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "1.7.1"; + public const string CurrentVersion = "1.7.2"; } } diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat index 77a262fcb6d..3be049ae1d0 100755 --- a/src/csharp/build_packages_dotnetcli.bat +++ b/src/csharp/build_packages_dotnetcli.bat @@ -13,7 +13,7 @@ @rem limitations under the License. @rem Current package versions -set VERSION=1.7.1 +set VERSION=1.7.2 @rem Adjust the location of nuget.exe set NUGET=C:\nuget\nuget.exe diff --git a/src/csharp/build_packages_dotnetcli.sh b/src/csharp/build_packages_dotnetcli.sh index 6eac9da1fd7..cf565b2e8d0 100755 --- a/src/csharp/build_packages_dotnetcli.sh +++ b/src/csharp/build_packages_dotnetcli.sh @@ -39,7 +39,7 @@ dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts -nuget pack Grpc.nuspec -Version "1.7.1" -OutputDirectory ../../artifacts -nuget pack Grpc.Tools.nuspec -Version "1.7.1" -OutputDirectory ../../artifacts +nuget pack Grpc.nuspec -Version "1.7.2" -OutputDirectory ../../artifacts +nuget pack Grpc.Tools.nuspec -Version "1.7.2" -OutputDirectory ../../artifacts (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json index 59fe3bcee15..fca3a2a7a6b 100644 --- a/src/node/health_check/package.json +++ b/src/node/health_check/package.json @@ -1,6 +1,6 @@ { "name": "grpc-health-check", - "version": "1.7.1", + "version": "1.7.2", "author": "Google Inc.", "description": "Health check service for use with gRPC", "repository": { @@ -15,7 +15,7 @@ } ], "dependencies": { - "grpc": "^1.7.1", + "grpc": "^1.7.2", "lodash": "^3.9.3", "google-protobuf": "^3.0.0" }, diff --git a/src/node/tools/package.json b/src/node/tools/package.json index bc94731d8f8..99fd8540672 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "1.7.1", + "version": "1.7.2", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "https://grpc.io/", diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index c0bf8f66654..616fa019578 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler-gRPCPlugin' - v = '1.7.1' + v = '1.7.2' s.version = v s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.' s.description = <<-DESC diff --git a/src/objective-c/GRPCClient/private/version.h b/src/objective-c/GRPCClient/private/version.h index 5c8d85629c2..ace39f7e775 100644 --- a/src/objective-c/GRPCClient/private/version.h +++ b/src/objective-c/GRPCClient/private/version.h @@ -23,4 +23,4 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.7.1" +#define GRPC_OBJC_VERSION_STRING @"1.7.2" diff --git a/src/php/composer.json b/src/php/composer.json index 0236a9efa2b..ad448332f10 100644 --- a/src/php/composer.json +++ b/src/php/composer.json @@ -2,7 +2,7 @@ "name": "grpc/grpc-dev", "description": "gRPC library for PHP - for Developement use only", "license": "Apache-2.0", - "version": "1.7.1", + "version": "1.7.2", "require": { "php": ">=5.5.0", "google/protobuf": "^v3.3.0" diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h index 14e7480d28b..1083c2c4f57 100644 --- a/src/php/ext/grpc/version.h +++ b/src/php/ext/grpc/version.h @@ -20,6 +20,6 @@ #ifndef VERSION_H #define VERSION_H -#define PHP_GRPC_VERSION "1.7.1" +#define PHP_GRPC_VERSION "1.7.2" #endif /* VERSION_H */ diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index e543b502507..500a253e540 100644 --- a/src/python/grpcio/grpc/_grpcio_metadata.py +++ b/src/python/grpcio/grpc/_grpcio_metadata.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!! -__version__ = """1.7.1""" +__version__ = """1.7.2""" diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index fa44e29e00a..a5d4b2082b0 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='1.7.1' +VERSION='1.7.2' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index c1b030d3399..dc1bc965032 100644 --- a/src/python/grpcio_health_checking/grpc_version.py +++ b/src/python/grpcio_health_checking/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!! -VERSION='1.7.1' +VERSION='1.7.2' diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index 80ac855af4e..3744cb67dcf 100644 --- a/src/python/grpcio_reflection/grpc_version.py +++ b/src/python/grpcio_reflection/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!! -VERSION='1.7.1' +VERSION='1.7.2' diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py index 1622c6b75b9..fbf9f22ed46 100644 --- a/src/python/grpcio_testing/grpc_version.py +++ b/src/python/grpcio_testing/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!! -VERSION='1.7.1' +VERSION='1.7.2' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index de723be3e0d..abd6b50072b 100644 --- a/src/python/grpcio_tests/grpc_version.py +++ b/src/python/grpcio_tests/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! -VERSION='1.7.1' +VERSION='1.7.2' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index f8d626158bf..9b9007c01fe 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -14,5 +14,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '1.7.1' + VERSION = '1.7.2' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 65c81bc31f2..22fbc5b6deb 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -14,6 +14,6 @@ module GRPC module Tools - VERSION = '1.7.1' + VERSION = '1.7.2' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index c7c572272b5..bc1e96a686f 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='1.7.1' +VERSION='1.7.2' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index a0d2cffc724..064ccb06923 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.1 +PROJECT_NUMBER = 1.7.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 1874830d82c..105aba5267c 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.7.1 +PROJECT_NUMBER = 1.7.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a