From 552b5aace59f0ae556a226684ea48bfc9d8f3e07 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 13 Dec 2017 13:46:23 -0800 Subject: [PATCH 01/13] Delete node-related files again --- binding.gyp | 994 ----------------------------- package.json | 103 --- src/node/health_check/package.json | 29 - src/node/tools/package.json | 41 -- 4 files changed, 1167 deletions(-) delete mode 100644 binding.gyp delete mode 100644 package.json delete mode 100644 src/node/health_check/package.json delete mode 100644 src/node/tools/package.json diff --git a/binding.gyp b/binding.gyp deleted file mode 100644 index cb0a2fbab19..00000000000 --- a/binding.gyp +++ /dev/null @@ -1,994 +0,0 @@ -# GRPC Node gyp file -# This currently builds the Node extension and dependencies -# This file has been automatically generated from a template file. -# Please look at the templates directory instead. -# This file can be regenerated from the template by running -# tools/buildgen/generate_projects.sh - -# 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. - -# Some of this file is built with the help of -# https://n8.io/converting-a-c-library-to-gyp/ -{ - 'variables': { - 'runtime%': 'node', - # Some Node installations use the system installation of OpenSSL, and on - # some systems, the system OpenSSL still does not have ALPN support. This - # will let users recompile gRPC to work without ALPN. - 'grpc_alpn%': 'true', - # Indicates that the library should be built with gcov. - 'grpc_gcov%': 'false', - # Indicates that the library should be built with compatibility for musl - # libc, so that it can run on Alpine Linux. This is only necessary if not - # building on Alpine Linux - 'grpc_alpine%': 'false' - }, - 'target_defaults': { - 'configurations': { - 'Release': { - 'cflags': [ - '-O2', - ], - 'defines': [ - 'NDEBUG', - ], - }, - 'Debug': { - 'cflags': [ - '-O0', - ], - 'defines': [ - '_DEBUG', - 'DEBUG', - ], - }, - }, - 'cflags': [ - '-g', - '-Wall', - '-Wextra', - '-Werror', - '-Wno-long-long', - '-Wno-unused-parameter', - '-DOSATOMIC_USE_INLINED=1', - ], - 'ldflags': [ - '-g', - ], - 'cflags_c': [ - '-Werror', - '-std=c99' - ], - 'cflags_cc': [ - '-Werror', - '-std=c++11' - ], - 'include_dirs': [ - '.', - 'include' - ], - 'defines': [ - 'GPR_BACKWARDS_COMPATIBILITY_MODE', - 'GRPC_ARES=0', - 'GRPC_UV' - ], - 'conditions': [ - ['grpc_gcov=="true"', { - 'cflags': [ - '-O0', - '-fprofile-arcs', - '-ftest-coverage', - '-Wno-return-type', - ], - 'defines': [ - '_DEBUG', - 'DEBUG', - 'GPR_GCOV', - ], - 'ldflags': [ - '-fprofile-arcs', - '-ftest-coverage', - '-rdynamic', - ], - }], - ['grpc_alpine=="true"', { - 'defines': [ - 'GPR_MUSL_LIBC_COMPAT' - ] - }], - ['OS!="win" and runtime=="electron"', { - "defines": [ - 'OPENSSL_NO_THREADS' - ] - }], - # This is the condition for using boringssl - ['OS=="win" or runtime=="electron"', { - "include_dirs": [ - "third_party/boringssl/include" - ], - "defines": [ - 'OPENSSL_NO_ASM' - ] - }, { - 'conditions': [ - ["target_arch=='ia32'", { - "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ] - }], - ["target_arch=='x64'", { - "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ] - }], - ["target_arch=='arm'", { - "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ] - }], - ['grpc_alpn=="true"', { - 'defines': [ - 'TSI_OPENSSL_ALPN_SUPPORT=1' - ], - }, { - 'defines': [ - 'TSI_OPENSSL_ALPN_SUPPORT=0' - ], - }] - ], - 'include_dirs': [ - '<(node_root_dir)/deps/openssl/openssl/include', - ] - }], - ['OS == "win"', { - "include_dirs": [ - "third_party/zlib", - "third_party/cares/cares" - ], - "defines": [ - '_WIN32_WINNT=0x0600', - 'WIN32_LEAN_AND_MEAN', - '_HAS_EXCEPTIONS=0', - 'UNICODE', - '_UNICODE', - 'NOMINMAX', - ], - "msvs_settings": { - 'VCCLCompilerTool': { - 'RuntimeLibrary': 1, # static debug - } - }, - "libraries": [ - "ws2_32" - ] - }, { # OS != "win" - 'include_dirs': [ - '<(node_root_dir)/deps/zlib', - '<(node_root_dir)/deps/cares/include' - ] - }], - ['OS == "mac"', { - 'xcode_settings': { - 'OTHER_CFLAGS': [ - '-g', - '-Wall', - '-Wextra', - '-Werror', - '-Wno-long-long', - '-Wno-unused-parameter', - '-DOSATOMIC_USE_INLINED=1', - ], - 'OTHER_CPLUSPLUSFLAGS': [ - '-g', - '-Wall', - '-Wextra', - '-Werror', - '-Wno-long-long', - '-Wno-unused-parameter', - '-DOSATOMIC_USE_INLINED=1', - '-stdlib=libc++', - '-std=c++11', - '-Wno-error=deprecated-declarations' - ], - }, - }] - ] - }, - 'conditions': [ - ['OS=="win" or runtime=="electron"', { - 'targets': [ - { - 'target_name': 'boringssl', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - ], - 'sources': [ - 'src/boringssl/err_data.c', - 'third_party/boringssl/crypto/aes/aes.c', - 'third_party/boringssl/crypto/aes/key_wrap.c', - 'third_party/boringssl/crypto/aes/mode_wrappers.c', - 'third_party/boringssl/crypto/asn1/a_bitstr.c', - 'third_party/boringssl/crypto/asn1/a_bool.c', - 'third_party/boringssl/crypto/asn1/a_d2i_fp.c', - 'third_party/boringssl/crypto/asn1/a_dup.c', - 'third_party/boringssl/crypto/asn1/a_enum.c', - 'third_party/boringssl/crypto/asn1/a_gentm.c', - 'third_party/boringssl/crypto/asn1/a_i2d_fp.c', - 'third_party/boringssl/crypto/asn1/a_int.c', - 'third_party/boringssl/crypto/asn1/a_mbstr.c', - 'third_party/boringssl/crypto/asn1/a_object.c', - 'third_party/boringssl/crypto/asn1/a_octet.c', - 'third_party/boringssl/crypto/asn1/a_print.c', - 'third_party/boringssl/crypto/asn1/a_strnid.c', - 'third_party/boringssl/crypto/asn1/a_time.c', - 'third_party/boringssl/crypto/asn1/a_type.c', - 'third_party/boringssl/crypto/asn1/a_utctm.c', - 'third_party/boringssl/crypto/asn1/a_utf8.c', - 'third_party/boringssl/crypto/asn1/asn1_lib.c', - 'third_party/boringssl/crypto/asn1/asn1_par.c', - 'third_party/boringssl/crypto/asn1/asn_pack.c', - 'third_party/boringssl/crypto/asn1/f_enum.c', - 'third_party/boringssl/crypto/asn1/f_int.c', - 'third_party/boringssl/crypto/asn1/f_string.c', - 'third_party/boringssl/crypto/asn1/t_bitst.c', - 'third_party/boringssl/crypto/asn1/tasn_dec.c', - 'third_party/boringssl/crypto/asn1/tasn_enc.c', - 'third_party/boringssl/crypto/asn1/tasn_fre.c', - 'third_party/boringssl/crypto/asn1/tasn_new.c', - 'third_party/boringssl/crypto/asn1/tasn_typ.c', - 'third_party/boringssl/crypto/asn1/tasn_utl.c', - 'third_party/boringssl/crypto/asn1/time_support.c', - 'third_party/boringssl/crypto/asn1/x_bignum.c', - 'third_party/boringssl/crypto/asn1/x_long.c', - 'third_party/boringssl/crypto/base64/base64.c', - 'third_party/boringssl/crypto/bio/bio.c', - 'third_party/boringssl/crypto/bio/bio_mem.c', - 'third_party/boringssl/crypto/bio/connect.c', - 'third_party/boringssl/crypto/bio/fd.c', - 'third_party/boringssl/crypto/bio/file.c', - 'third_party/boringssl/crypto/bio/hexdump.c', - 'third_party/boringssl/crypto/bio/pair.c', - 'third_party/boringssl/crypto/bio/printf.c', - 'third_party/boringssl/crypto/bio/socket.c', - 'third_party/boringssl/crypto/bio/socket_helper.c', - 'third_party/boringssl/crypto/bn/add.c', - 'third_party/boringssl/crypto/bn/asm/x86_64-gcc.c', - 'third_party/boringssl/crypto/bn/bn.c', - 'third_party/boringssl/crypto/bn/bn_asn1.c', - 'third_party/boringssl/crypto/bn/cmp.c', - 'third_party/boringssl/crypto/bn/convert.c', - 'third_party/boringssl/crypto/bn/ctx.c', - 'third_party/boringssl/crypto/bn/div.c', - 'third_party/boringssl/crypto/bn/exponentiation.c', - 'third_party/boringssl/crypto/bn/gcd.c', - 'third_party/boringssl/crypto/bn/generic.c', - 'third_party/boringssl/crypto/bn/kronecker.c', - 'third_party/boringssl/crypto/bn/montgomery.c', - 'third_party/boringssl/crypto/bn/montgomery_inv.c', - 'third_party/boringssl/crypto/bn/mul.c', - 'third_party/boringssl/crypto/bn/prime.c', - 'third_party/boringssl/crypto/bn/random.c', - 'third_party/boringssl/crypto/bn/rsaz_exp.c', - 'third_party/boringssl/crypto/bn/shift.c', - 'third_party/boringssl/crypto/bn/sqrt.c', - 'third_party/boringssl/crypto/buf/buf.c', - 'third_party/boringssl/crypto/bytestring/asn1_compat.c', - 'third_party/boringssl/crypto/bytestring/ber.c', - 'third_party/boringssl/crypto/bytestring/cbb.c', - 'third_party/boringssl/crypto/bytestring/cbs.c', - 'third_party/boringssl/crypto/chacha/chacha.c', - 'third_party/boringssl/crypto/cipher/aead.c', - 'third_party/boringssl/crypto/cipher/cipher.c', - 'third_party/boringssl/crypto/cipher/derive_key.c', - 'third_party/boringssl/crypto/cipher/e_aes.c', - 'third_party/boringssl/crypto/cipher/e_chacha20poly1305.c', - 'third_party/boringssl/crypto/cipher/e_des.c', - 'third_party/boringssl/crypto/cipher/e_null.c', - 'third_party/boringssl/crypto/cipher/e_rc2.c', - 'third_party/boringssl/crypto/cipher/e_rc4.c', - 'third_party/boringssl/crypto/cipher/e_ssl3.c', - 'third_party/boringssl/crypto/cipher/e_tls.c', - 'third_party/boringssl/crypto/cipher/tls_cbc.c', - 'third_party/boringssl/crypto/cmac/cmac.c', - 'third_party/boringssl/crypto/conf/conf.c', - 'third_party/boringssl/crypto/cpu-aarch64-linux.c', - 'third_party/boringssl/crypto/cpu-arm-linux.c', - 'third_party/boringssl/crypto/cpu-arm.c', - 'third_party/boringssl/crypto/cpu-intel.c', - 'third_party/boringssl/crypto/cpu-ppc64le.c', - 'third_party/boringssl/crypto/crypto.c', - 'third_party/boringssl/crypto/curve25519/curve25519.c', - 'third_party/boringssl/crypto/curve25519/spake25519.c', - 'third_party/boringssl/crypto/curve25519/x25519-x86_64.c', - 'third_party/boringssl/crypto/des/des.c', - 'third_party/boringssl/crypto/dh/check.c', - 'third_party/boringssl/crypto/dh/dh.c', - 'third_party/boringssl/crypto/dh/dh_asn1.c', - 'third_party/boringssl/crypto/dh/params.c', - 'third_party/boringssl/crypto/digest/digest.c', - 'third_party/boringssl/crypto/digest/digests.c', - 'third_party/boringssl/crypto/dsa/dsa.c', - 'third_party/boringssl/crypto/dsa/dsa_asn1.c', - 'third_party/boringssl/crypto/ec/ec.c', - 'third_party/boringssl/crypto/ec/ec_asn1.c', - 'third_party/boringssl/crypto/ec/ec_key.c', - 'third_party/boringssl/crypto/ec/ec_montgomery.c', - 'third_party/boringssl/crypto/ec/oct.c', - 'third_party/boringssl/crypto/ec/p224-64.c', - 'third_party/boringssl/crypto/ec/p256-64.c', - 'third_party/boringssl/crypto/ec/p256-x86_64.c', - 'third_party/boringssl/crypto/ec/simple.c', - 'third_party/boringssl/crypto/ec/util-64.c', - 'third_party/boringssl/crypto/ec/wnaf.c', - 'third_party/boringssl/crypto/ecdh/ecdh.c', - 'third_party/boringssl/crypto/ecdsa/ecdsa.c', - 'third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c', - 'third_party/boringssl/crypto/engine/engine.c', - 'third_party/boringssl/crypto/err/err.c', - 'third_party/boringssl/crypto/evp/digestsign.c', - 'third_party/boringssl/crypto/evp/evp.c', - 'third_party/boringssl/crypto/evp/evp_asn1.c', - 'third_party/boringssl/crypto/evp/evp_ctx.c', - 'third_party/boringssl/crypto/evp/p_dsa_asn1.c', - 'third_party/boringssl/crypto/evp/p_ec.c', - 'third_party/boringssl/crypto/evp/p_ec_asn1.c', - 'third_party/boringssl/crypto/evp/p_rsa.c', - 'third_party/boringssl/crypto/evp/p_rsa_asn1.c', - 'third_party/boringssl/crypto/evp/pbkdf.c', - 'third_party/boringssl/crypto/evp/print.c', - 'third_party/boringssl/crypto/evp/sign.c', - 'third_party/boringssl/crypto/ex_data.c', - 'third_party/boringssl/crypto/hkdf/hkdf.c', - 'third_party/boringssl/crypto/hmac/hmac.c', - 'third_party/boringssl/crypto/lhash/lhash.c', - 'third_party/boringssl/crypto/md4/md4.c', - 'third_party/boringssl/crypto/md5/md5.c', - 'third_party/boringssl/crypto/mem.c', - 'third_party/boringssl/crypto/modes/cbc.c', - 'third_party/boringssl/crypto/modes/cfb.c', - 'third_party/boringssl/crypto/modes/ctr.c', - 'third_party/boringssl/crypto/modes/gcm.c', - 'third_party/boringssl/crypto/modes/ofb.c', - 'third_party/boringssl/crypto/modes/polyval.c', - 'third_party/boringssl/crypto/obj/obj.c', - 'third_party/boringssl/crypto/obj/obj_xref.c', - 'third_party/boringssl/crypto/pem/pem_all.c', - 'third_party/boringssl/crypto/pem/pem_info.c', - 'third_party/boringssl/crypto/pem/pem_lib.c', - 'third_party/boringssl/crypto/pem/pem_oth.c', - 'third_party/boringssl/crypto/pem/pem_pk8.c', - 'third_party/boringssl/crypto/pem/pem_pkey.c', - 'third_party/boringssl/crypto/pem/pem_x509.c', - 'third_party/boringssl/crypto/pem/pem_xaux.c', - 'third_party/boringssl/crypto/pkcs8/p5_pbev2.c', - 'third_party/boringssl/crypto/pkcs8/p8_pkey.c', - 'third_party/boringssl/crypto/pkcs8/pkcs8.c', - 'third_party/boringssl/crypto/poly1305/poly1305.c', - 'third_party/boringssl/crypto/poly1305/poly1305_arm.c', - 'third_party/boringssl/crypto/poly1305/poly1305_vec.c', - 'third_party/boringssl/crypto/pool/pool.c', - 'third_party/boringssl/crypto/rand/deterministic.c', - 'third_party/boringssl/crypto/rand/fuchsia.c', - 'third_party/boringssl/crypto/rand/rand.c', - 'third_party/boringssl/crypto/rand/urandom.c', - 'third_party/boringssl/crypto/rand/windows.c', - 'third_party/boringssl/crypto/rc4/rc4.c', - 'third_party/boringssl/crypto/refcount_c11.c', - 'third_party/boringssl/crypto/refcount_lock.c', - 'third_party/boringssl/crypto/rsa/blinding.c', - 'third_party/boringssl/crypto/rsa/padding.c', - 'third_party/boringssl/crypto/rsa/rsa.c', - 'third_party/boringssl/crypto/rsa/rsa_asn1.c', - 'third_party/boringssl/crypto/rsa/rsa_impl.c', - 'third_party/boringssl/crypto/sha/sha1-altivec.c', - 'third_party/boringssl/crypto/sha/sha1.c', - 'third_party/boringssl/crypto/sha/sha256.c', - 'third_party/boringssl/crypto/sha/sha512.c', - 'third_party/boringssl/crypto/stack/stack.c', - 'third_party/boringssl/crypto/thread.c', - 'third_party/boringssl/crypto/thread_none.c', - 'third_party/boringssl/crypto/thread_pthread.c', - 'third_party/boringssl/crypto/thread_win.c', - 'third_party/boringssl/crypto/x509/a_digest.c', - 'third_party/boringssl/crypto/x509/a_sign.c', - 'third_party/boringssl/crypto/x509/a_strex.c', - 'third_party/boringssl/crypto/x509/a_verify.c', - 'third_party/boringssl/crypto/x509/algorithm.c', - 'third_party/boringssl/crypto/x509/asn1_gen.c', - 'third_party/boringssl/crypto/x509/by_dir.c', - 'third_party/boringssl/crypto/x509/by_file.c', - 'third_party/boringssl/crypto/x509/i2d_pr.c', - 'third_party/boringssl/crypto/x509/pkcs7.c', - 'third_party/boringssl/crypto/x509/rsa_pss.c', - 'third_party/boringssl/crypto/x509/t_crl.c', - 'third_party/boringssl/crypto/x509/t_req.c', - 'third_party/boringssl/crypto/x509/t_x509.c', - 'third_party/boringssl/crypto/x509/t_x509a.c', - 'third_party/boringssl/crypto/x509/x509.c', - 'third_party/boringssl/crypto/x509/x509_att.c', - 'third_party/boringssl/crypto/x509/x509_cmp.c', - 'third_party/boringssl/crypto/x509/x509_d2.c', - 'third_party/boringssl/crypto/x509/x509_def.c', - 'third_party/boringssl/crypto/x509/x509_ext.c', - 'third_party/boringssl/crypto/x509/x509_lu.c', - 'third_party/boringssl/crypto/x509/x509_obj.c', - 'third_party/boringssl/crypto/x509/x509_r2x.c', - 'third_party/boringssl/crypto/x509/x509_req.c', - 'third_party/boringssl/crypto/x509/x509_set.c', - 'third_party/boringssl/crypto/x509/x509_trs.c', - 'third_party/boringssl/crypto/x509/x509_txt.c', - 'third_party/boringssl/crypto/x509/x509_v3.c', - 'third_party/boringssl/crypto/x509/x509_vfy.c', - 'third_party/boringssl/crypto/x509/x509_vpm.c', - 'third_party/boringssl/crypto/x509/x509cset.c', - 'third_party/boringssl/crypto/x509/x509name.c', - 'third_party/boringssl/crypto/x509/x509rset.c', - 'third_party/boringssl/crypto/x509/x509spki.c', - 'third_party/boringssl/crypto/x509/x509type.c', - 'third_party/boringssl/crypto/x509/x_algor.c', - 'third_party/boringssl/crypto/x509/x_all.c', - 'third_party/boringssl/crypto/x509/x_attrib.c', - 'third_party/boringssl/crypto/x509/x_crl.c', - 'third_party/boringssl/crypto/x509/x_exten.c', - 'third_party/boringssl/crypto/x509/x_info.c', - 'third_party/boringssl/crypto/x509/x_name.c', - 'third_party/boringssl/crypto/x509/x_pkey.c', - 'third_party/boringssl/crypto/x509/x_pubkey.c', - 'third_party/boringssl/crypto/x509/x_req.c', - 'third_party/boringssl/crypto/x509/x_sig.c', - 'third_party/boringssl/crypto/x509/x_spki.c', - 'third_party/boringssl/crypto/x509/x_val.c', - 'third_party/boringssl/crypto/x509/x_x509.c', - 'third_party/boringssl/crypto/x509/x_x509a.c', - 'third_party/boringssl/crypto/x509v3/pcy_cache.c', - 'third_party/boringssl/crypto/x509v3/pcy_data.c', - 'third_party/boringssl/crypto/x509v3/pcy_lib.c', - 'third_party/boringssl/crypto/x509v3/pcy_map.c', - 'third_party/boringssl/crypto/x509v3/pcy_node.c', - 'third_party/boringssl/crypto/x509v3/pcy_tree.c', - 'third_party/boringssl/crypto/x509v3/v3_akey.c', - 'third_party/boringssl/crypto/x509v3/v3_akeya.c', - 'third_party/boringssl/crypto/x509v3/v3_alt.c', - 'third_party/boringssl/crypto/x509v3/v3_bcons.c', - 'third_party/boringssl/crypto/x509v3/v3_bitst.c', - 'third_party/boringssl/crypto/x509v3/v3_conf.c', - 'third_party/boringssl/crypto/x509v3/v3_cpols.c', - 'third_party/boringssl/crypto/x509v3/v3_crld.c', - 'third_party/boringssl/crypto/x509v3/v3_enum.c', - 'third_party/boringssl/crypto/x509v3/v3_extku.c', - 'third_party/boringssl/crypto/x509v3/v3_genn.c', - 'third_party/boringssl/crypto/x509v3/v3_ia5.c', - 'third_party/boringssl/crypto/x509v3/v3_info.c', - 'third_party/boringssl/crypto/x509v3/v3_int.c', - 'third_party/boringssl/crypto/x509v3/v3_lib.c', - 'third_party/boringssl/crypto/x509v3/v3_ncons.c', - 'third_party/boringssl/crypto/x509v3/v3_pci.c', - 'third_party/boringssl/crypto/x509v3/v3_pcia.c', - 'third_party/boringssl/crypto/x509v3/v3_pcons.c', - 'third_party/boringssl/crypto/x509v3/v3_pku.c', - 'third_party/boringssl/crypto/x509v3/v3_pmaps.c', - 'third_party/boringssl/crypto/x509v3/v3_prn.c', - 'third_party/boringssl/crypto/x509v3/v3_purp.c', - 'third_party/boringssl/crypto/x509v3/v3_skey.c', - 'third_party/boringssl/crypto/x509v3/v3_sxnet.c', - 'third_party/boringssl/crypto/x509v3/v3_utl.c', - 'third_party/boringssl/ssl/bio_ssl.c', - 'third_party/boringssl/ssl/custom_extensions.c', - 'third_party/boringssl/ssl/d1_both.c', - 'third_party/boringssl/ssl/d1_lib.c', - 'third_party/boringssl/ssl/d1_pkt.c', - 'third_party/boringssl/ssl/d1_srtp.c', - 'third_party/boringssl/ssl/dtls_method.c', - 'third_party/boringssl/ssl/dtls_record.c', - 'third_party/boringssl/ssl/handshake_client.c', - 'third_party/boringssl/ssl/handshake_server.c', - 'third_party/boringssl/ssl/s3_both.c', - 'third_party/boringssl/ssl/s3_lib.c', - 'third_party/boringssl/ssl/s3_pkt.c', - 'third_party/boringssl/ssl/ssl_aead_ctx.c', - 'third_party/boringssl/ssl/ssl_asn1.c', - 'third_party/boringssl/ssl/ssl_buffer.c', - 'third_party/boringssl/ssl/ssl_cert.c', - 'third_party/boringssl/ssl/ssl_cipher.c', - 'third_party/boringssl/ssl/ssl_ecdh.c', - 'third_party/boringssl/ssl/ssl_file.c', - 'third_party/boringssl/ssl/ssl_lib.c', - 'third_party/boringssl/ssl/ssl_privkey.c', - 'third_party/boringssl/ssl/ssl_privkey_cc.cc', - 'third_party/boringssl/ssl/ssl_session.c', - 'third_party/boringssl/ssl/ssl_stat.c', - 'third_party/boringssl/ssl/ssl_transcript.c', - 'third_party/boringssl/ssl/ssl_x509.c', - 'third_party/boringssl/ssl/t1_enc.c', - 'third_party/boringssl/ssl/t1_lib.c', - 'third_party/boringssl/ssl/tls13_both.c', - 'third_party/boringssl/ssl/tls13_client.c', - 'third_party/boringssl/ssl/tls13_enc.c', - 'third_party/boringssl/ssl/tls13_server.c', - 'third_party/boringssl/ssl/tls_method.c', - 'third_party/boringssl/ssl/tls_record.c', - ], - 'conditions': [ - ['OS == "mac"', { - 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.9' - } - }] - ] - }, - ], - }], - ['OS == "win" and runtime!="electron"', { - 'targets': [ - { - # IMPORTANT WINDOWS BUILD INFORMATION - # This library does not build on Windows without modifying the Node - # development packages that node-gyp downloads in order to build. - # Due to https://github.com/nodejs/node/issues/4932, the headers for - # BoringSSL conflict with the OpenSSL headers included by default - # when including the Node headers. The remedy for this is to remove - # the OpenSSL headers, from the downloaded Node development package, - # which is typically located in `.node-gyp` in your home directory. - # - # This is not true of Electron, which does not have OpenSSL headers. - 'target_name': 'WINDOWS_BUILD_WARNING', - 'rules': [ - { - 'rule_name': 'WINDOWS_BUILD_WARNING', - 'extension': 'S', - 'inputs': [ - 'package.json' - ], - 'outputs': [ - 'ignore_this_part' - ], - 'action': ['echo', 'IMPORTANT: Due to https://github.com/nodejs/node/issues/4932, to build this library on Windows, you must first remove <(node_root_dir)/include/node/openssl/'] - } - ] - }, - ] - }], - ['OS == "win"', { - 'targets': [ - # Only want to compile zlib under Windows - { - 'target_name': 'z', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - ], - 'sources': [ - 'third_party/zlib/adler32.c', - 'third_party/zlib/compress.c', - 'third_party/zlib/crc32.c', - 'third_party/zlib/deflate.c', - 'third_party/zlib/gzclose.c', - 'third_party/zlib/gzlib.c', - 'third_party/zlib/gzread.c', - 'third_party/zlib/gzwrite.c', - 'third_party/zlib/infback.c', - 'third_party/zlib/inffast.c', - 'third_party/zlib/inflate.c', - 'third_party/zlib/inftrees.c', - 'third_party/zlib/trees.c', - 'third_party/zlib/uncompr.c', - 'third_party/zlib/zutil.c', - ] - }, - ] - }] - ], - 'targets': [ - { - 'target_name': 'gpr', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - ], - 'sources': [ - 'src/core/lib/profiling/basic_timers.c', - 'src/core/lib/profiling/stap_timers.c', - 'src/core/lib/support/alloc.c', - 'src/core/lib/support/arena.c', - 'src/core/lib/support/atm.c', - 'src/core/lib/support/avl.c', - 'src/core/lib/support/backoff.c', - 'src/core/lib/support/cmdline.c', - 'src/core/lib/support/cpu_iphone.c', - 'src/core/lib/support/cpu_linux.c', - 'src/core/lib/support/cpu_posix.c', - 'src/core/lib/support/cpu_windows.c', - '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', - 'src/core/lib/support/log_android.c', - 'src/core/lib/support/log_linux.c', - 'src/core/lib/support/log_posix.c', - 'src/core/lib/support/log_windows.c', - 'src/core/lib/support/mpscq.c', - 'src/core/lib/support/murmur_hash.c', - 'src/core/lib/support/stack_lockfree.c', - 'src/core/lib/support/string.c', - 'src/core/lib/support/string_posix.c', - 'src/core/lib/support/string_util_windows.c', - 'src/core/lib/support/string_windows.c', - 'src/core/lib/support/subprocess_posix.c', - 'src/core/lib/support/subprocess_windows.c', - '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_posix.c', - 'src/core/lib/support/thd_windows.c', - 'src/core/lib/support/time.c', - 'src/core/lib/support/time_posix.c', - 'src/core/lib/support/time_precise.c', - 'src/core/lib/support/time_windows.c', - 'src/core/lib/support/tls_pthread.c', - 'src/core/lib/support/tmpfile_msys.c', - 'src/core/lib/support/tmpfile_posix.c', - 'src/core/lib/support/tmpfile_windows.c', - 'src/core/lib/support/wrap_memcpy.c', - ], - 'conditions': [ - ['OS == "mac"', { - 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.9' - } - }] - ] - }, - { - 'target_name': 'grpc', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'gpr', - ], - 'sources': [ - 'src/core/lib/surface/init.c', - 'src/core/lib/channel/channel_args.c', - 'src/core/lib/channel/channel_stack.c', - 'src/core/lib/channel/channel_stack_builder.c', - 'src/core/lib/channel/connected_channel.c', - 'src/core/lib/channel/handshaker.c', - 'src/core/lib/channel/handshaker_factory.c', - 'src/core/lib/channel/handshaker_registry.c', - 'src/core/lib/compression/compression.c', - 'src/core/lib/compression/message_compress.c', - 'src/core/lib/compression/stream_compression.c', - 'src/core/lib/compression/stream_compression_gzip.c', - 'src/core/lib/compression/stream_compression_identity.c', - 'src/core/lib/debug/stats.c', - 'src/core/lib/debug/stats_data.c', - 'src/core/lib/http/format_request.c', - 'src/core/lib/http/httpcli.c', - 'src/core/lib/http/parser.c', - 'src/core/lib/iomgr/call_combiner.c', - 'src/core/lib/iomgr/closure.c', - 'src/core/lib/iomgr/combiner.c', - 'src/core/lib/iomgr/endpoint.c', - 'src/core/lib/iomgr/endpoint_pair_posix.c', - 'src/core/lib/iomgr/endpoint_pair_uv.c', - 'src/core/lib/iomgr/endpoint_pair_windows.c', - 'src/core/lib/iomgr/error.c', - 'src/core/lib/iomgr/ev_epoll1_linux.c', - 'src/core/lib/iomgr/ev_epollex_linux.c', - 'src/core/lib/iomgr/ev_epollsig_linux.c', - 'src/core/lib/iomgr/ev_poll_posix.c', - 'src/core/lib/iomgr/ev_posix.c', - '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', - 'src/core/lib/iomgr/iocp_windows.c', - 'src/core/lib/iomgr/iomgr.c', - 'src/core/lib/iomgr/iomgr_posix.c', - 'src/core/lib/iomgr/iomgr_uv.c', - 'src/core/lib/iomgr/iomgr_windows.c', - 'src/core/lib/iomgr/is_epollexclusive_available.c', - 'src/core/lib/iomgr/load_file.c', - 'src/core/lib/iomgr/lockfree_event.c', - 'src/core/lib/iomgr/network_status_tracker.c', - 'src/core/lib/iomgr/polling_entity.c', - 'src/core/lib/iomgr/pollset_set_uv.c', - 'src/core/lib/iomgr/pollset_set_windows.c', - 'src/core/lib/iomgr/pollset_uv.c', - 'src/core/lib/iomgr/pollset_windows.c', - 'src/core/lib/iomgr/resolve_address_posix.c', - 'src/core/lib/iomgr/resolve_address_uv.c', - 'src/core/lib/iomgr/resolve_address_windows.c', - 'src/core/lib/iomgr/resource_quota.c', - 'src/core/lib/iomgr/sockaddr_utils.c', - 'src/core/lib/iomgr/socket_factory_posix.c', - 'src/core/lib/iomgr/socket_mutator.c', - 'src/core/lib/iomgr/socket_utils_common_posix.c', - 'src/core/lib/iomgr/socket_utils_linux.c', - 'src/core/lib/iomgr/socket_utils_posix.c', - 'src/core/lib/iomgr/socket_utils_uv.c', - 'src/core/lib/iomgr/socket_utils_windows.c', - 'src/core/lib/iomgr/socket_windows.c', - 'src/core/lib/iomgr/tcp_client_posix.c', - 'src/core/lib/iomgr/tcp_client_uv.c', - 'src/core/lib/iomgr/tcp_client_windows.c', - 'src/core/lib/iomgr/tcp_posix.c', - 'src/core/lib/iomgr/tcp_server_posix.c', - 'src/core/lib/iomgr/tcp_server_utils_posix_common.c', - 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c', - 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c', - 'src/core/lib/iomgr/tcp_server_uv.c', - 'src/core/lib/iomgr/tcp_server_windows.c', - 'src/core/lib/iomgr/tcp_uv.c', - 'src/core/lib/iomgr/tcp_windows.c', - 'src/core/lib/iomgr/time_averaged_stats.c', - 'src/core/lib/iomgr/timer_generic.c', - 'src/core/lib/iomgr/timer_heap.c', - 'src/core/lib/iomgr/timer_manager.c', - 'src/core/lib/iomgr/timer_uv.c', - 'src/core/lib/iomgr/udp_server.c', - 'src/core/lib/iomgr/unix_sockets_posix.c', - 'src/core/lib/iomgr/unix_sockets_posix_noop.c', - 'src/core/lib/iomgr/wakeup_fd_cv.c', - 'src/core/lib/iomgr/wakeup_fd_eventfd.c', - 'src/core/lib/iomgr/wakeup_fd_nospecial.c', - 'src/core/lib/iomgr/wakeup_fd_pipe.c', - 'src/core/lib/iomgr/wakeup_fd_posix.c', - 'src/core/lib/json/json.c', - 'src/core/lib/json/json_reader.c', - 'src/core/lib/json/json_string.c', - 'src/core/lib/json/json_writer.c', - 'src/core/lib/slice/b64.c', - 'src/core/lib/slice/percent_encoding.c', - 'src/core/lib/slice/slice.c', - 'src/core/lib/slice/slice_buffer.c', - 'src/core/lib/slice/slice_hash_table.c', - 'src/core/lib/slice/slice_intern.c', - 'src/core/lib/slice/slice_string_helpers.c', - 'src/core/lib/surface/alarm.c', - 'src/core/lib/surface/api_trace.c', - 'src/core/lib/surface/byte_buffer.c', - 'src/core/lib/surface/byte_buffer_reader.c', - 'src/core/lib/surface/call.c', - 'src/core/lib/surface/call_details.c', - 'src/core/lib/surface/call_log_batch.c', - 'src/core/lib/surface/channel.c', - 'src/core/lib/surface/channel_init.c', - 'src/core/lib/surface/channel_ping.c', - 'src/core/lib/surface/channel_stack_type.c', - 'src/core/lib/surface/completion_queue.c', - 'src/core/lib/surface/completion_queue_factory.c', - 'src/core/lib/surface/event_string.c', - 'src/core/lib/surface/lame_client.cc', - 'src/core/lib/surface/metadata_array.c', - 'src/core/lib/surface/server.c', - 'src/core/lib/surface/validate_metadata.c', - 'src/core/lib/surface/version.c', - 'src/core/lib/transport/bdp_estimator.c', - 'src/core/lib/transport/byte_stream.c', - 'src/core/lib/transport/connectivity_state.c', - 'src/core/lib/transport/error_utils.c', - 'src/core/lib/transport/metadata.c', - 'src/core/lib/transport/metadata_batch.c', - 'src/core/lib/transport/pid_controller.c', - 'src/core/lib/transport/service_config.c', - 'src/core/lib/transport/static_metadata.c', - 'src/core/lib/transport/status_conversion.c', - 'src/core/lib/transport/timeout_encoding.c', - 'src/core/lib/transport/transport.c', - 'src/core/lib/transport/transport_op_string.c', - 'src/core/lib/debug/trace.c', - 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c', - 'src/core/ext/transport/chttp2/transport/bin_decoder.c', - 'src/core/ext/transport/chttp2/transport/bin_encoder.c', - 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c', - 'src/core/ext/transport/chttp2/transport/chttp2_transport.c', - 'src/core/ext/transport/chttp2/transport/flow_control.c', - 'src/core/ext/transport/chttp2/transport/frame_data.c', - 'src/core/ext/transport/chttp2/transport/frame_goaway.c', - 'src/core/ext/transport/chttp2/transport/frame_ping.c', - 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c', - 'src/core/ext/transport/chttp2/transport/frame_settings.c', - 'src/core/ext/transport/chttp2/transport/frame_window_update.c', - 'src/core/ext/transport/chttp2/transport/hpack_encoder.c', - 'src/core/ext/transport/chttp2/transport/hpack_parser.c', - 'src/core/ext/transport/chttp2/transport/hpack_table.c', - 'src/core/ext/transport/chttp2/transport/http2_settings.c', - 'src/core/ext/transport/chttp2/transport/huffsyms.c', - 'src/core/ext/transport/chttp2/transport/incoming_metadata.c', - 'src/core/ext/transport/chttp2/transport/parsing.c', - 'src/core/ext/transport/chttp2/transport/stream_lists.c', - 'src/core/ext/transport/chttp2/transport/stream_map.c', - 'src/core/ext/transport/chttp2/transport/varint.c', - 'src/core/ext/transport/chttp2/transport/writing.c', - 'src/core/ext/transport/chttp2/alpn/alpn.c', - 'src/core/ext/filters/http/client/http_client_filter.c', - 'src/core/ext/filters/http/http_filters_plugin.c', - 'src/core/ext/filters/http/message_compress/message_compress_filter.c', - 'src/core/ext/filters/http/server/http_server_filter.c', - 'src/core/lib/http/httpcli_security_connector.c', - 'src/core/lib/security/context/security_context.c', - 'src/core/lib/security/credentials/composite/composite_credentials.c', - 'src/core/lib/security/credentials/credentials.c', - 'src/core/lib/security/credentials/credentials_metadata.c', - 'src/core/lib/security/credentials/fake/fake_credentials.c', - 'src/core/lib/security/credentials/google_default/credentials_generic.c', - 'src/core/lib/security/credentials/google_default/google_default_credentials.c', - 'src/core/lib/security/credentials/iam/iam_credentials.c', - 'src/core/lib/security/credentials/jwt/json_token.c', - 'src/core/lib/security/credentials/jwt/jwt_credentials.c', - 'src/core/lib/security/credentials/jwt/jwt_verifier.c', - 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c', - 'src/core/lib/security/credentials/plugin/plugin_credentials.c', - 'src/core/lib/security/credentials/ssl/ssl_credentials.c', - 'src/core/lib/security/transport/client_auth_filter.c', - 'src/core/lib/security/transport/lb_targets_info.c', - 'src/core/lib/security/transport/secure_endpoint.c', - 'src/core/lib/security/transport/security_connector.c', - 'src/core/lib/security/transport/security_handshaker.c', - 'src/core/lib/security/transport/server_auth_filter.c', - 'src/core/lib/security/transport/tsi_error.c', - 'src/core/lib/security/util/json_util.c', - 'src/core/lib/surface/init_secure.c', - 'src/core/tsi/fake_transport_security.c', - 'src/core/tsi/gts_transport_security.c', - 'src/core/tsi/ssl_transport_security.c', - 'src/core/tsi/transport_security_grpc.c', - 'src/core/tsi/transport_security.c', - 'src/core/tsi/transport_security_adapter.c', - 'src/core/ext/transport/chttp2/server/chttp2_server.c', - 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', - 'src/core/ext/filters/client_channel/channel_connectivity.c', - 'src/core/ext/filters/client_channel/client_channel.c', - 'src/core/ext/filters/client_channel/client_channel_factory.c', - 'src/core/ext/filters/client_channel/client_channel_plugin.c', - 'src/core/ext/filters/client_channel/connector.c', - 'src/core/ext/filters/client_channel/http_connect_handshaker.c', - 'src/core/ext/filters/client_channel/http_proxy.c', - 'src/core/ext/filters/client_channel/lb_policy.c', - 'src/core/ext/filters/client_channel/lb_policy_factory.c', - 'src/core/ext/filters/client_channel/lb_policy_registry.c', - 'src/core/ext/filters/client_channel/parse_address.c', - 'src/core/ext/filters/client_channel/proxy_mapper.c', - 'src/core/ext/filters/client_channel/proxy_mapper_registry.c', - 'src/core/ext/filters/client_channel/resolver.c', - 'src/core/ext/filters/client_channel/resolver_factory.c', - 'src/core/ext/filters/client_channel/resolver_registry.c', - 'src/core/ext/filters/client_channel/retry_throttle.c', - 'src/core/ext/filters/client_channel/subchannel.c', - 'src/core/ext/filters/client_channel/subchannel_index.c', - 'src/core/ext/filters/client_channel/uri_parser.c', - 'src/core/ext/filters/deadline/deadline_filter.c', - 'src/core/ext/transport/chttp2/client/chttp2_connector.c', - 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', - 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', - 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', - 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', - 'src/core/ext/transport/inproc/inproc_plugin.c', - 'src/core/ext/transport/inproc/inproc_transport.c', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.c', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', - 'third_party/nanopb/pb_common.c', - 'third_party/nanopb/pb_decode.c', - 'third_party/nanopb/pb_encode.c', - 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.c', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c', - 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c', - 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c', - 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c', - 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c', - 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c', - 'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.c', - 'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c', - 'src/core/ext/filters/load_reporting/server_load_reporting_filter.c', - 'src/core/ext/filters/load_reporting/server_load_reporting_plugin.c', - 'src/core/ext/census/base_resources.c', - 'src/core/ext/census/context.c', - 'src/core/ext/census/gen/census.pb.c', - 'src/core/ext/census/gen/trace_context.pb.c', - 'src/core/ext/census/grpc_context.c', - 'src/core/ext/census/grpc_filter.c', - 'src/core/ext/census/grpc_plugin.c', - 'src/core/ext/census/initialize.c', - 'src/core/ext/census/intrusive_hash_map.c', - 'src/core/ext/census/mlog.c', - 'src/core/ext/census/operation.c', - 'src/core/ext/census/placeholders.c', - 'src/core/ext/census/resource.c', - 'src/core/ext/census/trace_context.c', - 'src/core/ext/census/tracing.c', - 'src/core/ext/filters/max_age/max_age_filter.c', - 'src/core/ext/filters/message_size/message_size_filter.c', - 'src/core/ext/filters/workarounds/workaround_cronet_compression_filter.c', - 'src/core/ext/filters/workarounds/workaround_utils.c', - 'src/core/plugin_registry/grpc_plugin_registry.c', - ], - 'conditions': [ - ['OS == "mac"', { - 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.9' - } - }] - ] - }, - { - 'include_dirs': [ - "=4" - }, - "binary": { - "module_name": "grpc_node", - "module_path": "src/node/extension_binary/{node_abi}-{platform}-{arch}", - "host": "https://storage.googleapis.com/", - "remote_path": "grpc-precompiled-binaries/node/{name}/v{version}", - "package_name": "{node_abi}-{platform}-{arch}.tar.gz" - }, - "files": [ - "LICENSE", - "src/node/README.md", - "src/proto", - "etc", - "src/node/index.js", - "src/node/src", - "src/node/ext", - "include/grpc", - "src/core", - "src/boringssl", - "src/zlib", - "third_party/nanopb", - "third_party/zlib", - "third_party/boringssl", - "binding.gyp" - ], - "main": "src/node/index.js", - "license": "Apache-2.0", - "jshintConfig": { - "bitwise": true, - "curly": true, - "eqeqeq": true, - "esnext": true, - "freeze": true, - "immed": true, - "indent": 2, - "latedef": "nofunc", - "maxlen": 80, - "mocha": true, - "newcap": true, - "node": true, - "noarg": true, - "quotmark": "single", - "strict": true, - "trailing": true, - "undef": true, - "unused": "vars" - } -} diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json deleted file mode 100644 index fca3a2a7a6b..00000000000 --- a/src/node/health_check/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "grpc-health-check", - "version": "1.7.2", - "author": "Google Inc.", - "description": "Health check service for use with gRPC", - "repository": { - "type": "git", - "url": "https://github.com/grpc/grpc.git" - }, - "bugs": "https://github.com/grpc/grpc/issues", - "contributors": [ - { - "name": "Michael Lumish", - "email": "mlumish@google.com" - } - ], - "dependencies": { - "grpc": "^1.7.2", - "lodash": "^3.9.3", - "google-protobuf": "^3.0.0" - }, - "files": [ - "LICENSE", - "health.js", - "v1" - ], - "main": "src/node/index.js", - "license": "Apache-2.0" -} diff --git a/src/node/tools/package.json b/src/node/tools/package.json deleted file mode 100644 index 99fd8540672..00000000000 --- a/src/node/tools/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "grpc-tools", - "version": "1.7.2", - "author": "Google Inc.", - "description": "Tools for developing with gRPC on Node.js", - "homepage": "https://grpc.io/", - "repository": { - "type": "git", - "url": "https://github.com/grpc/grpc.git" - }, - "bugs": "https://github.com/grpc/grpc/issues", - "contributors": [ - { - "name": "Michael Lumish", - "email": "mlumish@google.com" - } - ], - "bin": { - "grpc_tools_node_protoc": "./bin/protoc.js", - "grpc_tools_node_protoc_plugin": "./bin/protoc_plugin.js" - }, - "scripts": { - "install": "./node_modules/.bin/node-pre-gyp install" - }, - "bundledDependencies": ["node-pre-gyp"], - "binary": { - "module_name": "grpc_tools", - "host": "https://storage.googleapis.com/", - "remote_path": "grpc-precompiled-binaries/node/{name}/v{version}", - "package_name": "{platform}-{arch}.tar.gz", - "module_path": "bin" - }, - "files": [ - "index.js", - "bin/protoc.js", - "bin/protoc_plugin.js", - "bin/google/protobuf", - "LICENSE" - ], - "main": "index.js" -} From 0981f9fab1e27c3e40af1df7638a7b69aad1783e Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Thu, 14 Dec 2017 15:13:30 -0800 Subject: [PATCH 02/13] Bump version to 1.8.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.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/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/GRPCClient/private/version.h | 2 +- src/objective-c/tests/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 +- 30 files changed, 34 insertions(+), 34 deletions(-) diff --git a/BUILD b/BUILD index a7cf0a86fb2..798a27ba251 100644 --- a/BUILD +++ b/BUILD @@ -43,7 +43,7 @@ g_stands_for = "generous" core_version = "5.0.0" -version = "1.8.0" +version = "1.8.1" GPR_PUBLIC_HDRS = [ "include/grpc/support/alloc.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a43763a695..28bf8c29d89 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.8.0") +set(PACKAGE_VERSION "1.8.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 5c86ce684bb..9e31c417ab0 100644 --- a/Makefile +++ b/Makefile @@ -412,8 +412,8 @@ Q = @ endif CORE_VERSION = 5.0.0 -CPP_VERSION = 1.8.0 -CSHARP_VERSION = 1.8.0 +CPP_VERSION = 1.8.1 +CSHARP_VERSION = 1.8.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 f1c3947f2fe..369d5b0089d 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: generous - version: 1.8.0 + version: 1.8.1 filegroups: - name: census public_headers: diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index da58500b016..f5eedc16ee1 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.8.0' + version = '1.8.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 0eee127732c..ced12599f95 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-ProtoRPC' - version = '1.8.0' + version = '1.8.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 e292575228e..515c453430c 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-RxLibrary' - version = '1.8.0' + version = '1.8.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 ac3c2d56416..522c3754f76 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '1.8.0' + version = '1.8.1' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'https://grpc.io' diff --git a/package.xml b/package.xml index 16c33325e03..274457debba 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2017-08-24 - 1.8.0 - 1.8.0 + 1.8.1 + 1.8.1 beta diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index f63abcb1127..cebd6f5be92 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.8.0"; } +grpc::string Version() { return "1.8.1"; } } // namespace grpc diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include index a5a2010ea4c..490b9232286 100755 --- a/src/csharp/Grpc.Core/Version.csproj.include +++ b/src/csharp/Grpc.Core/Version.csproj.include @@ -1,7 +1,7 @@ - 1.8.0 + 1.8.1 3.3.0 diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 09af10dba39..bc49218ef1b 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.8.0.0"; + public const string CurrentAssemblyFileVersion = "1.8.1.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "1.8.0"; + public const string CurrentVersion = "1.8.1"; } } diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat index 60ddd85a6fe..392b2fd33bf 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.8.0 +set VERSION=1.8.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 df9f8e99d75..81499232398 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.8.0" -OutputDirectory ../../artifacts -nuget pack Grpc.Tools.nuspec -Version "1.8.0" -OutputDirectory ../../artifacts +nuget pack Grpc.nuspec -Version "1.8.1" -OutputDirectory ../../artifacts +nuget pack Grpc.Tools.nuspec -Version "1.8.1" -OutputDirectory ../../artifacts (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index dab0525ab42..7b4340861da 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.8.0' + v = '1.8.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 2eb9061d79e..dc301b21ffc 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.8.0" +#define GRPC_OBJC_VERSION_STRING @"1.8.1" diff --git a/src/objective-c/tests/version.h b/src/objective-c/tests/version.h index e1a92745a2e..e41c1d98eed 100644 --- a/src/objective-c/tests/version.h +++ b/src/objective-c/tests/version.h @@ -23,5 +23,5 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.8.0" +#define GRPC_OBJC_VERSION_STRING @"1.8.1" #define GRPC_C_VERSION_STRING @"5.0.0" diff --git a/src/php/composer.json b/src/php/composer.json index 09471d23fee..011c66e4bba 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.8.0", + "version": "1.8.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 368d19b7b6f..6bcfdf8229a 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.8.0" +#define PHP_GRPC_VERSION "1.8.1" #endif /* VERSION_H */ diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index d43d4cc500d..802521a869f 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.8.0""" +__version__ = """1.8.1""" diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 3d8885323e3..3bbd3671a65 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.8.0' +VERSION='1.8.1' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index 56aee53b48e..b0891128658 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.8.0' +VERSION='1.8.1' diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index 537fe580501..d3e1d6649c8 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.8.0' +VERSION='1.8.1' diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py index 19a1bf1875f..ebbd9723e4e 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.8.0' +VERSION='1.8.1' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index b45b4f5ca4b..1b648e1bc49 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.8.0' +VERSION='1.8.1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 6d79ec01905..f4b6dec8ffb 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.8.0' + VERSION = '1.8.1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index aa63c101de6..6d35ec4344b 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -14,6 +14,6 @@ module GRPC module Tools - VERSION = '1.8.0' + VERSION = '1.8.1' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index c1472403423..c1aa7ef25ef 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.8.0' +VERSION='1.8.1' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index f1716c7d9fc..4e9f91eedbf 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.8.0 +PROJECT_NUMBER = 1.8.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 d29254b6ead..1c6d14714a6 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.8.0 +PROJECT_NUMBER = 1.8.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 4856782510d24c57fb5f10d5518c8740a5aa70bf Mon Sep 17 00:00:00 2001 From: Ning Ren Date: Mon, 20 Nov 2017 15:24:21 -0800 Subject: [PATCH 03/13] Packs contents of WORKSPACE into a bzl function, so that it can be resued by other projects, and simplifies cares build. --- BUILD | 2 +- WORKSPACE | 119 +--------------------- bazel/grpc_deps.bzl | 112 ++++++++++++++++++++ third_party/BUILD | 6 ++ third_party/cares/BUILD | 9 ++ third_party/cares/cares.BUILD | 38 +++---- third_party/cares/cares_local_files.BUILD | 57 ----------- 7 files changed, 145 insertions(+), 198 deletions(-) create mode 100644 bazel/grpc_deps.bzl create mode 100644 third_party/BUILD create mode 100644 third_party/cares/BUILD delete mode 100644 third_party/cares/cares_local_files.BUILD diff --git a/BUILD b/BUILD index df334cd322f..7e0ed9c44dd 100644 --- a/BUILD +++ b/BUILD @@ -1391,7 +1391,7 @@ grpc_cc_library( ], hdrs = [ "src/core/ext/transport/cronet/transport/cronet_transport.h", - "third_party/objective_c/Cronet/bidirectional_stream_c.h", + "//third_party:objective_c/Cronet/bidirectional_stream_c.h", ], language = "c++", public_hdrs = [ diff --git a/WORKSPACE b/WORKSPACE index cead0bc877b..adce8091628 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,117 +1,4 @@ -bind( - name = "nanopb", - actual = "//third_party/nanopb", -) +workspace(name = "com_github_grpc_grpc") -bind( - name = "libssl", - actual = "@boringssl//:ssl", -) - -bind( - name = "zlib", - actual = "@com_github_madler_zlib//:z", -) - -bind( - name = "protobuf", - actual = "@com_google_protobuf//:protobuf", -) - -bind( - name = "protobuf_clib", - actual = "@com_google_protobuf//:protoc_lib", -) - -bind( - name = "protobuf_headers", - actual = "@com_google_protobuf//:protobuf_headers", -) - -bind( - name = "protocol_compiler", - actual = "@com_google_protobuf//:protoc", -) - -bind( - name = "cares", - actual = "@com_github_cares_cares//:ares", -) - -bind( - name = "gtest", - actual = "@com_github_google_googletest//:gtest", -) - -bind( - name = "gmock", - actual = "@com_github_google_googletest//:gmock", -) - -bind( - name = "benchmark", - actual = "@com_github_google_benchmark//:benchmark", -) - -bind( - name = "gflags", - actual = "@com_github_gflags_gflags//:gflags", -) - -http_archive( - name = "boringssl", - # on the master-with-bazel branch - url = "https://boringssl.googlesource.com/boringssl/+archive/886e7d75368e3f4fab3f4d0d3584e4abfc557755.tar.gz", -) - -new_http_archive( - name = "com_github_madler_zlib", - build_file = "third_party/zlib.BUILD", - strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f", - url = "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz", -) - -http_archive( - name = "com_google_protobuf", - strip_prefix = "protobuf-2761122b810fe8861004ae785cc3ab39f384d342", - url = "https://github.com/google/protobuf/archive/2761122b810fe8861004ae785cc3ab39f384d342.tar.gz", -) - -new_http_archive( - name = "com_github_google_googletest", - build_file = "third_party/gtest.BUILD", - strip_prefix = "googletest-ec44c6c1675c25b9827aacd08c02433cccde7780", - url = "https://github.com/google/googletest/archive/ec44c6c1675c25b9827aacd08c02433cccde7780.tar.gz", -) - -http_archive( - name = "com_github_gflags_gflags", - strip_prefix = "gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e", - url = "https://github.com/gflags/gflags/archive/30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.tar.gz", -) - -new_http_archive( - name = "com_github_google_benchmark", - build_file = "third_party/benchmark.BUILD", - strip_prefix = "benchmark-5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8", - url = "https://github.com/google/benchmark/archive/5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8.tar.gz", -) - -new_local_repository( - name = "cares_local_files", - build_file = "third_party/cares/cares_local_files.BUILD", - path = "third_party/cares", -) - -new_http_archive( - name = "com_github_cares_cares", - build_file = "third_party/cares/cares.BUILD", - strip_prefix = "c-ares-3be1924221e1326df520f8498d704a5c4c8d0cce", - url = "https://github.com/c-ares/c-ares/archive/3be1924221e1326df520f8498d704a5c4c8d0cce.tar.gz", -) - -http_archive( - name = "com_google_absl", - strip_prefix = "abseil-cpp-cc4bed2d74f7c8717e31f9579214ab52a9c9c610", - url = "https://github.com/abseil/abseil-cpp/archive/cc4bed2d74f7c8717e31f9579214ab52a9c9c610.tar.gz", -) +load("//bazel:grpc_deps.bzl", "grpc_deps") +grpc_deps() diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl new file mode 100644 index 00000000000..fd848d80e65 --- /dev/null +++ b/bazel/grpc_deps.bzl @@ -0,0 +1,112 @@ +def grpc_deps(): + native.bind( + name = "nanopb", + actual = "@com_github_grpc_grpc//third_party/nanopb", + ) + + native.bind( + name = "libssl", + actual = "@boringssl//:ssl", + ) + + native.bind( + name = "zlib", + actual = "@com_github_madler_zlib//:z", + ) + + native.bind( + name = "protobuf", + actual = "@com_google_protobuf//:protobuf", + ) + + native.bind( + name = "protobuf_clib", + actual = "@com_google_protobuf//:protoc_lib", + ) + + native.bind( + name = "protobuf_headers", + actual = "@com_google_protobuf//:protobuf_headers", + ) + + native.bind( + name = "protocol_compiler", + actual = "@com_google_protobuf//:protoc", + ) + + native.bind( + name = "cares", + actual = "@com_github_cares_cares//:ares", + ) + + native.bind( + name = "gtest", + actual = "@com_github_google_googletest//:gtest", + ) + + native.bind( + name = "gmock", + actual = "@com_github_google_googletest//:gmock", + ) + + native.bind( + name = "benchmark", + actual = "@com_github_google_benchmark//:benchmark", + ) + + native.bind( + name = "gflags", + actual = "@com_github_gflags_gflags//:gflags", + ) + + native.http_archive( + name = "boringssl", + # on the master-with-bazel branch + url = "https://boringssl.googlesource.com/boringssl/+archive/886e7d75368e3f4fab3f4d0d3584e4abfc557755.tar.gz", + ) + + native.new_http_archive( + name = "com_github_madler_zlib", + build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD", + strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f", + url = "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz", + ) + + native.http_archive( + name = "com_google_protobuf", + strip_prefix = "protobuf-80a37e0782d2d702d52234b62dd4b9ec74fd2c95", + url = "https://github.com/google/protobuf/archive/80a37e0782d2d702d52234b62dd4b9ec74fd2c95.tar.gz", + ) + + native.new_http_archive( + name = "com_github_google_googletest", + build_file = "@com_github_grpc_grpc//third_party:gtest.BUILD", + strip_prefix = "googletest-ec44c6c1675c25b9827aacd08c02433cccde7780", + url = "https://github.com/google/googletest/archive/ec44c6c1675c25b9827aacd08c02433cccde7780.tar.gz", + ) + + native.http_archive( + name = "com_github_gflags_gflags", + strip_prefix = "gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e", + url = "https://github.com/gflags/gflags/archive/30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.tar.gz", + ) + + native.new_http_archive( + name = "com_github_google_benchmark", + build_file = "@com_github_grpc_grpc//third_party:benchmark.BUILD", + strip_prefix = "benchmark-5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8", + url = "https://github.com/google/benchmark/archive/5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8.tar.gz", + ) + + native.new_http_archive( + name = "com_github_cares_cares", + build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD", + strip_prefix = "c-ares-3be1924221e1326df520f8498d704a5c4c8d0cce", + url = "https://github.com/c-ares/c-ares/archive/3be1924221e1326df520f8498d704a5c4c8d0cce.tar.gz", + ) + + native.http_archive( + name = "com_google_absl", + strip_prefix = "abseil-cpp-cc4bed2d74f7c8717e31f9579214ab52a9c9c610", + url = "https://github.com/abseil/abseil-cpp/archive/cc4bed2d74f7c8717e31f9579214ab52a9c9c610.tar.gz", + ) diff --git a/third_party/BUILD b/third_party/BUILD new file mode 100644 index 00000000000..dea1229684b --- /dev/null +++ b/third_party/BUILD @@ -0,0 +1,6 @@ +exports_files([ + "benchmark.BUILD", + "gtest.BUILD", + "objective_c/Cronet/bidirectional_stream_c.h", + "zlib.BUILD", +]) diff --git a/third_party/cares/BUILD b/third_party/cares/BUILD new file mode 100644 index 00000000000..ad27d93c0f5 --- /dev/null +++ b/third_party/cares/BUILD @@ -0,0 +1,9 @@ +exports_files([ + "ares_build.h", + "cares.BUILD", + "config_android/ares_config.h", + "config_darwin/ares_config.h", + "config_freebsd/ares_config.h", + "config_linux/ares_config.h", + "config_openbsd/ares_config.h", +]) diff --git a/third_party/cares/cares.BUILD b/third_party/cares/cares.BUILD index 85ca506ab0d..3ac02875e68 100644 --- a/third_party/cares/cares.BUILD +++ b/third_party/cares/cares.BUILD @@ -35,33 +35,27 @@ config_setting( ) genrule( - name = "ares_build", - srcs = ["@cares_local_files//:ares_build_h"], + name = "ares_build_h", + srcs = ["@com_github_grpc_grpc//third_party/cares:ares_build.h"], outs = ["ares_build.h"], - cmd = "cat $(location @cares_local_files//:ares_build_h) > $@", + cmd = "cat $< > $@", ) -# cc_library( -# name = "ares_build_h", -# hdrs = ["ares_build.h"], -# data = [":ares_build"], -# includes = ["."], -# ) - genrule( - name = "ares_config", - srcs = ["@cares_local_files//:ares_config_h"], + name = "ares_config_h", + srcs = select({ + ":ios_x86_64": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"], + ":ios_armv7": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"], + ":ios_armv7s": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"], + ":ios_arm64": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"], + ":darwin": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"], + ":android": ["@com_github_grpc_grpc//third_party/cares:config_android/ares_config.h"], + "//conditions:default": ["@com_github_grpc_grpc//third_party/cares:config_linux/ares_config.h"], + }), outs = ["ares_config.h"], - cmd = "cat $(location @cares_local_files//:ares_config_h) > $@", + cmd = "cat $< > $@", ) -# cc_library( -# name = "ares_config_h", -# hdrs = ["ares_config.h"], -# data = [":ares_config"], -# includes = ["."], -# ) - cc_library( name = "ares", srcs = [ @@ -147,10 +141,6 @@ cc_library( "-DNOMINMAX", "-DHAVE_CONFIG_H", ], - data = [ - ":ares_build", - ":ares_config", - ], includes = ["."], linkstatic = 1, visibility = [ diff --git a/third_party/cares/cares_local_files.BUILD b/third_party/cares/cares_local_files.BUILD deleted file mode 100644 index fe59447beb3..00000000000 --- a/third_party/cares/cares_local_files.BUILD +++ /dev/null @@ -1,57 +0,0 @@ -package( - default_visibility = ["//visibility:public"], -) - -config_setting( - name = "darwin", - values = {"cpu": "darwin"}, -) - -# Android is not officially supported through C++. -# This just helps with the build for now. -config_setting( - name = "android", - values = { - "crosstool_top": "//external:android/crosstool", - }, -) - -# iOS is not officially supported through C++. -# This just helps with the build for now. -config_setting( - name = "ios_x86_64", - values = {"cpu": "ios_x86_64"}, -) - -config_setting( - name = "ios_armv7", - values = {"cpu": "ios_armv7"}, -) - -config_setting( - name = "ios_armv7s", - values = {"cpu": "ios_armv7s"}, -) - -config_setting( - name = "ios_arm64", - values = {"cpu": "ios_arm64"}, -) - -filegroup( - name = "ares_build_h", - srcs = ["ares_build.h"], -) - -filegroup( - name = "ares_config_h", - srcs = select({ - ":ios_x86_64": ["config_darwin/ares_config.h"], - ":ios_armv7": ["config_darwin/ares_config.h"], - ":ios_armv7s": ["config_darwin/ares_config.h"], - ":ios_arm64": ["config_darwin/ares_config.h"], - ":darwin": ["config_darwin/ares_config.h"], - ":android": ["config_android/ares_config.h"], - "//conditions:default": ["config_linux/ares_config.h"], - }), -) From e8cdc2dbbf3ef8267eea51f1b48fb3501bd7bdc2 Mon Sep 17 00:00:00 2001 From: Ning Ren Date: Wed, 22 Nov 2017 17:30:04 -0800 Subject: [PATCH 04/13] Depends third_party/nanopb via workspace relative-path to pass bazel's dependency check. Otherwise include "third_party/nanopb/pb.h" will find local ph.h rather than the one in "//external:nanopb". --- BUILD | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/BUILD b/BUILD index 7e0ed9c44dd..d83a175179c 100644 --- a/BUILD +++ b/BUILD @@ -417,13 +417,14 @@ grpc_cc_library( "src/core/ext/census/grpc_context.cc", ], external_deps = [ - "nanopb", + "libssl", ], language = "c++", public_hdrs = [ "include/grpc/census.h", ], deps = [ + "//third_party/nanopb", "grpc_base", ], ) @@ -1009,11 +1010,9 @@ grpc_cc_library( "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", ], - external_deps = [ - "nanopb", - ], language = "c++", deps = [ + "//third_party/nanopb", "grpc_base", "grpc_client_channel", "grpc_resolver_fake", @@ -1038,11 +1037,9 @@ grpc_cc_library( "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", ], - external_deps = [ - "nanopb", - ], language = "c++", deps = [ + "//third_party/nanopb", "grpc_base", "grpc_client_channel", "grpc_resolver_fake", From 0678db7e248aff59ea131fe0dd9b1ffdc0b38867 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 29 Nov 2017 17:06:16 -0800 Subject: [PATCH 05/13] Move more special cases in bazel build to the .bzl files --- BUILD | 13 +- bazel/grpc_build_system.bzl | 37 +++-- bazel/grpc_deps.bzl | 129 ++++++++++-------- .../run_tests/sanity/check_bazel_workspace.py | 86 +++++++++++- 4 files changed, 190 insertions(+), 75 deletions(-) diff --git a/BUILD b/BUILD index d83a175179c..df334cd322f 100644 --- a/BUILD +++ b/BUILD @@ -417,14 +417,13 @@ grpc_cc_library( "src/core/ext/census/grpc_context.cc", ], external_deps = [ - "libssl", + "nanopb", ], language = "c++", public_hdrs = [ "include/grpc/census.h", ], deps = [ - "//third_party/nanopb", "grpc_base", ], ) @@ -1010,9 +1009,11 @@ grpc_cc_library( "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", ], + external_deps = [ + "nanopb", + ], language = "c++", deps = [ - "//third_party/nanopb", "grpc_base", "grpc_client_channel", "grpc_resolver_fake", @@ -1037,9 +1038,11 @@ grpc_cc_library( "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", ], + external_deps = [ + "nanopb", + ], language = "c++", deps = [ - "//third_party/nanopb", "grpc_base", "grpc_client_channel", "grpc_resolver_fake", @@ -1388,7 +1391,7 @@ grpc_cc_library( ], hdrs = [ "src/core/ext/transport/cronet/transport/cronet_transport.h", - "//third_party:objective_c/Cronet/bidirectional_stream_c.h", + "third_party/objective_c/Cronet/bidirectional_stream_c.h", ], language = "c++", public_hdrs = [ diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index b35ca73745f..8bc973069ae 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -23,6 +23,27 @@ # each change must be ported from one to the other. # +def _get_external_deps(external_deps): + ret = [] + for dep in external_deps: + if dep == "nanopb": + ret.append("//third_party/nanopb") + else: + ret.append("//external:" + dep) + return ret + +def _maybe_update_cc_library_hdrs(hdrs): + ret = [] + hdrs_to_update = { + "third_party/objective_c/Cronet/bidirectional_stream_c.h": "//third_party:objective_c/Cronet/bidirectional_stream_c.h", + } + for h in hdrs: + if h in hdrs_to_update.keys(): + ret.append(hdrs_to_update[h]) + else: + ret.append(h) + return ret + def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++", testonly = False, visibility = None, @@ -33,12 +54,12 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], native.cc_library( name = name, srcs = srcs, - defines = select({ - "//:grpc_no_ares": ["GRPC_ARES=0"], - "//conditions:default": [], - }), - hdrs = hdrs + public_hdrs, - deps = deps + ["//external:" + dep for dep in external_deps], + defines = select({"//:grpc_no_ares": ["GRPC_ARES=0"], + "//conditions:default": [],}) + + select({"//:remote_execution": ["GRPC_PORT_ISOLATED_RUNTIME=1"], + "//conditions:default": [],}), + hdrs = _maybe_update_cc_library_hdrs(hdrs + public_hdrs), + deps = deps + _get_external_deps(external_deps), copts = copts, visibility = visibility, testonly = testonly, @@ -79,7 +100,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data srcs = srcs, args = args, data = data, - deps = deps + ["//external:" + dep for dep in external_deps], + deps = deps + _get_external_deps(external_deps), copts = copts, linkopts = ["-pthread"], ) @@ -95,7 +116,7 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da data = data, testonly = testonly, linkshared = linkshared, - deps = deps + ["//external:" + dep for dep in external_deps], + deps = deps + _get_external_deps(external_deps), copts = copts, linkopts = ["-pthread"] + linkopts, ) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index fd848d80e65..e465312a403 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -1,9 +1,7 @@ -def grpc_deps(): - native.bind( - name = "nanopb", - actual = "@com_github_grpc_grpc//third_party/nanopb", - ) +"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer.""" +def grpc_deps(): + """Loads dependencies need to compile and test the grpc library.""" native.bind( name = "libssl", actual = "@boringssl//:ssl", @@ -59,54 +57,73 @@ def grpc_deps(): actual = "@com_github_gflags_gflags//:gflags", ) - native.http_archive( - name = "boringssl", - # on the master-with-bazel branch - url = "https://boringssl.googlesource.com/boringssl/+archive/886e7d75368e3f4fab3f4d0d3584e4abfc557755.tar.gz", - ) - - native.new_http_archive( - name = "com_github_madler_zlib", - build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD", - strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f", - url = "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz", - ) - - native.http_archive( - name = "com_google_protobuf", - strip_prefix = "protobuf-80a37e0782d2d702d52234b62dd4b9ec74fd2c95", - url = "https://github.com/google/protobuf/archive/80a37e0782d2d702d52234b62dd4b9ec74fd2c95.tar.gz", - ) - - native.new_http_archive( - name = "com_github_google_googletest", - build_file = "@com_github_grpc_grpc//third_party:gtest.BUILD", - strip_prefix = "googletest-ec44c6c1675c25b9827aacd08c02433cccde7780", - url = "https://github.com/google/googletest/archive/ec44c6c1675c25b9827aacd08c02433cccde7780.tar.gz", - ) - - native.http_archive( - name = "com_github_gflags_gflags", - strip_prefix = "gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e", - url = "https://github.com/gflags/gflags/archive/30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.tar.gz", - ) - - native.new_http_archive( - name = "com_github_google_benchmark", - build_file = "@com_github_grpc_grpc//third_party:benchmark.BUILD", - strip_prefix = "benchmark-5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8", - url = "https://github.com/google/benchmark/archive/5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8.tar.gz", - ) - - native.new_http_archive( - name = "com_github_cares_cares", - build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD", - strip_prefix = "c-ares-3be1924221e1326df520f8498d704a5c4c8d0cce", - url = "https://github.com/c-ares/c-ares/archive/3be1924221e1326df520f8498d704a5c4c8d0cce.tar.gz", - ) - - native.http_archive( - name = "com_google_absl", - strip_prefix = "abseil-cpp-cc4bed2d74f7c8717e31f9579214ab52a9c9c610", - url = "https://github.com/abseil/abseil-cpp/archive/cc4bed2d74f7c8717e31f9579214ab52a9c9c610.tar.gz", - ) + if "boringssl" not in native.existing_rules(): + native.http_archive( + name = "boringssl", + # on the master-with-bazel branch + url = "https://boringssl.googlesource.com/boringssl/+archive/886e7d75368e3f4fab3f4d0d3584e4abfc557755.tar.gz", + ) + + if "com_github_madler_zlib" not in native.existing_rules(): + native.new_http_archive( + name = "com_github_madler_zlib", + build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD", + strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f", + url = "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz", + ) + + if "com_google_protobuf" not in native.existing_rules(): + native.http_archive( + name = "com_google_protobuf", + strip_prefix = "protobuf-2761122b810fe8861004ae785cc3ab39f384d342", + url = "https://github.com/google/protobuf/archive/2761122b810fe8861004ae785cc3ab39f384d342.tar.gz", + ) + + if "com_github_google_googletest" not in native.existing_rules(): + native.new_http_archive( + name = "com_github_google_googletest", + build_file = "@com_github_grpc_grpc//third_party:gtest.BUILD", + strip_prefix = "googletest-ec44c6c1675c25b9827aacd08c02433cccde7780", + url = "https://github.com/google/googletest/archive/ec44c6c1675c25b9827aacd08c02433cccde7780.tar.gz", + ) + + if "com_github_gflags_gflags" not in native.existing_rules(): + native.http_archive( + name = "com_github_gflags_gflags", + strip_prefix = "gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e", + url = "https://github.com/gflags/gflags/archive/30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.tar.gz", + ) + + if "com_github_google_benchmark" not in native.existing_rules(): + native.new_http_archive( + name = "com_github_google_benchmark", + build_file = "@com_github_grpc_grpc//third_party:benchmark.BUILD", + strip_prefix = "benchmark-5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8", + url = "https://github.com/google/benchmark/archive/5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8.tar.gz", + ) + + if "com_github_cares_cares" not in native.existing_rules(): + native.new_http_archive( + name = "com_github_cares_cares", + build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD", + strip_prefix = "c-ares-3be1924221e1326df520f8498d704a5c4c8d0cce", + url = "https://github.com/c-ares/c-ares/archive/3be1924221e1326df520f8498d704a5c4c8d0cce.tar.gz", + ) + + if "com_google_absl" not in native.existing_rules(): + native.http_archive( + name = "com_google_absl", + strip_prefix = "abseil-cpp-cc4bed2d74f7c8717e31f9579214ab52a9c9c610", + url = "https://github.com/abseil/abseil-cpp/archive/cc4bed2d74f7c8717e31f9579214ab52a9c9c610.tar.gz", + ) + + if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules(): + native.http_archive( + name = "com_github_bazelbuild_bazeltoolchains", + strip_prefix = "bazel-toolchains-af4681c3d19f063f090222ec3d04108c4e0ca255", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz", + ], + sha256 = "d58bb2d6c8603f600d522b6104d6192a65339aa26cbba9f11ff5c4b36dedb928", + ) diff --git a/tools/run_tests/sanity/check_bazel_workspace.py b/tools/run_tests/sanity/check_bazel_workspace.py index 776c78b03f2..914da3e01d4 100755 --- a/tools/run_tests/sanity/check_bazel_workspace.py +++ b/tools/run_tests/sanity/check_bazel_workspace.py @@ -30,13 +30,76 @@ git_hash_pattern = re.compile('[0-9a-f]{40}') git_submodules = subprocess.check_output('git submodule', shell=True).strip().split('\n') git_submodule_hashes = {re.search(git_hash_pattern, s).group() for s in git_submodules} -# Parse git hashes from Bazel WORKSPACE {new_}http_archive rules -with open('WORKSPACE', 'r') as f: - workspace_rules = [expr.value for expr in ast.parse(f.read()).body] +_BAZEL_TOOLCHAINS_DEP_NAME = 'com_github_bazelbuild_bazeltoolchains' -http_archive_rules = [rule for rule in workspace_rules if rule.func.id.endswith('http_archive')] -archive_urls = [kw.value.s for rule in http_archive_rules for kw in rule.keywords if kw.arg == 'url'] -workspace_git_hashes = {re.search(git_hash_pattern, url).group() for url in archive_urls} +_GRPC_DEP_NAMES = [ + 'boringssl', + 'com_github_madler_zlib', + 'com_google_protobuf', + 'com_github_google_googletest', + 'com_github_gflags_gflags', + 'com_github_google_benchmark', + 'com_github_cares_cares', + 'com_google_absl', + _BAZEL_TOOLCHAINS_DEP_NAME, +] + + +class BazelEvalState(object): + + def __init__(self, names_and_urls, overridden_name=None): + self.names_and_urls = names_and_urls + self.overridden_name = overridden_name + + def http_archive(self, **args): + self.archive(**args) + + def new_http_archive(self, **args): + self.archive(**args) + + def bind(self, **args): + pass + + def existing_rules(self): + if self.overridden_name: + return [self.overridden_name] + return [] + + def archive(self, **args): + if args['name'] == _BAZEL_TOOLCHAINS_DEP_NAME: + self.names_and_urls[args['name']] = 'dont care' + return + self.names_and_urls[args['name']] = args['url'] + + +# Parse git hashes from bazel/grpc_deps.bzl {new_}http_archive rules +with open(os.path.join('bazel', 'grpc_deps.bzl'), 'r') as f: + names_and_urls = {} + eval_state = BazelEvalState(names_and_urls) + bazel_file = f.read() + +# grpc_deps.bzl only defines 'grpc_deps', add this to call it +bazel_file += '\ngrpc_deps()\n' +build_rules = { + 'native': eval_state, +} +exec bazel_file in build_rules +for name in _GRPC_DEP_NAMES: + assert name in names_and_urls.keys() +assert len(_GRPC_DEP_NAMES) == len(names_and_urls.keys()) + +# bazeltoolschains is an exception to this sanity check, +# we don't require that there is a corresponding git module. +names_without_bazeltoolchains = names_and_urls.keys() +names_without_bazeltoolchains.remove(_BAZEL_TOOLCHAINS_DEP_NAME) +archive_urls = [names_and_urls[name] for name in names_without_bazeltoolchains] +workspace_git_hashes = { + re.search(git_hash_pattern, url).group() + for url in archive_urls +} +if len(workspace_git_hashes) == 0: + print("(Likely) parse error, did not find any bazel git dependencies.") + sys.exit(1) # Validate the equivalence of the git submodules and Bazel git dependencies. The # condition we impose is that there is a git submodule for every dependency in @@ -46,4 +109,15 @@ if len(workspace_git_hashes - git_submodule_hashes) > 0: print("Found discrepancies between git submodules and Bazel WORKSPACE dependencies") sys.exit(1) +# Also check that we can override each dependency +for name in _GRPC_DEP_NAMES: + names_and_urls_with_overridden_name = {} + state = BazelEvalState( + names_and_urls_with_overridden_name, overridden_name=name) + rules = { + 'native': state, + } + exec bazel_file in rules + assert name not in names_and_urls_with_overridden_name.keys() + sys.exit(0) From 9f01ae0052ded63a8b4907ae4ebb4b7fdb3532fe Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Tue, 19 Dec 2017 10:35:18 -0800 Subject: [PATCH 06/13] Get rid of references to bazel toolchains and remote_execution, since they are only present on master --- bazel/grpc_build_system.bzl | 2 -- bazel/grpc_deps.bzl | 11 ----------- tools/run_tests/sanity/check_bazel_workspace.py | 12 +----------- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 8bc973069ae..60ae9d65029 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -55,8 +55,6 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], name = name, srcs = srcs, defines = select({"//:grpc_no_ares": ["GRPC_ARES=0"], - "//conditions:default": [],}) + - select({"//:remote_execution": ["GRPC_PORT_ISOLATED_RUNTIME=1"], "//conditions:default": [],}), hdrs = _maybe_update_cc_library_hdrs(hdrs + public_hdrs), deps = deps + _get_external_deps(external_deps), diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index e465312a403..fcbef49fc12 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -116,14 +116,3 @@ def grpc_deps(): strip_prefix = "abseil-cpp-cc4bed2d74f7c8717e31f9579214ab52a9c9c610", url = "https://github.com/abseil/abseil-cpp/archive/cc4bed2d74f7c8717e31f9579214ab52a9c9c610.tar.gz", ) - - if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules(): - native.http_archive( - name = "com_github_bazelbuild_bazeltoolchains", - strip_prefix = "bazel-toolchains-af4681c3d19f063f090222ec3d04108c4e0ca255", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz", - "https://github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz", - ], - sha256 = "d58bb2d6c8603f600d522b6104d6192a65339aa26cbba9f11ff5c4b36dedb928", - ) diff --git a/tools/run_tests/sanity/check_bazel_workspace.py b/tools/run_tests/sanity/check_bazel_workspace.py index 914da3e01d4..c7c4e861767 100755 --- a/tools/run_tests/sanity/check_bazel_workspace.py +++ b/tools/run_tests/sanity/check_bazel_workspace.py @@ -30,8 +30,6 @@ git_hash_pattern = re.compile('[0-9a-f]{40}') git_submodules = subprocess.check_output('git submodule', shell=True).strip().split('\n') git_submodule_hashes = {re.search(git_hash_pattern, s).group() for s in git_submodules} -_BAZEL_TOOLCHAINS_DEP_NAME = 'com_github_bazelbuild_bazeltoolchains' - _GRPC_DEP_NAMES = [ 'boringssl', 'com_github_madler_zlib', @@ -41,7 +39,6 @@ _GRPC_DEP_NAMES = [ 'com_github_google_benchmark', 'com_github_cares_cares', 'com_google_absl', - _BAZEL_TOOLCHAINS_DEP_NAME, ] @@ -66,9 +63,6 @@ class BazelEvalState(object): return [] def archive(self, **args): - if args['name'] == _BAZEL_TOOLCHAINS_DEP_NAME: - self.names_and_urls[args['name']] = 'dont care' - return self.names_and_urls[args['name']] = args['url'] @@ -88,11 +82,7 @@ for name in _GRPC_DEP_NAMES: assert name in names_and_urls.keys() assert len(_GRPC_DEP_NAMES) == len(names_and_urls.keys()) -# bazeltoolschains is an exception to this sanity check, -# we don't require that there is a corresponding git module. -names_without_bazeltoolchains = names_and_urls.keys() -names_without_bazeltoolchains.remove(_BAZEL_TOOLCHAINS_DEP_NAME) -archive_urls = [names_and_urls[name] for name in names_without_bazeltoolchains] +archive_urls = [names_and_urls[name] for name in names_and_urls.keys()] workspace_git_hashes = { re.search(git_hash_pattern, url).group() for url in archive_urls From 2df509fc0e8628d6d4431139ce953c70796a21eb Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 6 Dec 2017 14:32:34 -0800 Subject: [PATCH 07/13] Fix a Python spinlock bug --- src/core/lib/iomgr/ev_poll_posix.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc index 8659559f78a..13468b30c0c 100644 --- a/src/core/lib/iomgr/ev_poll_posix.cc +++ b/src/core/lib/iomgr/ev_poll_posix.cc @@ -71,6 +71,7 @@ struct grpc_fd { int shutdown; int closed; int released; + gpr_atm pollhup; grpc_error* shutdown_error; /* The watcher list. @@ -339,6 +340,7 @@ static grpc_fd* fd_create(int fd, const char* name) { r->on_done_closure = nullptr; r->closed = 0; r->released = 0; + gpr_atm_no_barrier_store(&r->pollhup, 0); r->read_notifier_pollset = nullptr; char* name2; @@ -964,7 +966,8 @@ static grpc_error* pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset, pfds[0].events = POLLIN; pfds[0].revents = 0; for (i = 0; i < pollset->fd_count; i++) { - if (fd_is_orphaned(pollset->fds[i])) { + if (fd_is_orphaned(pollset->fds[i]) || + gpr_atm_no_barrier_load(&pollset->fds[i]->pollhup) == 1) { GRPC_FD_UNREF(pollset->fds[i], "multipoller"); } else { pollset->fds[fd_count++] = pollset->fds[i]; @@ -1031,6 +1034,12 @@ static grpc_error* pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* pollset, pfds[i].fd, (pfds[i].revents & POLLIN_CHECK) != 0, (pfds[i].revents & POLLOUT_CHECK) != 0, pfds[i].revents); } + /* This is a mitigation to prevent poll() from spinning on a + ** POLLHUP https://github.com/grpc/grpc/pull/13665 + */ + if (pfds[i].revents & POLLHUP) { + gpr_atm_no_barrier_store(&watchers[i].fd->pollhup, 1); + } fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, pfds[i].revents & POLLOUT_CHECK, pollset); } From 16e4bc010a3146f0c692f494c7cb6e5ccbfb27dd Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 19 Dec 2017 17:29:04 -0800 Subject: [PATCH 08/13] Bump to 1.8.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.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/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/GRPCClient/private/version.h | 2 +- src/objective-c/tests/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 +- 30 files changed, 34 insertions(+), 34 deletions(-) diff --git a/BUILD b/BUILD index 798a27ba251..beb3c9ebddd 100644 --- a/BUILD +++ b/BUILD @@ -43,7 +43,7 @@ g_stands_for = "generous" core_version = "5.0.0" -version = "1.8.1" +version = "1.8.2" GPR_PUBLIC_HDRS = [ "include/grpc/support/alloc.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 28bf8c29d89..e99fce66bf5 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.8.1") +set(PACKAGE_VERSION "1.8.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 9e31c417ab0..3f4452aa5d7 100644 --- a/Makefile +++ b/Makefile @@ -412,8 +412,8 @@ Q = @ endif CORE_VERSION = 5.0.0 -CPP_VERSION = 1.8.1 -CSHARP_VERSION = 1.8.1 +CPP_VERSION = 1.8.2 +CSHARP_VERSION = 1.8.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 369d5b0089d..aa614b8a64f 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: generous - version: 1.8.1 + version: 1.8.2 filegroups: - name: census public_headers: diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index f5eedc16ee1..57e08ecea41 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.8.1' + version = '1.8.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 ced12599f95..a09cb132fd9 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-ProtoRPC' - version = '1.8.1' + version = '1.8.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 515c453430c..e567e7dcdb9 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-RxLibrary' - version = '1.8.1' + version = '1.8.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 522c3754f76..033e0cef912 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '1.8.1' + version = '1.8.2' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'https://grpc.io' diff --git a/package.xml b/package.xml index 274457debba..eb0c8dcda70 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2017-08-24 - 1.8.1 - 1.8.1 + 1.8.2 + 1.8.2 beta diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index cebd6f5be92..26090b9f90b 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.8.1"; } +grpc::string Version() { return "1.8.2"; } } // namespace grpc diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include index 490b9232286..662eb8f50e0 100755 --- a/src/csharp/Grpc.Core/Version.csproj.include +++ b/src/csharp/Grpc.Core/Version.csproj.include @@ -1,7 +1,7 @@ - 1.8.1 + 1.8.2 3.3.0 diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index bc49218ef1b..339e1a28c18 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.8.1.0"; + public const string CurrentAssemblyFileVersion = "1.8.2.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "1.8.1"; + public const string CurrentVersion = "1.8.2"; } } diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat index 392b2fd33bf..19dfdaf293e 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.8.1 +set VERSION=1.8.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 81499232398..3ff66bcae25 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.8.1" -OutputDirectory ../../artifacts -nuget pack Grpc.Tools.nuspec -Version "1.8.1" -OutputDirectory ../../artifacts +nuget pack Grpc.nuspec -Version "1.8.2" -OutputDirectory ../../artifacts +nuget pack Grpc.Tools.nuspec -Version "1.8.2" -OutputDirectory ../../artifacts (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 7b4340861da..148e0315d26 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.8.1' + v = '1.8.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 dc301b21ffc..b8211a83af6 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.8.1" +#define GRPC_OBJC_VERSION_STRING @"1.8.2" diff --git a/src/objective-c/tests/version.h b/src/objective-c/tests/version.h index e41c1d98eed..170d888aa4d 100644 --- a/src/objective-c/tests/version.h +++ b/src/objective-c/tests/version.h @@ -23,5 +23,5 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.8.1" +#define GRPC_OBJC_VERSION_STRING @"1.8.2" #define GRPC_C_VERSION_STRING @"5.0.0" diff --git a/src/php/composer.json b/src/php/composer.json index 011c66e4bba..e3047b26788 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.8.1", + "version": "1.8.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 6bcfdf8229a..277833bc3bc 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.8.1" +#define PHP_GRPC_VERSION "1.8.2" #endif /* VERSION_H */ diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index 802521a869f..2b594c04ea7 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.8.1""" +__version__ = """1.8.2""" diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 3bbd3671a65..448031a6f37 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.8.1' +VERSION='1.8.2' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index b0891128658..a5ca41afb3e 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.8.1' +VERSION='1.8.2' diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index d3e1d6649c8..0595258ae71 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.8.1' +VERSION='1.8.2' diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py index ebbd9723e4e..eec00c085f3 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.8.1' +VERSION='1.8.2' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index 1b648e1bc49..aef18d5ee35 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.8.1' +VERSION='1.8.2' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index f4b6dec8ffb..13b7b81ea35 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.8.1' + VERSION = '1.8.2' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 6d35ec4344b..e84962436ed 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -14,6 +14,6 @@ module GRPC module Tools - VERSION = '1.8.1' + VERSION = '1.8.2' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index c1aa7ef25ef..e6d772189a4 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.8.1' +VERSION='1.8.2' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 4e9f91eedbf..5633cf2bda1 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.8.1 +PROJECT_NUMBER = 1.8.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 1c6d14714a6..667005c38f6 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.8.1 +PROJECT_NUMBER = 1.8.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 From 81edf5ff9af2d90813773acb9c2793e1a4cd1057 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 21 Dec 2017 06:25:16 +0000 Subject: [PATCH 09/13] Reform cygrpc.Operation It is now a family of classes conforming to an interface rather than a single class no single instance of which makes use of all behavior scoped to the class. It also now only uses gRPC Core memory for the time of a single batch rather than for the entire lifetime of the instance. --- src/python/grpcio/grpc/_channel.py | 66 +++-- .../grpcio/grpc/_cython/_cygrpc/grpc.pxi | 26 +- .../grpc/_cython/_cygrpc/operation.pxd.pxi | 109 ++++++++ .../grpc/_cython/_cygrpc/operation.pyx.pxi | 238 +++++++++++++++++ .../grpc/_cython/_cygrpc/records.pxd.pxi | 21 -- .../grpc/_cython/_cygrpc/records.pyx.pxi | 250 +----------------- src/python/grpcio/grpc/_cython/cygrpc.pxd | 1 + src/python/grpcio/grpc/_cython/cygrpc.pyx | 1 + src/python/grpcio/grpc/_server.py | 46 ++-- src/python/grpcio_tests/tests/tests.json | 1 + .../unit/_cython/_cancel_many_calls_test.py | 26 +- ...s_server_completion_queue_per_call_test.py | 22 +- ...ges_single_server_completion_queue_test.py | 20 +- .../_read_some_but_not_all_responses_test.py | 24 +- .../tests/unit/_cython/_server_test.py | 49 ++++ .../tests/unit/_cython/cygrpc_test.py | 94 +++---- 16 files changed, 571 insertions(+), 423 deletions(-) create mode 100644 src/python/grpcio/grpc/_cython/_cygrpc/operation.pxd.pxi create mode 100644 src/python/grpcio/grpc/_cython/_cygrpc/operation.pyx.pxi create mode 100644 src/python/grpcio_tests/tests/unit/_cython/_server_test.py diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index d7456a3dd16..3572737c874 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -129,12 +129,12 @@ def _abort(state, code, details): def _handle_event(event, state, response_deserializer): callbacks = [] for batch_operation in event.batch_operations: - operation_type = batch_operation.type + operation_type = batch_operation.type() state.due.remove(operation_type) if operation_type == cygrpc.OperationType.receive_initial_metadata: - state.initial_metadata = batch_operation.received_metadata + state.initial_metadata = batch_operation.initial_metadata() elif operation_type == cygrpc.OperationType.receive_message: - serialized_response = batch_operation.received_message.bytes() + serialized_response = batch_operation.message() if serialized_response is not None: response = _common.deserialize(serialized_response, response_deserializer) @@ -144,18 +144,17 @@ def _handle_event(event, state, response_deserializer): else: state.response = response elif operation_type == cygrpc.OperationType.receive_status_on_client: - state.trailing_metadata = batch_operation.received_metadata + state.trailing_metadata = batch_operation.trailing_metadata() if state.code is None: code = _common.CYGRPC_STATUS_CODE_TO_STATUS_CODE.get( - batch_operation.received_status_code) + batch_operation.code()) if code is None: state.code = grpc.StatusCode.UNKNOWN state.details = _unknown_code_details( - batch_operation.received_status_code, - batch_operation.received_status_details) + code, batch_operation.details()) else: state.code = code - state.details = batch_operation.received_status_details + state.details = batch_operation.details() callbacks.extend(state.callbacks) state.callbacks = None return callbacks @@ -200,7 +199,7 @@ def _consume_request_iterator(request_iterator, state, call, _abort(state, grpc.StatusCode.INTERNAL, details) return else: - operations = (cygrpc.operation_send_message( + operations = (cygrpc.SendMessageOperation( serialized_request, _EMPTY_FLAGS),) call.start_client_batch(operations, event_handler) state.due.add(cygrpc.OperationType.send_message) @@ -216,7 +215,7 @@ def _consume_request_iterator(request_iterator, state, call, with state.condition: if state.code is None: operations = ( - cygrpc.operation_send_close_from_client(_EMPTY_FLAGS),) + cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),) call.start_client_batch(operations, event_handler) state.due.add(cygrpc.OperationType.send_close_from_client) @@ -319,7 +318,7 @@ class _Rendezvous(grpc.RpcError, grpc.Future, grpc.Call): event_handler = _event_handler(self._state, self._call, self._response_deserializer) self._call.start_client_batch( - (cygrpc.operation_receive_message(_EMPTY_FLAGS),), + (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),), event_handler) self._state.due.add(cygrpc.OperationType.receive_message) elif self._state.code is grpc.StatusCode.OK: @@ -453,12 +452,12 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable): else: state = _RPCState(_UNARY_UNARY_INITIAL_DUE, None, None, None, None) operations = ( - cygrpc.operation_send_initial_metadata(metadata, _EMPTY_FLAGS), - cygrpc.operation_send_message(serialized_request, _EMPTY_FLAGS), - cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), - cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), - cygrpc.operation_receive_message(_EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),) + cygrpc.SendInitialMetadataOperation(metadata, _EMPTY_FLAGS), + cygrpc.SendMessageOperation(serialized_request, _EMPTY_FLAGS), + cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS), + cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS), + cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),) return state, operations, deadline, deadline_timespec, None def _blocking(self, request, timeout, metadata, credentials): @@ -536,14 +535,14 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable): self._response_deserializer) with state.condition: call.start_client_batch( - (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),), + (cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),), event_handler) operations = ( - cygrpc.operation_send_initial_metadata( - metadata, _EMPTY_FLAGS), cygrpc.operation_send_message( + cygrpc.SendInitialMetadataOperation( + metadata, _EMPTY_FLAGS), cygrpc.SendMessageOperation( serialized_request, _EMPTY_FLAGS), - cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),) + cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),) call_error = call.start_client_batch(operations, event_handler) if call_error != cygrpc.CallError.ok: _call_error_set_RPCstate(state, call_error, metadata) @@ -573,12 +572,11 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): call.set_credentials(credentials._credentials) with state.condition: call.start_client_batch( - (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),), - None) + (cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),), None) operations = ( - cygrpc.operation_send_initial_metadata(metadata, _EMPTY_FLAGS), - cygrpc.operation_receive_message(_EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),) + cygrpc.SendInitialMetadataOperation(metadata, _EMPTY_FLAGS), + cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),) call_error = call.start_client_batch(operations, None) _check_call_error(call_error, metadata) _consume_request_iterator(request_iterator, state, call, @@ -624,12 +622,12 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): event_handler = _event_handler(state, call, self._response_deserializer) with state.condition: call.start_client_batch( - (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),), + (cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),), event_handler) operations = ( - cygrpc.operation_send_initial_metadata(metadata, _EMPTY_FLAGS), - cygrpc.operation_receive_message(_EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),) + cygrpc.SendInitialMetadataOperation(metadata, _EMPTY_FLAGS), + cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),) call_error = call.start_client_batch(operations, event_handler) if call_error != cygrpc.CallError.ok: _call_error_set_RPCstate(state, call_error, metadata) @@ -664,11 +662,11 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable): event_handler = _event_handler(state, call, self._response_deserializer) with state.condition: call.start_client_batch( - (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),), + (cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),), event_handler) operations = ( - cygrpc.operation_send_initial_metadata(metadata, _EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),) + cygrpc.SendInitialMetadataOperation(metadata, _EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),) call_error = call.start_client_batch(operations, event_handler) if call_error != cygrpc.CallError.ok: _call_error_set_RPCstate(state, call_error, metadata) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index 660263fc09d..7f919650073 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -17,6 +17,7 @@ cimport libc.time # Typedef types with approximately the same semantics to provide their names to # Cython +ctypedef unsigned char uint8_t ctypedef int int32_t ctypedef unsigned uint32_t ctypedef long int64_t @@ -25,6 +26,7 @@ ctypedef long int64_t cdef extern from "grpc/support/alloc.h": void *gpr_malloc(size_t size) nogil + void *gpr_zalloc(size_t size) nogil void gpr_free(void *ptr) nogil void *gpr_realloc(void *p, size_t size) nogil @@ -190,6 +192,18 @@ cdef extern from "grpc/grpc.h": size_t arguments_length "num_args" grpc_arg *arguments "args" + ctypedef enum grpc_compression_level: + GRPC_COMPRESS_LEVEL_NONE + GRPC_COMPRESS_LEVEL_LOW + GRPC_COMPRESS_LEVEL_MED + GRPC_COMPRESS_LEVEL_HIGH + + ctypedef enum grpc_stream_compression_level: + GRPC_STREAM_COMPRESS_LEVEL_NONE + GRPC_STREAM_COMPRESS_LEVEL_LOW + GRPC_STREAM_COMPRESS_LEVEL_MED + GRPC_STREAM_COMPRESS_LEVEL_HIGH + ctypedef enum grpc_call_error: GRPC_CALL_OK GRPC_CALL_ERROR @@ -265,9 +279,19 @@ cdef extern from "grpc/grpc.h": GRPC_OP_RECV_STATUS_ON_CLIENT GRPC_OP_RECV_CLOSE_ON_SERVER + ctypedef struct grpc_op_send_initial_metadata_maybe_compression_level: + uint8_t is_set + grpc_compression_level level + + ctypedef struct grpc_op_send_initial_metadata_maybe_stream_compression_level: + uint8_t is_set + grpc_stream_compression_level level + ctypedef struct grpc_op_data_send_initial_metadata: size_t count grpc_metadata *metadata + grpc_op_send_initial_metadata_maybe_compression_level maybe_compression_level + grpc_op_send_initial_metadata_maybe_stream_compression_level maybe_stream_compression_level ctypedef struct grpc_op_data_send_status_from_server: size_t trailing_metadata_count @@ -524,7 +548,7 @@ cdef extern from "grpc/grpc_security.h": grpc_auth_property_iterator grpc_auth_context_property_iterator( const grpc_auth_context *ctx) - + grpc_auth_property_iterator grpc_auth_context_peer_identity( const grpc_auth_context *ctx) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/operation.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/operation.pxd.pxi new file mode 100644 index 00000000000..bfbe27785b7 --- /dev/null +++ b/src/python/grpcio/grpc/_cython/_cygrpc/operation.pxd.pxi @@ -0,0 +1,109 @@ +# 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. + + +cdef class Operation: + + cdef void c(self) + cdef void un_c(self) + + # TODO(https://github.com/grpc/grpc/issues/7950): Eliminate this! + cdef grpc_op c_op + + +cdef class SendInitialMetadataOperation(Operation): + + cdef readonly object _initial_metadata; + cdef readonly int _flags + cdef grpc_metadata *_c_initial_metadata + cdef size_t _c_initial_metadata_count + + cdef void c(self) + cdef void un_c(self) + + +cdef class SendMessageOperation(Operation): + + cdef readonly bytes _message + cdef readonly int _flags + cdef grpc_byte_buffer *_c_message_byte_buffer + + cdef void c(self) + cdef void un_c(self) + + +cdef class SendCloseFromClientOperation(Operation): + + cdef readonly int _flags + + cdef void c(self) + cdef void un_c(self) + + +cdef class SendStatusFromServerOperation(Operation): + + cdef readonly object _trailing_metadata + cdef readonly object _code + cdef readonly object _details + cdef readonly int _flags + cdef grpc_metadata *_c_trailing_metadata + cdef size_t _c_trailing_metadata_count + cdef grpc_slice _c_details + + cdef void c(self) + cdef void un_c(self) + + +cdef class ReceiveInitialMetadataOperation(Operation): + + cdef readonly int _flags + cdef tuple _initial_metadata + cdef grpc_metadata_array _c_initial_metadata + + cdef void c(self) + cdef void un_c(self) + + +cdef class ReceiveMessageOperation(Operation): + + cdef readonly int _flags + cdef grpc_byte_buffer *_c_message_byte_buffer + cdef bytes _message + + cdef void c(self) + cdef void un_c(self) + + +cdef class ReceiveStatusOnClientOperation(Operation): + + cdef readonly int _flags + cdef grpc_metadata_array _c_trailing_metadata + cdef grpc_status_code _c_code + cdef grpc_slice _c_details + cdef tuple _trailing_metadata + cdef object _code + cdef str _details + + cdef void c(self) + cdef void un_c(self) + + +cdef class ReceiveCloseOnServerOperation(Operation): + + cdef readonly int _flags + cdef object _cancelled + cdef int _c_cancelled + + cdef void c(self) + cdef void un_c(self) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/operation.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/operation.pyx.pxi new file mode 100644 index 00000000000..3c91abf7220 --- /dev/null +++ b/src/python/grpcio/grpc/_cython/_cygrpc/operation.pyx.pxi @@ -0,0 +1,238 @@ +# 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. + + +cdef class Operation: + + cdef void c(self): + raise NotImplementedError() + + cdef void un_c(self): + raise NotImplementedError() + + +cdef class SendInitialMetadataOperation(Operation): + + def __cinit__(self, initial_metadata, flags): + self._initial_metadata = initial_metadata + self._flags = flags + + def type(self): + return GRPC_OP_SEND_INITIAL_METADATA + + cdef void c(self): + self.c_op.type = GRPC_OP_SEND_INITIAL_METADATA + self.c_op.flags = self._flags + _store_c_metadata( + self._initial_metadata, &self._c_initial_metadata, + &self._c_initial_metadata_count) + self.c_op.data.send_initial_metadata.metadata = self._c_initial_metadata + self.c_op.data.send_initial_metadata.count = self._c_initial_metadata_count + self.c_op.data.send_initial_metadata.maybe_compression_level.is_set = 0 + self.c_op.data.send_initial_metadata.maybe_stream_compression_level.is_set = 0 + + cdef void un_c(self): + _release_c_metadata( + self._c_initial_metadata, self._c_initial_metadata_count) + + +cdef class SendMessageOperation(Operation): + + def __cinit__(self, bytes message, int flags): + self._message = message + self._flags = flags + + def type(self): + return GRPC_OP_SEND_MESSAGE + + cdef void c(self): + self.c_op.type = GRPC_OP_SEND_MESSAGE + self.c_op.flags = self._flags + cdef grpc_slice message_slice = grpc_slice_from_copied_buffer( + self._message, len(self._message)) + self._c_message_byte_buffer = grpc_raw_byte_buffer_create( + &message_slice, 1) + grpc_slice_unref(message_slice) + self.c_op.data.send_message.send_message = self._c_message_byte_buffer + + cdef void un_c(self): + grpc_byte_buffer_destroy(self._c_message_byte_buffer) + + +cdef class SendCloseFromClientOperation(Operation): + + def __cinit__(self, int flags): + self._flags = flags + + def type(self): + return GRPC_OP_SEND_CLOSE_FROM_CLIENT + + cdef void c(self): + self.c_op.type = GRPC_OP_SEND_CLOSE_FROM_CLIENT + self.c_op.flags = self._flags + + cdef void un_c(self): + pass + + +cdef class SendStatusFromServerOperation(Operation): + + def __cinit__(self, trailing_metadata, code, object details, int flags): + self._trailing_metadata = trailing_metadata + self._code = code + self._details = details + self._flags = flags + + def type(self): + return GRPC_OP_SEND_STATUS_FROM_SERVER + + cdef void c(self): + self.c_op.type = GRPC_OP_SEND_STATUS_FROM_SERVER + self.c_op.flags = self._flags + _store_c_metadata( + self._trailing_metadata, &self._c_trailing_metadata, + &self._c_trailing_metadata_count) + self.c_op.data.send_status_from_server.trailing_metadata = ( + self._c_trailing_metadata) + self.c_op.data.send_status_from_server.trailing_metadata_count = ( + self._c_trailing_metadata_count) + self.c_op.data.send_status_from_server.status = self._code + self._c_details = _slice_from_bytes(_encode(self._details)) + self.c_op.data.send_status_from_server.status_details = &self._c_details + + cdef void un_c(self): + grpc_slice_unref(self._c_details) + _release_c_metadata( + self._c_trailing_metadata, self._c_trailing_metadata_count) + + +cdef class ReceiveInitialMetadataOperation(Operation): + + def __cinit__(self, flags): + self._flags = flags + + def type(self): + return GRPC_OP_RECV_INITIAL_METADATA + + cdef void c(self): + self.c_op.type = GRPC_OP_RECV_INITIAL_METADATA + self.c_op.flags = self._flags + grpc_metadata_array_init(&self._c_initial_metadata) + self.c_op.data.receive_initial_metadata.receive_initial_metadata = ( + &self._c_initial_metadata) + + cdef void un_c(self): + self._initial_metadata = _metadata(&self._c_initial_metadata) + grpc_metadata_array_destroy(&self._c_initial_metadata) + + def initial_metadata(self): + return self._initial_metadata + + +cdef class ReceiveMessageOperation(Operation): + + def __cinit__(self, flags): + self._flags = flags + + def type(self): + return GRPC_OP_RECV_MESSAGE + + cdef void c(self): + self.c_op.type = GRPC_OP_RECV_MESSAGE + self.c_op.flags = self._flags + self.c_op.data.receive_message.receive_message = ( + &self._c_message_byte_buffer) + + cdef void un_c(self): + cdef grpc_byte_buffer_reader message_reader + cdef bint message_reader_status + cdef grpc_slice message_slice + cdef size_t message_slice_length + cdef void *message_slice_pointer + if self._c_message_byte_buffer != NULL: + message_reader_status = grpc_byte_buffer_reader_init( + &message_reader, self._c_message_byte_buffer) + if message_reader_status: + message = bytearray() + while grpc_byte_buffer_reader_next(&message_reader, &message_slice): + message_slice_pointer = grpc_slice_start_ptr(message_slice) + message_slice_length = grpc_slice_length(message_slice) + message += (message_slice_pointer)[:message_slice_length] + grpc_slice_unref(message_slice) + grpc_byte_buffer_reader_destroy(&message_reader) + self._message = bytes(message) + else: + self._message = None + grpc_byte_buffer_destroy(self._c_message_byte_buffer) + else: + self._message = None + + def message(self): + return self._message + + +cdef class ReceiveStatusOnClientOperation(Operation): + + def __cinit__(self, flags): + self._flags = flags + + def type(self): + return GRPC_OP_RECV_STATUS_ON_CLIENT + + cdef void c(self): + self.c_op.type = GRPC_OP_RECV_STATUS_ON_CLIENT + self.c_op.flags = self._flags + grpc_metadata_array_init(&self._c_trailing_metadata) + self.c_op.data.receive_status_on_client.trailing_metadata = ( + &self._c_trailing_metadata) + self.c_op.data.receive_status_on_client.status = ( + &self._c_code) + self.c_op.data.receive_status_on_client.status_details = ( + &self._c_details) + + cdef void un_c(self): + self._trailing_metadata = _metadata(&self._c_trailing_metadata) + grpc_metadata_array_destroy(&self._c_trailing_metadata) + self._code = self._c_code + self._details = _decode(_slice_bytes(self._c_details)) + grpc_slice_unref(self._c_details) + + def trailing_metadata(self): + return self._trailing_metadata + + def code(self): + return self._code + + def details(self): + return self._details + + +cdef class ReceiveCloseOnServerOperation(Operation): + + def __cinit__(self, flags): + self._flags = flags + + def type(self): + return GRPC_OP_RECV_CLOSE_ON_SERVER + + cdef void c(self): + self.c_op.type = GRPC_OP_RECV_CLOSE_ON_SERVER + self.c_op.flags = self._flags + self.c_op.data.receive_close_on_server.cancelled = &self._c_cancelled + + cdef void un_c(self): + self._cancelled = bool(self._c_cancelled) + + def cancelled(self): + return self._cancelled diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi index 594fdb1a8b2..537cf2b537f 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi @@ -65,11 +65,6 @@ cdef class Event: cdef readonly object batch_operations -cdef class ByteBuffer: - - cdef grpc_byte_buffer *c_byte_buffer - - cdef class SslPemKeyCertPair: cdef grpc_ssl_pem_key_cert_pair c_pair @@ -89,22 +84,6 @@ cdef class ChannelArgs: cdef list args -cdef class Operation: - - cdef grpc_op c_op - cdef bint _c_metadata_needs_release - cdef size_t _c_metadata_count - cdef grpc_metadata *_c_metadata - cdef ByteBuffer _received_message - cdef bint _c_metadata_array_needs_destruction - cdef grpc_metadata_array _c_metadata_array - cdef grpc_status_code _received_status_code - cdef grpc_slice _status_details - cdef int _received_cancelled - cdef readonly bint is_valid - cdef object references - - cdef class CompressionOptions: cdef grpc_compression_options c_options diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 5877591f786..99f8ffa3e70 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -229,13 +229,15 @@ cdef class OperationTag: self.c_nops = 0 if self._operations is None else len(self._operations) if 0 < self.c_nops: self.c_ops = gpr_malloc(sizeof(grpc_op) * self.c_nops) - for index in range(self.c_nops): - self.c_ops[index] = ((self._operations[index])).c_op + for index, operation in enumerate(self._operations): + (operation).c() + self.c_ops[index] = (operation).c_op cdef object release_ops(self): if 0 < self.c_nops: for index, operation in enumerate(self._operations): (operation).c_op = self.c_ops[index] + (operation).un_c() gpr_free(self.c_ops) return self._operations else: @@ -260,69 +262,6 @@ cdef class Event: self.is_new_request = is_new_request -cdef class ByteBuffer: - - def __cinit__(self, bytes data): - grpc_init() - if data is None: - self.c_byte_buffer = NULL - return - - cdef char *c_data = data - cdef grpc_slice data_slice - cdef size_t data_length = len(data) - with nogil: - data_slice = grpc_slice_from_copied_buffer(c_data, data_length) - with nogil: - self.c_byte_buffer = grpc_raw_byte_buffer_create( - &data_slice, 1) - with nogil: - grpc_slice_unref(data_slice) - - def bytes(self): - cdef grpc_byte_buffer_reader reader - cdef grpc_slice data_slice - cdef size_t data_slice_length - cdef void *data_slice_pointer - cdef bint reader_status - if self.c_byte_buffer != NULL: - with nogil: - reader_status = grpc_byte_buffer_reader_init( - &reader, self.c_byte_buffer) - if not reader_status: - return None - result = bytearray() - with nogil: - while grpc_byte_buffer_reader_next(&reader, &data_slice): - data_slice_pointer = grpc_slice_start_ptr(data_slice) - data_slice_length = grpc_slice_length(data_slice) - with gil: - result += (data_slice_pointer)[:data_slice_length] - grpc_slice_unref(data_slice) - with nogil: - grpc_byte_buffer_reader_destroy(&reader) - return bytes(result) - else: - return None - - def __len__(self): - cdef size_t result - if self.c_byte_buffer != NULL: - with nogil: - result = grpc_byte_buffer_length(self.c_byte_buffer) - return result - else: - return 0 - - def __str__(self): - return self.bytes() - - def __dealloc__(self): - if self.c_byte_buffer != NULL: - grpc_byte_buffer_destroy(self.c_byte_buffer) - grpc_shutdown() - - cdef class SslPemKeyCertPair: def __cinit__(self, bytes private_key, bytes certificate_chain): @@ -365,7 +304,7 @@ cdef class ChannelArg: elif hasattr(value, '__int__'): # Pointer objects must override __int__() to return # the underlying C address (Python ints are word size). The - # lifecycle of the pointer is fixed to the lifecycle of the + # lifecycle of the pointer is fixed to the lifecycle of the # python object wrapping it. self.ptr_vtable.copy = ©_ptr self.ptr_vtable.destroy = &destroy_ptr @@ -407,185 +346,6 @@ cdef class ChannelArgs: return self.args[i] -cdef class Operation: - - def __cinit__(self): - grpc_init() - self.references = [] - self._c_metadata_needs_release = False - self._c_metadata_array_needs_destruction = False - self._status_details = grpc_empty_slice() - self.is_valid = False - - @property - def type(self): - return self.c_op.type - - @property - def flags(self): - return self.c_op.flags - - @property - def has_status(self): - return self.c_op.type == GRPC_OP_RECV_STATUS_ON_CLIENT - - @property - def received_message(self): - if self.c_op.type != GRPC_OP_RECV_MESSAGE: - raise TypeError("self must be an operation receiving a message") - return self._received_message - - @property - def received_message_or_none(self): - if self.c_op.type != GRPC_OP_RECV_MESSAGE: - return None - return self._received_message - - @property - def received_metadata(self): - if (self.c_op.type != GRPC_OP_RECV_INITIAL_METADATA and - self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT): - raise TypeError("self must be an operation receiving metadata") - return _metadata(&self._c_metadata_array) - - @property - def received_status_code(self): - if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT: - raise TypeError("self must be an operation receiving a status code") - return self._received_status_code - - @property - def received_status_code_or_none(self): - if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT: - return None - return self._received_status_code - - @property - def received_status_details(self): - if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT: - raise TypeError("self must be an operation receiving status details") - return _slice_bytes(self._status_details) - - @property - def received_status_details_or_none(self): - if self.c_op.type != GRPC_OP_RECV_STATUS_ON_CLIENT: - return None - return _slice_bytes(self._status_details) - - @property - def received_cancelled(self): - if self.c_op.type != GRPC_OP_RECV_CLOSE_ON_SERVER: - raise TypeError("self must be an operation receiving cancellation " - "information") - return False if self._received_cancelled == 0 else True - - @property - def received_cancelled_or_none(self): - if self.c_op.type != GRPC_OP_RECV_CLOSE_ON_SERVER: - return None - return False if self._received_cancelled == 0 else True - - def __dealloc__(self): - if self._c_metadata_needs_release: - _release_c_metadata(self._c_metadata, self._c_metadata_count) - if self._c_metadata_array_needs_destruction: - grpc_metadata_array_destroy(&self._c_metadata_array) - grpc_slice_unref(self._status_details) - grpc_shutdown() - -def operation_send_initial_metadata(metadata, int flags): - cdef Operation op = Operation() - op.c_op.type = GRPC_OP_SEND_INITIAL_METADATA - op.c_op.flags = flags - _store_c_metadata(metadata, &op._c_metadata, &op._c_metadata_count) - op._c_metadata_needs_release = True - op.c_op.data.send_initial_metadata.count = op._c_metadata_count - op.c_op.data.send_initial_metadata.metadata = op._c_metadata - op.is_valid = True - return op - -def operation_send_message(data, int flags): - cdef Operation op = Operation() - op.c_op.type = GRPC_OP_SEND_MESSAGE - op.c_op.flags = flags - byte_buffer = ByteBuffer(data) - op.c_op.data.send_message.send_message = byte_buffer.c_byte_buffer - op.references.append(byte_buffer) - op.is_valid = True - return op - -def operation_send_close_from_client(int flags): - cdef Operation op = Operation() - op.c_op.type = GRPC_OP_SEND_CLOSE_FROM_CLIENT - op.c_op.flags = flags - op.is_valid = True - return op - -def operation_send_status_from_server( - metadata, grpc_status_code code, bytes details, int flags): - cdef Operation op = Operation() - op.c_op.type = GRPC_OP_SEND_STATUS_FROM_SERVER - op.c_op.flags = flags - _store_c_metadata(metadata, &op._c_metadata, &op._c_metadata_count) - op._c_metadata_needs_release = True - op.c_op.data.send_status_from_server.trailing_metadata_count = ( - op._c_metadata_count) - op.c_op.data.send_status_from_server.trailing_metadata = op._c_metadata - op.c_op.data.send_status_from_server.status = code - grpc_slice_unref(op._status_details) - op._status_details = _slice_from_bytes(details) - op.c_op.data.send_status_from_server.status_details = &op._status_details - op.is_valid = True - return op - -def operation_receive_initial_metadata(int flags): - cdef Operation op = Operation() - op.c_op.type = GRPC_OP_RECV_INITIAL_METADATA - op.c_op.flags = flags - grpc_metadata_array_init(&op._c_metadata_array) - op.c_op.data.receive_initial_metadata.receive_initial_metadata = ( - &op._c_metadata_array) - op._c_metadata_array_needs_destruction = True - op.is_valid = True - return op - -def operation_receive_message(int flags): - cdef Operation op = Operation() - op.c_op.type = GRPC_OP_RECV_MESSAGE - op.c_op.flags = flags - op._received_message = ByteBuffer(None) - # n.b. the c_op.data.receive_message field needs to be deleted by us, - # anyway, so we just let that be handled by the ByteBuffer() we allocated - # the line before. - op.c_op.data.receive_message.receive_message = ( - &op._received_message.c_byte_buffer) - op.is_valid = True - return op - -def operation_receive_status_on_client(int flags): - cdef Operation op = Operation() - op.c_op.type = GRPC_OP_RECV_STATUS_ON_CLIENT - op.c_op.flags = flags - grpc_metadata_array_init(&op._c_metadata_array) - op.c_op.data.receive_status_on_client.trailing_metadata = ( - &op._c_metadata_array) - op._c_metadata_array_needs_destruction = True - op.c_op.data.receive_status_on_client.status = ( - &op._received_status_code) - op.c_op.data.receive_status_on_client.status_details = ( - &op._status_details) - op.is_valid = True - return op - -def operation_receive_close_on_server(int flags): - cdef Operation op = Operation() - op.c_op.type = GRPC_OP_RECV_CLOSE_ON_SERVER - op.c_op.flags = flags - op.c_op.data.receive_close_on_server.cancelled = &op._received_cancelled - op.is_valid = True - return op - - cdef class CompressionOptions: def __cinit__(self): diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pxd b/src/python/grpcio/grpc/_cython/cygrpc.pxd index 6fc5638d5d8..ad229de0ae6 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pxd +++ b/src/python/grpcio/grpc/_cython/cygrpc.pxd @@ -19,6 +19,7 @@ include "_cygrpc/channel.pxd.pxi" include "_cygrpc/credentials.pxd.pxi" include "_cygrpc/completion_queue.pxd.pxi" include "_cygrpc/metadata.pxd.pxi" +include "_cygrpc/operation.pxd.pxi" include "_cygrpc/records.pxd.pxi" include "_cygrpc/security.pxd.pxi" include "_cygrpc/server.pxd.pxi" diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx index d6052298221..0964fb66ab7 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pyx +++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx @@ -26,6 +26,7 @@ include "_cygrpc/channel.pyx.pxi" include "_cygrpc/credentials.pyx.pxi" include "_cygrpc/completion_queue.pyx.pxi" include "_cygrpc/metadata.pyx.pxi" +include "_cygrpc/operation.pyx.pxi" include "_cygrpc/records.pyx.pxi" include "_cygrpc/security.pyx.pxi" include "_cygrpc/server.pyx.pxi" diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index 02d3af8706d..eec31bdcf6b 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -50,7 +50,7 @@ _UNEXPECTED_EXIT_SERVER_GRACE = 1.0 def _serialized_request(request_event): - return request_event.batch_operations[0].received_message.bytes() + return request_event.batch_operations[0].message() def _application_code(code): @@ -130,13 +130,13 @@ def _abort(state, call, code, details): effective_code = _abortion_code(state, code) effective_details = details if state.details is None else state.details if state.initial_metadata_allowed: - operations = (cygrpc.operation_send_initial_metadata( - (), _EMPTY_FLAGS), cygrpc.operation_send_status_from_server( + operations = (cygrpc.SendInitialMetadataOperation( + None, _EMPTY_FLAGS), cygrpc.SendStatusFromServerOperation( state.trailing_metadata, effective_code, effective_details, _EMPTY_FLAGS),) token = _SEND_INITIAL_METADATA_AND_SEND_STATUS_FROM_SERVER_TOKEN else: - operations = (cygrpc.operation_send_status_from_server( + operations = (cygrpc.SendStatusFromServerOperation( state.trailing_metadata, effective_code, effective_details, _EMPTY_FLAGS),) token = _SEND_STATUS_FROM_SERVER_TOKEN @@ -150,8 +150,7 @@ def _receive_close_on_server(state): def receive_close_on_server(receive_close_on_server_event): with state.condition: - if receive_close_on_server_event.batch_operations[ - 0].received_cancelled: + if receive_close_on_server_event.batch_operations[0].cancelled(): state.client = _CANCELLED elif state.client is _OPEN: state.client = _CLOSED @@ -262,7 +261,7 @@ class _Context(grpc.ServicerContext): _raise_rpc_error(self._state) else: if self._state.initial_metadata_allowed: - operation = cygrpc.operation_send_initial_metadata( + operation = cygrpc.SendInitialMetadataOperation( initial_metadata, _EMPTY_FLAGS) self._rpc_event.operation_call.start_server_batch( (operation,), _send_initial_metadata(self._state)) @@ -305,7 +304,7 @@ class _RequestIterator(object): raise StopIteration() else: self._call.start_server_batch( - (cygrpc.operation_receive_message(_EMPTY_FLAGS),), + (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),), _receive_message(self._state, self._call, self._request_deserializer)) self._state.due.add(_RECEIVE_MESSAGE_TOKEN) @@ -348,7 +347,7 @@ def _unary_request(rpc_event, state, request_deserializer): return None else: rpc_event.operation_call.start_server_batch( - (cygrpc.operation_receive_message(_EMPTY_FLAGS),), + (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),), _receive_message(state, rpc_event.operation_call, request_deserializer)) state.due.add(_RECEIVE_MESSAGE_TOKEN) @@ -424,14 +423,15 @@ def _send_response(rpc_event, state, serialized_response): return False else: if state.initial_metadata_allowed: - operations = (cygrpc.operation_send_initial_metadata( - (), _EMPTY_FLAGS), cygrpc.operation_send_message( - serialized_response, _EMPTY_FLAGS),) + operations = (cygrpc.SendInitialMetadataOperation(None, + _EMPTY_FLAGS), + cygrpc.SendMessageOperation(serialized_response, + _EMPTY_FLAGS),) state.initial_metadata_allowed = False token = _SEND_INITIAL_METADATA_AND_SEND_MESSAGE_TOKEN else: - operations = (cygrpc.operation_send_message(serialized_response, - _EMPTY_FLAGS),) + operations = (cygrpc.SendMessageOperation(serialized_response, + _EMPTY_FLAGS),) token = _SEND_MESSAGE_TOKEN rpc_event.operation_call.start_server_batch( operations, _send_message(state, token)) @@ -448,16 +448,16 @@ def _status(rpc_event, state, serialized_response): code = _completion_code(state) details = _details(state) operations = [ - cygrpc.operation_send_status_from_server( + cygrpc.SendStatusFromServerOperation( state.trailing_metadata, code, details, _EMPTY_FLAGS), ] if state.initial_metadata_allowed: operations.append( - cygrpc.operation_send_initial_metadata((), _EMPTY_FLAGS)) + cygrpc.SendInitialMetadataOperation(None, _EMPTY_FLAGS)) if serialized_response is not None: operations.append( - cygrpc.operation_send_message(serialized_response, - _EMPTY_FLAGS)) + cygrpc.SendMessageOperation(serialized_response, + _EMPTY_FLAGS)) rpc_event.operation_call.start_server_batch( operations, _send_status_from_server(state, _SEND_STATUS_FROM_SERVER_TOKEN)) @@ -563,10 +563,10 @@ def _find_method_handler(rpc_event, generic_handlers, interceptor_pipeline): def _reject_rpc(rpc_event, status, details): - operations = (cygrpc.operation_send_initial_metadata((), _EMPTY_FLAGS), - cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS), - cygrpc.operation_send_status_from_server((), status, details, - _EMPTY_FLAGS),) + operations = (cygrpc.SendInitialMetadataOperation(None, _EMPTY_FLAGS), + cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS), + cygrpc.SendStatusFromServerOperation(None, status, details, + _EMPTY_FLAGS),) rpc_state = _RPCState() rpc_event.operation_call.start_server_batch( operations, lambda ignored_event: (rpc_state, (),)) @@ -577,7 +577,7 @@ def _handle_with_method_handler(rpc_event, method_handler, thread_pool): state = _RPCState() with state.condition: rpc_event.operation_call.start_server_batch( - (cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),), + (cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS),), _receive_close_on_server(state)) state.due.add(_RECEIVE_CLOSE_ON_SERVER_TOKEN) if method_handler.request_streaming: diff --git a/src/python/grpcio_tests/tests/tests.json b/src/python/grpcio_tests/tests/tests.json index 3bf53087495..e033c1063f4 100644 --- a/src/python/grpcio_tests/tests/tests.json +++ b/src/python/grpcio_tests/tests/tests.json @@ -34,6 +34,7 @@ "unit._cython._no_messages_server_completion_queue_per_call_test.Test", "unit._cython._no_messages_single_server_completion_queue_test.Test", "unit._cython._read_some_but_not_all_responses_test.ReadSomeButNotAllResponsesTest", + "unit._cython._server_test.Test", "unit._cython.cygrpc_test.InsecureServerInsecureClient", "unit._cython.cygrpc_test.SecureServerSecureClient", "unit._cython.cygrpc_test.TypeSmokeTest", diff --git a/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py b/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py index a8a7175cc71..458b4fe542a 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py +++ b/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py @@ -65,10 +65,10 @@ class _Handler(object): with self._lock: self._call.start_server_batch( - (cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),), + (cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS),), _RECEIVE_CLOSE_ON_SERVER_TAG) self._call.start_server_batch( - (cygrpc.operation_receive_message(_EMPTY_FLAGS),), + (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),), _RECEIVE_MESSAGE_TAG) first_event = self._completion_queue.poll() if _is_cancellation_event(first_event): @@ -76,10 +76,10 @@ class _Handler(object): else: with self._lock: operations = ( - cygrpc.operation_send_initial_metadata(_EMPTY_METADATA, - _EMPTY_FLAGS), - cygrpc.operation_send_message(b'\x79\x57', _EMPTY_FLAGS), - cygrpc.operation_send_status_from_server( + cygrpc.SendInitialMetadataOperation(_EMPTY_METADATA, + _EMPTY_FLAGS), + cygrpc.SendMessageOperation(b'\x79\x57', _EMPTY_FLAGS), + cygrpc.SendStatusFromServerOperation( _EMPTY_METADATA, cygrpc.StatusCode.ok, b'test details!', _EMPTY_FLAGS),) self._call.start_server_batch(operations, @@ -169,13 +169,13 @@ class CancelManyCallsTest(unittest.TestCase): None, _EMPTY_FLAGS, client_completion_queue, b'/twinkies', None, _INFINITE_FUTURE) operations = ( - cygrpc.operation_send_initial_metadata(_EMPTY_METADATA, - _EMPTY_FLAGS), - cygrpc.operation_send_message(b'\x45\x56', _EMPTY_FLAGS), - cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), - cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), - cygrpc.operation_receive_message(_EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS),) + cygrpc.SendInitialMetadataOperation(_EMPTY_METADATA, + _EMPTY_FLAGS), + cygrpc.SendMessageOperation(b'\x45\x56', _EMPTY_FLAGS), + cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS), + cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS), + cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS),) tag = 'client_complete_call_{0:04d}_tag'.format(index) client_call.start_client_batch(operations, tag) client_due.add(tag) diff --git a/src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py b/src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py index d08003af444..41291cc88f4 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py +++ b/src/python/grpcio_tests/tests/unit/_cython/_no_messages_server_completion_queue_per_call_test.py @@ -49,18 +49,19 @@ class Test(_common.RpcTest, unittest.TestCase): with self.client_condition: client_receive_initial_metadata_start_batch_result = ( client_call.start_client_batch([ - cygrpc.operation_receive_initial_metadata( - _common.EMPTY_FLAGS), + cygrpc.ReceiveInitialMetadataOperation(_common.EMPTY_FLAGS), ], client_receive_initial_metadata_tag)) + self.assertEqual(cygrpc.CallError.ok, + client_receive_initial_metadata_start_batch_result) client_complete_rpc_start_batch_result = client_call.start_client_batch( [ - cygrpc.operation_send_initial_metadata( + cygrpc.SendInitialMetadataOperation( _common.INVOCATION_METADATA, _common.EMPTY_FLAGS), - cygrpc.operation_send_close_from_client( - _common.EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client( - _common.EMPTY_FLAGS), + cygrpc.SendCloseFromClientOperation(_common.EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_common.EMPTY_FLAGS), ], client_complete_rpc_tag) + self.assertEqual(cygrpc.CallError.ok, + client_complete_rpc_start_batch_result) self.client_driver.add_due({ client_receive_initial_metadata_tag, client_complete_rpc_tag, @@ -72,7 +73,7 @@ class Test(_common.RpcTest, unittest.TestCase): with server_call_condition: server_send_initial_metadata_start_batch_result = ( server_request_call_event.operation_call.start_server_batch([ - cygrpc.operation_send_initial_metadata( + cygrpc.SendInitialMetadataOperation( _common.INITIAL_METADATA, _common.EMPTY_FLAGS), ], server_send_initial_metadata_tag)) server_call_driver.add_due({ @@ -84,9 +85,8 @@ class Test(_common.RpcTest, unittest.TestCase): with server_call_condition: server_complete_rpc_start_batch_result = ( server_request_call_event.operation_call.start_server_batch([ - cygrpc.operation_receive_close_on_server( - _common.EMPTY_FLAGS), - cygrpc.operation_send_status_from_server( + cygrpc.ReceiveCloseOnServerOperation(_common.EMPTY_FLAGS), + cygrpc.SendStatusFromServerOperation( _common.TRAILING_METADATA, cygrpc.StatusCode.ok, b'test details', _common.EMPTY_FLAGS), ], server_complete_rpc_tag)) diff --git a/src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py b/src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py index d0166a2b29f..b429a20ed75 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py +++ b/src/python/grpcio_tests/tests/unit/_cython/_no_messages_single_server_completion_queue_test.py @@ -44,17 +44,14 @@ class Test(_common.RpcTest, unittest.TestCase): with self.client_condition: client_receive_initial_metadata_start_batch_result = ( client_call.start_client_batch([ - cygrpc.operation_receive_initial_metadata( - _common.EMPTY_FLAGS), + cygrpc.ReceiveInitialMetadataOperation(_common.EMPTY_FLAGS), ], client_receive_initial_metadata_tag)) client_complete_rpc_start_batch_result = client_call.start_client_batch( [ - cygrpc.operation_send_initial_metadata( + cygrpc.SendInitialMetadataOperation( _common.INVOCATION_METADATA, _common.EMPTY_FLAGS), - cygrpc.operation_send_close_from_client( - _common.EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client( - _common.EMPTY_FLAGS), + cygrpc.SendCloseFromClientOperation(_common.EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_common.EMPTY_FLAGS), ], client_complete_rpc_tag) self.client_driver.add_due({ client_receive_initial_metadata_tag, @@ -67,7 +64,7 @@ class Test(_common.RpcTest, unittest.TestCase): with self.server_condition: server_send_initial_metadata_start_batch_result = ( server_request_call_event.operation_call.start_server_batch([ - cygrpc.operation_send_initial_metadata( + cygrpc.SendInitialMetadataOperation( _common.INITIAL_METADATA, _common.EMPTY_FLAGS), ], server_send_initial_metadata_tag)) self.server_driver.add_due({ @@ -79,11 +76,10 @@ class Test(_common.RpcTest, unittest.TestCase): with self.server_condition: server_complete_rpc_start_batch_result = ( server_request_call_event.operation_call.start_server_batch([ - cygrpc.operation_receive_close_on_server( - _common.EMPTY_FLAGS), - cygrpc.operation_send_status_from_server( + cygrpc.ReceiveCloseOnServerOperation(_common.EMPTY_FLAGS), + cygrpc.SendStatusFromServerOperation( _common.TRAILING_METADATA, cygrpc.StatusCode.ok, - b'test details', _common.EMPTY_FLAGS), + 'test details', _common.EMPTY_FLAGS), ], server_complete_rpc_tag)) self.server_driver.add_due({ server_complete_rpc_tag, diff --git a/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py b/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py index 1deb15ba032..a6d92f22030 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py +++ b/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py @@ -158,15 +158,15 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase): with client_condition: client_receive_initial_metadata_start_batch_result = ( client_call.start_client_batch([ - cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), + cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS), ], client_receive_initial_metadata_tag)) client_due.add(client_receive_initial_metadata_tag) client_complete_rpc_start_batch_result = ( client_call.start_client_batch([ - cygrpc.operation_send_initial_metadata(_EMPTY_METADATA, - _EMPTY_FLAGS), - cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), + cygrpc.SendInitialMetadataOperation(_EMPTY_METADATA, + _EMPTY_FLAGS), + cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS), ], client_complete_rpc_tag)) client_due.add(client_complete_rpc_tag) @@ -175,12 +175,12 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase): with server_call_condition: server_send_initial_metadata_start_batch_result = ( server_rpc_event.operation_call.start_server_batch([ - cygrpc.operation_send_initial_metadata(_EMPTY_METADATA, - _EMPTY_FLAGS), + cygrpc.SendInitialMetadataOperation(_EMPTY_METADATA, + _EMPTY_FLAGS), ], server_send_initial_metadata_tag)) server_send_first_message_start_batch_result = ( server_rpc_event.operation_call.start_server_batch([ - cygrpc.operation_send_message(b'\x07', _EMPTY_FLAGS), + cygrpc.SendMessageOperation(b'\x07', _EMPTY_FLAGS), ], server_send_first_message_tag)) server_send_initial_metadata_event = server_call_driver.event_with_tag( server_send_initial_metadata_tag) @@ -189,12 +189,12 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase): with server_call_condition: server_send_second_message_start_batch_result = ( server_rpc_event.operation_call.start_server_batch([ - cygrpc.operation_send_message(b'\x07', _EMPTY_FLAGS), + cygrpc.SendMessageOperation(b'\x07', _EMPTY_FLAGS), ], server_send_second_message_tag)) server_complete_rpc_start_batch_result = ( server_rpc_event.operation_call.start_server_batch([ - cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS), - cygrpc.operation_send_status_from_server( + cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS), + cygrpc.SendStatusFromServerOperation( (), cygrpc.StatusCode.ok, b'test details', _EMPTY_FLAGS), ], server_complete_rpc_tag)) @@ -208,7 +208,7 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase): client_receive_first_message_tag = 'client_receive_first_message_tag' client_receive_first_message_start_batch_result = ( client_call.start_client_batch([ - cygrpc.operation_receive_message(_EMPTY_FLAGS), + cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), ], client_receive_first_message_tag)) client_due.add(client_receive_first_message_tag) client_receive_first_message_event = client_driver.event_with_tag( diff --git a/src/python/grpcio_tests/tests/unit/_cython/_server_test.py b/src/python/grpcio_tests/tests/unit/_cython/_server_test.py new file mode 100644 index 00000000000..12bf40be6b3 --- /dev/null +++ b/src/python/grpcio_tests/tests/unit/_cython/_server_test.py @@ -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. +"""Test servers at the level of the Cython API.""" + +import threading +import time +import unittest + +from grpc._cython import cygrpc + + +class Test(unittest.TestCase): + + def test_lonely_server(self): + server_call_completion_queue = cygrpc.CompletionQueue() + server_shutdown_completion_queue = cygrpc.CompletionQueue() + server = cygrpc.Server(cygrpc.ChannelArgs([])) + server.register_completion_queue(server_call_completion_queue) + server.register_completion_queue(server_shutdown_completion_queue) + port = server.add_http2_port(b'[::]:0') + server.start() + + server_request_call_tag = 'server_request_call_tag' + server_request_call_start_batch_result = server.request_call( + server_call_completion_queue, server_call_completion_queue, + server_request_call_tag) + + time.sleep(4) + + server_shutdown_tag = 'server_shutdown_tag' + server_shutdown_result = server.shutdown( + server_shutdown_completion_queue, server_shutdown_tag) + server_request_call_event = server_call_completion_queue.poll() + server_shutdown_event = server_shutdown_completion_queue.poll() + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py index 4eda6854865..002fb9b7f40 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py +++ b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py @@ -35,11 +35,6 @@ def _metadata_plugin(context, callback): class TypeSmokeTest(unittest.TestCase): - def testOperationFlags(self): - operation = cygrpc.operation_send_message(b'asdf', - cygrpc.WriteFlag.no_compress) - self.assertEqual(cygrpc.WriteFlag.no_compress, operation.flags) - def testTimespec(self): now = time.time() now_timespec_a = cygrpc.Timespec(now) @@ -170,7 +165,7 @@ class ServerClientMixin(object): SERVER_TRAILING_METADATA_KEY = 'california_is_in_a_drought' SERVER_TRAILING_METADATA_VALUE = 'zomg it is' SERVER_STATUS_CODE = cygrpc.StatusCode.ok - SERVER_STATUS_DETAILS = b'our work is never over' + SERVER_STATUS_DETAILS = 'our work is never over' REQUEST = b'in death a member of project mayhem has a name' RESPONSE = b'his name is robert paulson' METHOD = b'twinkies' @@ -192,13 +187,13 @@ class ServerClientMixin(object): (CLIENT_METADATA_ASCII_KEY, CLIENT_METADATA_ASCII_VALUE,), (CLIENT_METADATA_BIN_KEY, CLIENT_METADATA_BIN_VALUE,),) client_start_batch_result = client_call.start_client_batch([ - cygrpc.operation_send_initial_metadata(client_initial_metadata, - _EMPTY_FLAGS), - cygrpc.operation_send_message(REQUEST, _EMPTY_FLAGS), - cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), - cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), - cygrpc.operation_receive_message(_EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS) + cygrpc.SendInitialMetadataOperation(client_initial_metadata, + _EMPTY_FLAGS), + cygrpc.SendMessageOperation(REQUEST, _EMPTY_FLAGS), + cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS), + cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS), + cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS), ], client_call_tag) self.assertEqual(cygrpc.CallError.ok, client_start_batch_result) client_event_future = test_utilities.CompletionQueuePollFuture( @@ -227,12 +222,12 @@ class ServerClientMixin(object): server_trailing_metadata = ( (SERVER_TRAILING_METADATA_KEY, SERVER_TRAILING_METADATA_VALUE,),) server_start_batch_result = server_call.start_server_batch([ - cygrpc.operation_send_initial_metadata( + cygrpc.SendInitialMetadataOperation( server_initial_metadata, - _EMPTY_FLAGS), cygrpc.operation_receive_message(_EMPTY_FLAGS), - cygrpc.operation_send_message(RESPONSE, _EMPTY_FLAGS), - cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS), - cygrpc.operation_send_status_from_server( + _EMPTY_FLAGS), cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), + cygrpc.SendMessageOperation(RESPONSE, _EMPTY_FLAGS), + cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS), + cygrpc.SendStatusFromServerOperation( server_trailing_metadata, SERVER_STATUS_CODE, SERVER_STATUS_DETAILS, _EMPTY_FLAGS) ], server_call_tag) @@ -245,25 +240,24 @@ class ServerClientMixin(object): found_client_op_types = set() for client_result in client_event.batch_operations: # we expect each op type to be unique - self.assertNotIn(client_result.type, found_client_op_types) - found_client_op_types.add(client_result.type) - if client_result.type == cygrpc.OperationType.receive_initial_metadata: + self.assertNotIn(client_result.type(), found_client_op_types) + found_client_op_types.add(client_result.type()) + if client_result.type( + ) == cygrpc.OperationType.receive_initial_metadata: self.assertTrue( test_common.metadata_transmitted( server_initial_metadata, - client_result.received_metadata)) - elif client_result.type == cygrpc.OperationType.receive_message: - self.assertEqual(RESPONSE, - client_result.received_message.bytes()) - elif client_result.type == cygrpc.OperationType.receive_status_on_client: + client_result.initial_metadata())) + elif client_result.type() == cygrpc.OperationType.receive_message: + self.assertEqual(RESPONSE, client_result.message()) + elif client_result.type( + ) == cygrpc.OperationType.receive_status_on_client: self.assertTrue( test_common.metadata_transmitted( server_trailing_metadata, - client_result.received_metadata)) - self.assertEqual(SERVER_STATUS_DETAILS, - client_result.received_status_details) - self.assertEqual(SERVER_STATUS_CODE, - client_result.received_status_code) + client_result.trailing_metadata())) + self.assertEqual(SERVER_STATUS_DETAILS, client_result.details()) + self.assertEqual(SERVER_STATUS_CODE, client_result.code()) self.assertEqual( set([ cygrpc.OperationType.send_initial_metadata, @@ -277,13 +271,13 @@ class ServerClientMixin(object): self.assertEqual(5, len(server_event.batch_operations)) found_server_op_types = set() for server_result in server_event.batch_operations: - self.assertNotIn(client_result.type, found_server_op_types) - found_server_op_types.add(server_result.type) - if server_result.type == cygrpc.OperationType.receive_message: - self.assertEqual(REQUEST, - server_result.received_message.bytes()) - elif server_result.type == cygrpc.OperationType.receive_close_on_server: - self.assertFalse(server_result.received_cancelled) + self.assertNotIn(client_result.type(), found_server_op_types) + found_server_op_types.add(server_result.type()) + if server_result.type() == cygrpc.OperationType.receive_message: + self.assertEqual(REQUEST, server_result.message()) + elif server_result.type( + ) == cygrpc.OperationType.receive_close_on_server: + self.assertFalse(server_result.cancelled()) self.assertEqual( set([ cygrpc.OperationType.send_initial_metadata, @@ -319,9 +313,8 @@ class ServerClientMixin(object): cygrpc_deadline, description) client_event_future = perform_client_operations([ - cygrpc.operation_send_initial_metadata(empty_metadata, - _EMPTY_FLAGS), - cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), + cygrpc.SendInitialMetadataOperation(empty_metadata, _EMPTY_FLAGS), + cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS), ], "Client prologue") request_event = self.server_completion_queue.poll(cygrpc_deadline) @@ -333,8 +326,7 @@ class ServerClientMixin(object): cygrpc_deadline, description) server_event_future = perform_server_operations([ - cygrpc.operation_send_initial_metadata(empty_metadata, - _EMPTY_FLAGS), + cygrpc.SendInitialMetadataOperation(empty_metadata, _EMPTY_FLAGS), ], "Server prologue") client_event_future.result() # force completion @@ -343,12 +335,12 @@ class ServerClientMixin(object): # Messaging for _ in range(10): client_event_future = perform_client_operations([ - cygrpc.operation_send_message(b'', _EMPTY_FLAGS), - cygrpc.operation_receive_message(_EMPTY_FLAGS), + cygrpc.SendMessageOperation(b'', _EMPTY_FLAGS), + cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), ], "Client message") server_event_future = perform_server_operations([ - cygrpc.operation_send_message(b'', _EMPTY_FLAGS), - cygrpc.operation_receive_message(_EMPTY_FLAGS), + cygrpc.SendMessageOperation(b'', _EMPTY_FLAGS), + cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS), ], "Server receive") client_event_future.result() # force completion @@ -356,13 +348,13 @@ class ServerClientMixin(object): # Epilogue client_event_future = perform_client_operations([ - cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), - cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS) + cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS), + cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS) ], "Client epilogue") server_event_future = perform_server_operations([ - cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS), - cygrpc.operation_send_status_from_server( + cygrpc.ReceiveCloseOnServerOperation(_EMPTY_FLAGS), + cygrpc.SendStatusFromServerOperation( empty_metadata, cygrpc.StatusCode.ok, b'', _EMPTY_FLAGS) ], "Server epilogue") From 31789c46dfb52f5b2d81c20521a4c93177cdc7a3 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 21 Dec 2017 14:20:39 -0800 Subject: [PATCH 10/13] fix public hdrs in 1.8.x --- BUILD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BUILD b/BUILD index beb3c9ebddd..f48d6bc188d 100644 --- a/BUILD +++ b/BUILD @@ -79,10 +79,11 @@ GRPC_PUBLIC_HDRS = [ "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", - "include/grpc/load_reporting.h", + "include/grpc/fork.h", "include/grpc/grpc.h", "include/grpc/grpc_posix.h", "include/grpc/grpc_security_constants.h", + "include/grpc/load_reporting.h", "include/grpc/slice.h", "include/grpc/slice_buffer.h", "include/grpc/status.h", From 98efefcc1e4e94d97125e828b1ec99174c2ee1d4 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Thu, 28 Dec 2017 09:13:07 -0800 Subject: [PATCH 11/13] Relax log-level when polling engines are undefined --- src/core/lib/iomgr/ev_epoll1_linux.cc | 2 -- src/core/lib/iomgr/ev_epollex_linux.cc | 2 -- src/core/lib/iomgr/ev_epollsig_linux.cc | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index 0dda1d924c3..2467b9a5853 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -1258,8 +1258,6 @@ const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) { /* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return * NULL */ const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) { - gpr_log(GPR_ERROR, - "Skipping epoll1 becuase GRPC_LINUX_EPOLL is not defined."); return NULL; } #endif /* defined(GRPC_POSIX_SOCKET) */ diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc index 62643df697d..931f3fc3556 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.cc +++ b/src/core/lib/iomgr/ev_epollex_linux.cc @@ -1479,8 +1479,6 @@ const grpc_event_engine_vtable* grpc_init_epollex_linux( * NULL */ const grpc_event_engine_vtable* grpc_init_epollex_linux( bool explicitly_requested) { - gpr_log(GPR_ERROR, - "Skipping epollex becuase GRPC_LINUX_EPOLL is not defined."); return NULL; } #endif /* defined(GRPC_POSIX_SOCKET) */ diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc index 12c8483b8ee..7ff043f5f91 100644 --- a/src/core/lib/iomgr/ev_epollsig_linux.cc +++ b/src/core/lib/iomgr/ev_epollsig_linux.cc @@ -1758,8 +1758,6 @@ const grpc_event_engine_vtable* grpc_init_epollsig_linux( * NULL */ const grpc_event_engine_vtable* grpc_init_epollsig_linux( bool explicit_request) { - gpr_log(GPR_ERROR, - "Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined."); return NULL; } #endif /* defined(GRPC_POSIX_SOCKET) */ From 674dbf1f8db48ab9823192c351a067a3bc2aec61 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Wed, 27 Dec 2017 00:25:37 -0800 Subject: [PATCH 12/13] Fetch boringssl-with-bazel submodule from GitHub --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index d7f23ffcbd7..c4b0d241dc3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,7 +19,7 @@ url = https://github.com/google/benchmark [submodule "third_party/boringssl-with-bazel"] path = third_party/boringssl-with-bazel - url = https://boringssl.googlesource.com/boringssl + url = https://github.com/google/boringssl.git [submodule "third_party/cares/cares"] path = third_party/cares/cares url = https://github.com/c-ares/c-ares.git From 6c9a0a1a9667451bf7747bb73096bc3c60420301 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sat, 30 Dec 2017 18:28:13 -0800 Subject: [PATCH 13/13] Bump version to 1.8.3 --- 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.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/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/GRPCClient/private/version.h | 2 +- src/objective-c/tests/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 +- 30 files changed, 34 insertions(+), 34 deletions(-) diff --git a/BUILD b/BUILD index f48d6bc188d..ef345e50b8b 100644 --- a/BUILD +++ b/BUILD @@ -43,7 +43,7 @@ g_stands_for = "generous" core_version = "5.0.0" -version = "1.8.2" +version = "1.8.3" GPR_PUBLIC_HDRS = [ "include/grpc/support/alloc.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index e99fce66bf5..461b4d26036 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.8.2") +set(PACKAGE_VERSION "1.8.3") 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 3f4452aa5d7..3d8f77ab6a5 100644 --- a/Makefile +++ b/Makefile @@ -412,8 +412,8 @@ Q = @ endif CORE_VERSION = 5.0.0 -CPP_VERSION = 1.8.2 -CSHARP_VERSION = 1.8.2 +CPP_VERSION = 1.8.3 +CSHARP_VERSION = 1.8.3 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index aa614b8a64f..5cce4e66cc8 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: generous - version: 1.8.2 + version: 1.8.3 filegroups: - name: census public_headers: diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 57e08ecea41..030fcee2705 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.8.2' + version = '1.8.3' 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 a09cb132fd9..d8bfae0a6ec 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-ProtoRPC' - version = '1.8.2' + version = '1.8.3' 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 e567e7dcdb9..d7182abc136 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-RxLibrary' - version = '1.8.2' + version = '1.8.3' 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 033e0cef912..a784ea840c7 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '1.8.2' + version = '1.8.3' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'https://grpc.io' diff --git a/package.xml b/package.xml index eb0c8dcda70..67dff8f7b95 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2017-08-24 - 1.8.2 - 1.8.2 + 1.8.3 + 1.8.3 beta diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index 26090b9f90b..8eb5a2e3b88 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.8.2"; } +grpc::string Version() { return "1.8.3"; } } // namespace grpc diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include index 662eb8f50e0..3eeda74547a 100755 --- a/src/csharp/Grpc.Core/Version.csproj.include +++ b/src/csharp/Grpc.Core/Version.csproj.include @@ -1,7 +1,7 @@ - 1.8.2 + 1.8.3 3.3.0 diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 339e1a28c18..7cf012ca94d 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.8.2.0"; + public const string CurrentAssemblyFileVersion = "1.8.3.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "1.8.2"; + public const string CurrentVersion = "1.8.3"; } } diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat index 19dfdaf293e..86657c92a56 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.8.2 +set VERSION=1.8.3 @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 3ff66bcae25..33c34a013cd 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.8.2" -OutputDirectory ../../artifacts -nuget pack Grpc.Tools.nuspec -Version "1.8.2" -OutputDirectory ../../artifacts +nuget pack Grpc.nuspec -Version "1.8.3" -OutputDirectory ../../artifacts +nuget pack Grpc.Tools.nuspec -Version "1.8.3" -OutputDirectory ../../artifacts (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 148e0315d26..fc4859e018b 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.8.2' + v = '1.8.3' 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 b8211a83af6..3513a7d6f44 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.8.2" +#define GRPC_OBJC_VERSION_STRING @"1.8.3" diff --git a/src/objective-c/tests/version.h b/src/objective-c/tests/version.h index 170d888aa4d..63a0db9bdb9 100644 --- a/src/objective-c/tests/version.h +++ b/src/objective-c/tests/version.h @@ -23,5 +23,5 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.8.2" +#define GRPC_OBJC_VERSION_STRING @"1.8.3" #define GRPC_C_VERSION_STRING @"5.0.0" diff --git a/src/php/composer.json b/src/php/composer.json index e3047b26788..7c21402f07b 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.8.2", + "version": "1.8.3", "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 277833bc3bc..48ce15fe70a 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.8.2" +#define PHP_GRPC_VERSION "1.8.3" #endif /* VERSION_H */ diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index 2b594c04ea7..2f403d1d64f 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.8.2""" +__version__ = """1.8.3""" diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 448031a6f37..b6da32edc1f 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.8.2' +VERSION='1.8.3' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index a5ca41afb3e..f38db221e47 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.8.2' +VERSION='1.8.3' diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index 0595258ae71..aa51f09d0d2 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.8.2' +VERSION='1.8.3' diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py index eec00c085f3..560630b62d7 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.8.2' +VERSION='1.8.3' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index aef18d5ee35..8f998544ea5 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.8.2' +VERSION='1.8.3' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 13b7b81ea35..4308231da0a 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.8.2' + VERSION = '1.8.3' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index e84962436ed..453a88935b7 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -14,6 +14,6 @@ module GRPC module Tools - VERSION = '1.8.2' + VERSION = '1.8.3' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index e6d772189a4..2822a981528 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.8.2' +VERSION='1.8.3' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 5633cf2bda1..36bc63eafc2 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.8.2 +PROJECT_NUMBER = 1.8.3 # 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 667005c38f6..7ad182544c6 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.8.2 +PROJECT_NUMBER = 1.8.3 # 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