From 5ea738a119c8186090a74ca5a3da71d6aa87435e Mon Sep 17 00:00:00 2001 From: JP Simard Date: Tue, 1 Feb 2022 17:13:00 -0500 Subject: [PATCH 1/5] [deps] Update rules_android to a stable release URL (#2032) Previous URL started returning a zip archive with a different checksum: https://github.com/bazelbuild/rules_android/issues/43 Signed-off-by: JP Simard --- bazel/envoy_mobile_repositories.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazel/envoy_mobile_repositories.bzl b/bazel/envoy_mobile_repositories.bzl index 3681f54e5b..c6776df942 100644 --- a/bazel/envoy_mobile_repositories.bzl +++ b/bazel/envoy_mobile_repositories.bzl @@ -143,7 +143,7 @@ def kotlin_repos(): def android_repos(): http_archive( name = "build_bazel_rules_android", - urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], + urls = ["https://github.com/bazelbuild/rules_android/archive/refs/tags/v0.1.1.zip"], sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", strip_prefix = "rules_android-0.1.1", ) From 687371aeda1fafacdbb2f05081968c3b21fefbb0 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Tue, 1 Feb 2022 17:38:11 -0500 Subject: [PATCH 2/5] [OWNERS] Update Envoy Mobile owners (#2031) I'm adding myself as an owner and moving Michael Rebello to a new "Emiritus maintainers" section to match the structure and naming used by the Envoy project. Signed-off-by: JP Simard --- OWNERS.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OWNERS.md b/OWNERS.md index 46bf5a324a..ffb21a1b07 100644 --- a/OWNERS.md +++ b/OWNERS.md @@ -11,10 +11,10 @@ routing PRs, questions, etc. to the right place. * Envoy mobile core, C bridge layer, C++ extensions, build system, Envoy upstream. * Snow Pettersen ([snowp](https://github.com/snowp)) (aickck@gmail.com) * Envoy Upstream. Stats. -* Michael Rebello ([rebello95](https://github.com/rebello95)) (mrebello@lyft.com) - * iOS (swift/objective-c) platform bindings. * Mike Schore ([goaway](https://github.com/goaway)) (mschore@lyft.com) * General. +* JP Simard ([jpsim](https://github.com/jpsim)) (jp@lyft.com) + * iOS (swift/objective-c) platform bindings. # Friends of Envoy Mobile @@ -31,3 +31,7 @@ matter expert reviews. Feel free to loop them in as needed. * Cronet API shim aka "Cronvoy". * Keith Smiley ([keith](https://github.com/keith)) (keithbsmiley@gmail.com) * Bazel build magician + +# Emeritus maintainers + +* Michael Rebello ([rebello95](https://github.com/rebello95)) (mrebello@lyft.com) From b1b8a295b881f79d665006deac8a78a4f8d06ed9 Mon Sep 17 00:00:00 2001 From: alyssawilk Date: Thu, 3 Feb 2022 08:29:05 -0500 Subject: [PATCH 3/5] owners: adding charles (#2038) Signed-off-by: Alyssa Wilk --- OWNERS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OWNERS.md b/OWNERS.md index ffb21a1b07..25fe157dee 100644 --- a/OWNERS.md +++ b/OWNERS.md @@ -15,6 +15,8 @@ routing PRs, questions, etc. to the right place. * General. * JP Simard ([jpsim](https://github.com/jpsim)) (jp@lyft.com) * iOS (swift/objective-c) platform bindings. +* Charles Le Borgne ([carloseltuerto](http://github.com/carloseltuerto)) (cleborgne@google.com) + * Cronvoy. # Friends of Envoy Mobile From 8ff57ab52c26e5a1574f54c7d73d8bc2b9dfe88c Mon Sep 17 00:00:00 2001 From: JP Simard Date: Thu, 3 Feb 2022 11:18:20 -0500 Subject: [PATCH 4/5] [CI] Update Xcode to 13.2.1 (#1997) Release notes: https://developer.apple.com/documentation/xcode-release-notes/xcode-13_2_1-release-notes Signed-off-by: JP Simard --- .bazelrc | 4 ++-- ci/BUILD | 20 ++++++++++---------- ci/mac_ci_setup.sh | 2 +- docs/root/start/building/building.rst | 3 ++- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.bazelrc b/.bazelrc index 907b5f5819..3a3b1a60e7 100644 --- a/.bazelrc +++ b/.bazelrc @@ -11,11 +11,11 @@ build --features=swift.debug_prefix_map build --host_force_python=PY3 build --ios_minimum_os=11.0 build --ios_simulator_device="iPhone 13" -build --ios_simulator_version=15.0 +build --ios_simulator_version=15.2 build --spawn_strategy=local build --verbose_failures build --workspace_status_command=envoy/bazel/get_workspace_status -build --xcode_version=13.0 +build --xcode_version=13.2.1 build --host_javabase=@bazel_tools//tools/jdk:remote_jdk11 build --javabase=@bazel_tools//tools/jdk:remote_jdk11 build --tool_java_runtime_version=remotejdk_11 diff --git a/ci/BUILD b/ci/BUILD index e10bc27662..3f6609f13f 100644 --- a/ci/BUILD +++ b/ci/BUILD @@ -1,27 +1,27 @@ licenses(["notice"]) # Apache 2 xcode_version( - name = "xcode_13_0", - default_ios_sdk_version = "15.0", - default_macos_sdk_version = "11.3", - default_tvos_sdk_version = "15.0", - default_watchos_sdk_version = "7.4", - version = "13.0", + name = "xcode_13_2_1", + default_ios_sdk_version = "15.2", + default_macos_sdk_version = "12.1", + default_tvos_sdk_version = "15.2", + default_watchos_sdk_version = "8.3", + version = "13.2.1", ) available_xcodes( name = "local_xcodes", - default = ":xcode_13_0", + default = ":xcode_13_2_1", versions = [ - ":xcode_13_0", + ":xcode_13_2_1", ], ) available_xcodes( name = "remote_xcodes", - default = ":xcode_13_0", + default = ":xcode_13_2_1", versions = [ - ":xcode_13_0", + ":xcode_13_2_1", ], ) diff --git a/ci/mac_ci_setup.sh b/ci/mac_ci_setup.sh index b5be3f94e3..769d6bf222 100755 --- a/ci/mac_ci_setup.sh +++ b/ci/mac_ci_setup.sh @@ -45,7 +45,7 @@ fi pip3 install slackclient # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode -sudo xcode-select --switch /Applications/Xcode_13.0.app +sudo xcode-select --switch /Applications/Xcode_13.2.1.app # Download and set up ndk 21. Github upgraded to ndk 22 for their Mac image. ANDROID_HOME=$ANDROID_SDK_ROOT diff --git a/docs/root/start/building/building.rst b/docs/root/start/building/building.rst index 734738ef7c..404dd7897f 100644 --- a/docs/root/start/building/building.rst +++ b/docs/root/start/building/building.rst @@ -56,7 +56,8 @@ See `ci/mac_ci_setup.sh` for the specific NDK version used during builds. iOS requirements ---------------- -- Xcode 13.0 +- Xcode 13.2.1 +- iOS 11.0 or later - Note: Requirements are listed in the :repo:`.bazelrc file <.bazelrc>` and CI scripts .. _android_aar: From cd2a10c0b124a36a95398636f9c035a144c5f6f5 Mon Sep 17 00:00:00 2001 From: alyssawilk Date: Thu, 3 Feb 2022 14:25:05 -0500 Subject: [PATCH 5/5] timing test (#2035) Signed-off-by: Alyssa Wilk --- .../common/stream_info/extra_stream_info.cc | 4 ++- .../integration/client_integration_test.cc | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/library/common/stream_info/extra_stream_info.cc b/library/common/stream_info/extra_stream_info.cc index 7404b47910..a1373d12c4 100644 --- a/library/common/stream_info/extra_stream_info.cc +++ b/library/common/stream_info/extra_stream_info.cc @@ -34,7 +34,9 @@ void setFinalStreamIntel(StreamInfo& stream_info, envoy_final_stream_intel& fina setFromOptional(final_intel.response_start_ms, timing.first_upstream_rx_byte_received_); setFromOptional(final_intel.connect_start_ms, timing.upstream_connect_start_); setFromOptional(final_intel.connect_end_ms, timing.upstream_connect_complete_); - setFromOptional(final_intel.ssl_start_ms, timing.upstream_connect_complete_); + if (timing.upstream_handshake_complete_.has_value()) { + setFromOptional(final_intel.ssl_start_ms, timing.upstream_connect_complete_); + } setFromOptional(final_intel.ssl_end_ms, timing.upstream_handshake_complete_); final_intel.socket_reused = upstream_info->upstreamNumStreams() > 1; } diff --git a/test/common/integration/client_integration_test.cc b/test/common/integration/client_integration_test.cc index 0425f915a9..1cf546666a 100644 --- a/test/common/integration/client_integration_test.cc +++ b/test/common/integration/client_integration_test.cc @@ -42,6 +42,30 @@ typedef struct { ConditionalInitializer* terminal_callback; } callbacks_called; +void validateStreamIntel(const envoy_final_stream_intel& final_intel) { + // This test doesn't do DNS lookup + EXPECT_EQ(-1, final_intel.dns_start_ms); + EXPECT_EQ(-1, final_intel.dns_end_ms); + // This test doesn't do TLS. + EXPECT_EQ(-1, final_intel.ssl_start_ms); + EXPECT_EQ(-1, final_intel.ssl_end_ms); + + ASSERT_NE(-1, final_intel.request_start_ms); + ASSERT_NE(-1, final_intel.connect_start_ms); + ASSERT_NE(-1, final_intel.connect_end_ms); + ASSERT_NE(-1, final_intel.sending_start_ms); + ASSERT_NE(-1, final_intel.sending_end_ms); + ASSERT_NE(-1, final_intel.response_start_ms); + ASSERT_NE(-1, final_intel.request_end_ms); + + ASSERT_LE(final_intel.request_start_ms, final_intel.connect_start_ms); + ASSERT_LE(final_intel.connect_start_ms, final_intel.connect_end_ms); + ASSERT_LE(final_intel.connect_end_ms, final_intel.sending_start_ms); + ASSERT_LE(final_intel.sending_start_ms, final_intel.sending_end_ms); + ASSERT_LE(final_intel.request_end_ms, final_intel.response_start_ms); + ASSERT_LE(final_intel.request_end_ms, final_intel.sending_end_ms); +} + // TODO(junr03): move this to derive from the ApiListenerIntegrationTest after moving that class // into a test lib. class ClientIntegrationTest : public BaseIntegrationTest, @@ -82,6 +106,7 @@ class ClientIntegrationTest : public BaseIntegrationTest, }; bridge_callbacks_.on_complete = [](envoy_stream_intel, envoy_final_stream_intel final_intel, void* context) -> void* { + validateStreamIntel(final_intel); callbacks_called* cc_ = static_cast(context); cc_->on_complete_received_byte_count = final_intel.received_byte_count; cc_->on_complete_calls++;