diff --git a/Makefile b/Makefile index be0166338fb..82dccc095d4 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ test_asan: PATH=$(PATH) CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-asan -- $(BAZEL_TARGETS) $(SANITIZER_EXCLUSIONS) test_tsan: - PATH=$(PATH) CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-tsan -- $(BAZEL_TARGETS) $(SANITIZER_EXCLUSIONS) + PATH=$(PATH) CC=$(CC) CXX=$(CXX) bazel $(BAZEL_STARTUP_ARGS) test $(BAZEL_TEST_ARGS) --config=clang-tsan --test_env=TSAN_OPTIONS=suppressions=$(TOP)/tsan.suppressions -- $(BAZEL_TARGETS) $(SANITIZER_EXCLUSIONS) check: @script/check-license-headers diff --git a/WORKSPACE b/WORKSPACE index 1b230222fa7..084094530a5 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -35,9 +35,11 @@ bind( # When updating envoy sha manually please update the sha in istio.deps file also # # Determine SHA256 `wget https://github.com/envoyproxy/envoy/archive/COMMIT.tar.gz && sha256sum COMMIT.tar.gz` -ENVOY_SHA = "5ea1a0c1cb506ed3e80d52b572b0f767f55f9f39" +# envoy commit date 05/15/2019 +# bazel version: 0.25.0 +ENVOY_SHA = "228a963d1308eb1b06e2e8b7387e0bfa72fe77ea" -ENVOY_SHA256 = "64beeb27f68ed644ff0bd37b193e5a85f49b883250940e292f6f150ec7173e38" +ENVOY_SHA256 = "6480ed4a526c504dc7c7c6784c7f143183a5481d944b999a45b7a7fb925d8e09" http_archive( name = "envoy", diff --git a/cc_gogo_protobuf.bzl b/cc_gogo_protobuf.bzl deleted file mode 100644 index c0d064130a8..00000000000 --- a/cc_gogo_protobuf.bzl +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 2017 Istio Authors. All Rights Reserved. -# -# 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. -# -################################################################################ -# -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -GOGO_PROTO_SHA = "100ba4e885062801d56799d78530b73b178a78f3" -GOGO_PROTO_SHA256 = "b04eb8eddd2d15d8b12d111d4ef7816fca6e5c5d495adf45fb8478278aa80f79" - -def cc_gogoproto_repositories(bind = True): - BUILD = """ -# Copyright 2017 Istio Authors. All Rights Reserved. -# -# 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. -# -################################################################################ -# - -licenses(["notice"]) - -load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") - -exports_files(glob(["google/**"])) - -cc_proto_library( - name = "cc_gogoproto", - srcs = [ - "gogoproto/gogo.proto", - ], - include = ".", - default_runtime = "//external:protobuf", - protoc = "//external:protoc", - visibility = ["//visibility:public"], - deps = [ - "//external:cc_wkt_protos", - ], -) -""" - http_archive( - name = "gogoproto_git", - strip_prefix = "protobuf-" + GOGO_PROTO_SHA, - url = "https://github.com/gogo/protobuf/archive/" + GOGO_PROTO_SHA + ".tar.gz", - sha256 = GOGO_PROTO_SHA256, - build_file_content = BUILD, - ) - - if bind: - native.bind( - name = "cc_gogoproto", - actual = "@gogoproto_git//:cc_gogoproto", - ) - - native.bind( - name = "cc_gogoproto_genproto", - actual = "@gogoproto_git//:cc_gogoproto_genproto", - ) diff --git a/googleapis.bzl b/googleapis.bzl deleted file mode 100644 index 0ab001e3109..00000000000 --- a/googleapis.bzl +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright 2017 Istio Authors. All Rights Reserved. -# -# 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. -# -################################################################################ -# -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -# Oct 21, 2016 (only release pre-dates sha) -GOOGLEAPIS_SHA = "13ac2436c5e3d568bd0e938f6ed58b77a48aba15" -GOOGLEAPIS_SHA256 = "f48956fb8c55617ed052c20884465f06b9a57b807164431185be397ea46993ca" - -def googleapis_repositories(bind = True): - GOOGLEAPIS_BUILD_FILE = """ -package(default_visibility = ["//visibility:public"]) - -load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") - -cc_proto_library( - name = "rpc_status_proto", - srcs = [ - "google/rpc/status.proto", - ], - visibility = ["//visibility:public"], - protoc = "//external:protoc", - default_runtime = "//external:protobuf", - deps = [ - "//external:cc_wkt_protos", - ], -) - -""" - http_archive( - name = "com_github_googleapis_googleapis", - build_file_content = GOOGLEAPIS_BUILD_FILE, - strip_prefix = "googleapis-" + GOOGLEAPIS_SHA, - url = "https://github.com/googleapis/googleapis/archive/" + GOOGLEAPIS_SHA + ".tar.gz", - sha256 = GOOGLEAPIS_SHA256, - ) - - if bind: - native.bind( - name = "rpc_status_proto", - actual = "@com_github_googleapis_googleapis//:rpc_status_proto", - ) - native.bind( - name = "rpc_status_proto_genproto", - actual = "@com_github_googleapis_googleapis//:rpc_status_proto_genproto", - ) diff --git a/istio.deps b/istio.deps index ee025b4b7cc..4aaed1fce86 100644 --- a/istio.deps +++ b/istio.deps @@ -11,6 +11,6 @@ "name": "ENVOY_SHA", "repoName": "envoyproxy/envoy", "file": "WORKSPACE", - "lastStableSHA": "5ea1a0c1cb506ed3e80d52b572b0f767f55f9f39" + "lastStableSHA": "228a963d1308eb1b06e2e8b7387e0bfa72fe77ea" } -] \ No newline at end of file +] diff --git a/protobuf.bzl b/protobuf.bzl deleted file mode 100644 index 3371d6a416c..00000000000 --- a/protobuf.bzl +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 2017 Istio Authors. All Rights Reserved. -# -# 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. -# -################################################################################ -# -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -# Match SHA used by Envoy -PROTOBUF_SHA = "582743bf40c5d3639a70f98f183914a2c0cd0680" -PROTOBUF_SHA256 = "cf9e2fb1d2cd30ec9d51ff1749045208bd641f290f64b85046485934b0e03783" - -def protobuf_repositories(load_repo = True, bind = True): - if load_repo: - http_archive( - name = "com_google_protobuf", - strip_prefix = "protobuf-" + PROTOBUF_SHA, - url = "https://github.com/google/protobuf/archive/" + PROTOBUF_SHA + ".tar.gz", - sha256 = PROTOBUF_SHA256, - ) - - if bind: - native.bind( - name = "protoc", - actual = "@com_google_protobuf//:protoc", - ) - - native.bind( - name = "protocol_compiler", - actual = "@com_google_protobuf//:protoc", - ) - - native.bind( - name = "protobuf", - actual = "@com_google_protobuf//:protobuf", - ) - - native.bind( - name = "cc_wkt_protos", - actual = "@com_google_protobuf//:cc_wkt_protos", - ) - - native.bind( - name = "cc_wkt_protos_genproto", - actual = "@com_google_protobuf//:cc_wkt_protos_genproto", - ) - - native.bind( - name = "protobuf_compiler", - actual = "@com_google_protobuf//:protoc_lib", - ) - - native.bind( - name = "protobuf_clib", - actual = "@com_google_protobuf//:protoc_lib", - ) diff --git a/repositories.bzl b/repositories.bzl index 7b8b89e1b3b..002a17d87fe 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -15,6 +15,7 @@ ################################################################################ # load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load(":x_tools_imports.bzl", "go_x_tools_imports_repositories") GOOGLETEST = "d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0" GOOGLETEST_SHA256 = "01508c8f47c99509130f128924f07f3a60be05d039cff571bb11d60bb11a3581" @@ -137,9 +138,9 @@ cc_proto_library( protoc = "//external:protoc", visibility = ["//visibility:public"], deps = [ - "//external:cc_gogoproto", - "//external:cc_wkt_protos", - "//external:rpc_status_proto", + "@com_github_gogo_protobuf//:gogo_proto_cc", + "@com_google_protobuf//:cc_wkt_protos", + "@googleapis//:rpc_status_protos", ], ) @@ -168,7 +169,7 @@ cc_proto_library( protoc = "//external:protoc", visibility = ["//visibility:public"], deps = [ - "//external:cc_gogoproto", + "@com_github_gogo_protobuf//:gogo_proto_cc", ], ) @@ -181,7 +182,7 @@ cc_proto_library( protoc = "//external:protoc", visibility = ["//visibility:public"], deps = [ - "//external:cc_gogoproto", + "@com_github_gogo_protobuf//:gogo_proto_cc", ], ) @@ -194,7 +195,7 @@ cc_proto_library( protoc = "//external:protoc", visibility = ["//visibility:public"], deps = [ - "//external:cc_gogoproto", + "@com_github_gogo_protobuf//:gogo_proto_cc", ], ) @@ -234,14 +235,6 @@ filegroup( actual = "@mixerapi_git//:tcp_cluster_rewrite_config_cc_proto", ) -load(":protobuf.bzl", "protobuf_repositories") -load(":cc_gogo_protobuf.bzl", "cc_gogoproto_repositories") -load(":x_tools_imports.bzl", "go_x_tools_imports_repositories") -load(":googleapis.bzl", "googleapis_repositories") - def mixerapi_dependencies(): - protobuf_repositories(load_repo = True, bind = True) - cc_gogoproto_repositories() go_x_tools_imports_repositories() - googleapis_repositories() mixerapi_repositories() diff --git a/test/integration/int_client.cc b/test/integration/int_client.cc index 6447ec128f3..41222bc8ff8 100644 --- a/test/integration/int_client.cc +++ b/test/integration/int_client.cc @@ -447,7 +447,7 @@ Client::Client(const std::string &name) stats_(), thread_(nullptr), time_system_(), - api_(Envoy::Thread::ThreadFactorySingleton::get(), stats_, time_system_, + api_(Envoy::Thread::threadFactoryForTest(), stats_, time_system_, Envoy::Filesystem::fileSystemForTest()), dispatcher_{api_.allocateDispatcher()} {} diff --git a/test/integration/int_server.cc b/test/integration/int_server.cc index e5a7416bec5..0fccd8e77ce 100644 --- a/test/integration/int_server.cc +++ b/test/integration/int_server.cc @@ -118,7 +118,7 @@ class ServerStreamImpl : public ServerStream, } response_status_ = status; - response_body_ = Envoy::Grpc::Common::serializeBody(message); + response_body_ = Envoy::Grpc::Common::serializeToGrpcFrame(message); Envoy::Event::TimerCb send_grpc_response = [this, delay]() { ENVOY_LOG( debug, @@ -612,7 +612,7 @@ Server::Server(const std::string &name, : name_(name), stats_(), time_system_(), - api_(Envoy::Thread::ThreadFactorySingleton::get(), stats_, time_system_, + api_(Envoy::Thread::threadFactoryForTest(), stats_, time_system_, Envoy::Filesystem::fileSystemForTest()), dispatcher_(api_.allocateDispatcher()), connection_handler_(new Envoy::Server::ConnectionHandlerImpl( diff --git a/tsan.suppressions b/tsan.suppressions new file mode 100644 index 00000000000..fc6077962a4 --- /dev/null +++ b/tsan.suppressions @@ -0,0 +1 @@ +race:event_debug_mode_too_late