Skip to content

Commit

Permalink
Merge branch 'main' into bazel-5
Browse files Browse the repository at this point in the history
* main:
  envoy: 71248e512 (envoyproxy#2027)
  Migrate EngFlow configurations from rbe_autoconfig to rbe_configs_gen (envoyproxy#2037)
  timing test (envoyproxy#2035)
  [CI] Update Xcode to 13.2.1 (envoyproxy#1997)
  owners: adding charles (envoyproxy#2038)

Signed-off-by: JP Simard <jp@jpsim.com>
  • Loading branch information
jpsim committed Feb 3, 2022
2 parents a77a0e7 + 3464962 commit cba9d40
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 23 deletions.
10 changes: 5 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
# https://github.com/bazelbuild/rules_jvm_external/issues/445
build --repo_env=JAVA_HOME=../bazel_tools/jdk
build --define disable_known_issue_asserts=true
Expand Down Expand Up @@ -147,10 +147,10 @@ build:remote-ci-linux-asan --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build:remote-ci-linux-asan --action_env=CC=/opt/llvm/bin/clang
build:remote-ci-linux-asan --action_env=CXX=/opt/llvm/bin/clang++
build:remote-ci-linux-asan --crosstool_top=//third_party/rbe_configs/cc:toolchain
build:remote-ci-linux-asan --extra_execution_platforms=//third_party/rbe_configs/config:platform
build:remote-ci-linux-asan --extra_execution_platforms=//third_party/rbe_configs/config:platform-asan
build:remote-ci-linux-asan --extra_toolchains=//third_party/rbe_configs/config:cc-toolchain
build:remote-ci-linux-asan --host_platform=//third_party/rbe_configs/config:platform
build:remote-ci-linux-asan --platforms=//third_party/rbe_configs/config:platform
build:remote-ci-linux-asan --host_platform=//third_party/rbe_configs/config:platform-asan
build:remote-ci-linux-asan --platforms=//third_party/rbe_configs/config:platform-asan
build:remote-ci-linux-asan --config=remote-ci-common
#############################################################################
# remote-ci-linux-tsan: These options are Linux-only using Clang and ThreadSanitizer
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: '(/certificates.inc$)|(test/.*/testing/data/)'
exclude: '(^third_party/rbe_configs/cc/module.modulemap$)|(/certificates.inc$)|(test/.*/testing/data/)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
Expand Down
2 changes: 2 additions & 0 deletions OWNERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 10 additions & 10 deletions ci/BUILD
Original file line number Diff line number Diff line change
@@ -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",
],
)

Expand Down
2 changes: 1 addition & 1 deletion ci/mac_ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/root/start/building/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion library/common/stream_info/extra_stream_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
25 changes: 25 additions & 0 deletions test/common/integration/client_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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<callbacks_called*>(context);
cc_->on_complete_received_byte_count = final_intel.received_byte_count;
cc_->on_complete_calls++;
Expand Down
2 changes: 1 addition & 1 deletion third_party/rbe_configs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@
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.
limitations under the License.
4 changes: 2 additions & 2 deletions third_party/rbe_configs/cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ cc_toolchain_config(
"/opt/llvm/include/c++/v1"],
tool_paths = {"ar": "/usr/bin/ar",
"ld": "/usr/bin/ld",
"llvm-cov": "None",
"llvm-cov": "/opt/llvm/bin/llvm-cov",
"cpp": "/usr/bin/cpp",
"gcc": "/opt/llvm/bin/clang-12",
"dwp": "/usr/bin/dwp",
"gcov": "None",
"gcov": "/opt/llvm/bin/llvm-cov",
"nm": "/usr/bin/nm",
"objcopy": "/usr/bin/objcopy",
"objdump": "/usr/bin/objdump",
Expand Down
2 changes: 1 addition & 1 deletion third_party/rbe_configs/cc/tools/cpp/empty.cc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
int main() {}
int main() {}
18 changes: 18 additions & 0 deletions third_party/rbe_configs/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,21 @@ platform(
"Pool": "linux",
},
)

platform(
name = "platform-asan",
parents = ["@local_config_platform//:host"],
constraint_values = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:x86_64",
"@bazel_tools//tools/cpp:clang",
],
exec_properties = {
"container-image": "docker://envoyproxy/envoy-build-ubuntu@sha256:4965eb16ba40bccf8dbf1cb03a544c8671e5a239396a90fd7159a24195181b2a",
"OSFamily": "Linux",
"Pool": "linux",
# Necessary to workaround https://github.com/google/sanitizers/issues/916, otherwise, dangling threads in the
# docker container fail tests on teardown (example: https://github.com/envoyproxy/envoy-mobile/runs/3443649963)
"dockerAddCapabilities": "SYS_PTRACE",
},
)

0 comments on commit cba9d40

Please sign in to comment.