Skip to content

Commit

Permalink
update to istio proxy 1.16.5 (#114)
Browse files Browse the repository at this point in the history
* update to istio proxy 1.16.5

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* fix: test runs twice for a PR

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

---------

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
  • Loading branch information
zhaohuabing committed Jun 22, 2023
1 parent 6c0faf1 commit b30da26
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 79 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/buildci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
---
name: build-metaprotocol

on: [push, pull_request, workflow_dispatch]
on:
workflow_dispatch:
push:
branches:
- "main"
- "master"
- "release/v*"
paths-ignore:
- "**/*.md"
- "**/*.png"
pull_request:
branches:
- "main"
- "master"
- "release/v*"
paths-ignore:
- "**/*.md"
- "**/*.png"

concurrency: ci-${{ github.ref }}

Expand Down
10 changes: 7 additions & 3 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@ envoy_cc_binary(
"//src/application_protocols/dubbo:config",
"//src/application_protocols/thrift:config",
"//src/application_protocols/brpc:config",
"@io_istio_proxy//extensions/access_log_policy:access_log_policy_lib",
"@io_istio_proxy//extensions/access_log_policy:access_log_policy_lib",
"@io_istio_proxy//extensions/attributegen:attributegen_plugin",
"@io_istio_proxy//extensions/metadata_exchange:metadata_exchange_lib",
"@io_istio_proxy//extensions/stackdriver:stackdriver_plugin",
"@io_istio_proxy//extensions/stats:stats_plugin",
"@envoy//source/extensions/common/wasm:wasm_lib",
"@io_istio_proxy//source/extensions/filters/http/alpn:config_lib",
"@io_istio_proxy//source/extensions/filters/http/authn:filter_lib",
"@io_istio_proxy//source/extensions/filters/http/istio_stats",
"@io_istio_proxy//source/extensions/filters/network/forward_downstream_sni:config_lib",
"@io_istio_proxy//source/extensions/filters/network/metadata_exchange:config_lib",
"@io_istio_proxy//source/extensions/filters/network/sni_verifier:config_lib",
"@io_istio_proxy//source/extensions/filters/network/tcp_cluster_rewrite:config_lib",
"@envoy//contrib/kafka/filters/network/source:kafka_broker_config_lib",
"@io_istio_proxy//src/envoy/http/baggage_handler:config_lib", # Experimental: Ambient
"@io_istio_proxy//src/envoy/metadata_to_peer_node:config_lib", # Experimental: Ambient
"@io_istio_proxy//src/envoy/set_internal_dst_address:filter_lib", # Experimental: Ambient
"@io_istio_proxy//src/envoy/tls_passthrough:filter_lib", # Experimental: Ambient
"@io_istio_proxy//src/envoy/workload_metadata:config_lib", # Experimental: Ambient
"@envoy//source/exe:envoy_main_entry_lib",
],
)
16 changes: 8 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
workspace(name = "meta_protocol_proxy")

# http_archive is not a native function since bazel 0.19
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_istio_proxy",
strip_prefix = "proxy-1.16.4",
sha256 = "a4d9c29bac3ecea5a1243c5506dee0595ca57987ed6170ef329b89735ccb3a18",
url = "https://github.com/istio/proxy/archive/refs/tags/1.16.4.tar.gz",
strip_prefix = "proxy-1.16.5",
sha256 = "9bef0f346d0b1c8bcca3df0b4a4ccd5f8ac3e3ba418f5045d78bdc8ba69c1080",
url = "https://github.com/istio/proxy/archive/refs/tags/1.16.5.tar.gz",
)

load(
Expand All @@ -46,12 +46,12 @@ bind(
# 2. Update .bazelversion, envoy.bazelrc and .bazelrc if needed.
#
# Note: this is needed by release builder to resolve envoy dep sha to tag.
# Commit date: 2022-08-18
ENVOY_SHA = "b07cce42ccaf39a37d2f1ac54995cc048d4db92d"
# Commit date: 2023-05-18
ENVOY_SHA = "c84fa029500b6f06b3dfde6c3ea492218a7c781d"

ENVOY_SHA256 = "3a449d355dc0cedfdacb83553bebf63f45b1e24f478fd8aa4de67d4ffa4c7de7"
ENVOY_SHA256 = "afaaa63de402e3aed76982c05094f88042be5822d5d5e0034b0e9c88b4d9b2fa"

ENVOY_ORG = "istio"
ENVOY_ORG = "envoyproxy"

ENVOY_REPO = "envoy"

Expand Down
2 changes: 1 addition & 1 deletion api/meta_protocol_proxy/v1alpha/meta_protocol_proxy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ message MetaProtocolProxy {

// The name of the application protocol built on top of meta protocol.
// This has been deprecated in favor of name in ApplicationProtocol.
string application_protocol = 2 [deprecated = true, (validate.rules).string = {min_len: 1}];
string application_protocol = 2 [deprecated = true];

oneof route_specifier {
option (validate.required) = true;
Expand Down
16 changes: 9 additions & 7 deletions bazel/extension_config/extensions_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ENVOY_EXTENSIONS = {
#

"envoy.bootstrap.wasm": "//source/extensions/bootstrap/wasm:config",
"envoy.bootstrap.internal_listener": "//source/extensions/bootstrap/internal_listener:config",

#
# Health checkers
Expand Down Expand Up @@ -81,7 +82,6 @@ ENVOY_EXTENSIONS = {
"envoy.filters.http.csrf": "//source/extensions/filters/http/csrf:config",
"envoy.filters.http.decompressor": "//source/extensions/filters/http/decompressor:config",
"envoy.filters.http.dynamic_forward_proxy": "//source/extensions/filters/http/dynamic_forward_proxy:config",
"envoy.filters.http.dynamo": "//contrib/dynamo/filters/http/source:config",
"envoy.filters.http.ext_authz": "//source/extensions/filters/http/ext_authz:config",
"envoy.filters.http.ext_proc": "//source/extensions/filters/http/ext_proc:config",
"envoy.filters.http.fault": "//source/extensions/filters/http/fault:config",
Expand Down Expand Up @@ -127,7 +127,6 @@ ENVOY_EXTENSIONS = {
# Network filters
#

"envoy.filters.network.client_ssl_auth": "//contrib/client_ssl_auth/filters/network/source:config",
"envoy.filters.network.connection_limit": "//source/extensions/filters/network/connection_limit:config",
"envoy.filters.network.direct_response": "//source/extensions/filters/network/direct_response:config",
"envoy.filters.network.dubbo_proxy": "//source/extensions/filters/network/dubbo_proxy:config",
Expand Down Expand Up @@ -184,18 +183,19 @@ ENVOY_EXTENSIONS = {
#

"envoy.tracers.dynamic_ot": "//source/extensions/tracers/dynamic_ot:config",
#"envoy.tracers.lightstep": "//source/extensions/tracers/lightstep:config",
"envoy.tracers.datadog": "//source/extensions/tracers/datadog:config",
"envoy.tracers.zipkin": "//source/extensions/tracers/zipkin:config",
"envoy.tracers.opencensus": "//source/extensions/tracers/opencensus:config",
"envoy.tracers.xray": "//source/extensions/tracers/xray:config",
"envoy.tracers.skywalking": "//source/extensions/tracers/skywalking:config",
"envoy.tracers.opentelemetry": "//source/extensions/tracers/opentelemetry:config",

#
# Transport sockets
#

"envoy.transport_sockets.alts": "//source/extensions/transport_sockets/alts:config",
"envoy.transport_sockets.internal_upstream": "//source/extensions/transport_sockets/internal_upstream:config",
"envoy.transport_sockets.upstream_proxy_protocol": "//source/extensions/transport_sockets/proxy_protocol:upstream_config",
"envoy.transport_sockets.raw_buffer": "//source/extensions/transport_sockets/raw_buffer:config",
"envoy.transport_sockets.tap": "//source/extensions/transport_sockets/tap:config",
Expand Down Expand Up @@ -274,7 +274,7 @@ ENVOY_EXTENSIONS = {
# HTTP header formatters
#

"envoy.http.stateful_header_formatters.preserve_case": "//source/extensions/http/header_formatters/preserve_case:preserve_case_formatter",
"envoy.http.stateful_header_formatters.preserve_case": "//source/extensions/http/header_formatters/preserve_case:config",

#
# Original IP detection
Expand Down Expand Up @@ -331,13 +331,15 @@ ENVOY_CONTRIB_EXTENSIONS = {
# HTTP filters
#

"envoy.filters.http.dynamo": "//contrib/dynamo/filters/http/dynamo:config",
"envoy.filters.http.squash": "//contrib/squash/filters/http/source:config",
"envoy.filters.http.sxg": "//contrib/sxg/filters/http/source:config",

#
# Network filters
#

"envoy.filters.network.client_ssl_auth": "//contrib/client_ssl_auth/filters/network/source:config",
"envoy.filters.network.kafka_broker": "//contrib/kafka/filters/network/source:kafka_broker_config_lib",
"envoy.filters.network.kafka_mesh": "//contrib/kafka/filters/network/source/mesh:config_lib",
"envoy.filters.network.mysql_proxy": "//contrib/mysql_proxy/filters/network/source:config",
Expand Down Expand Up @@ -365,19 +367,19 @@ ENVOY_CONTRIB_EXTENSIONS = {
}


ISTIO_DISABLED_EXTENSIONS = [
ISTIO_DISABLED_EXTENSIONS = [
# ISTIO disable tcp_stats by default because this plugin must be built and running on kernel >= 4.6
"envoy.transport_sockets.tcp_stats",
]

ISTIO_ENABLED_CONTRIB_EXTENSIONS = [
ISTIO_ENABLED_CONTRIB_EXTENSIONS = [
"envoy.filters.network.mysql_proxy",
"envoy.filters.network.sip_proxy",
"envoy.filters.sip.router",
"envoy.tls.key_providers.cryptomb",
]

EXTENSIONS = dict([(k,v) for k,v in ENVOY_EXTENSIONS.items() if not k in ISTIO_DISABLED_EXTENSIONS] +
EXTENSIONS = dict([(k,v) for k,v in ENVOY_EXTENSIONS.items() if not k in ISTIO_DISABLED_EXTENSIONS] +
[(k,v) for k, v in ENVOY_CONTRIB_EXTENSIONS.items() if k in ISTIO_ENABLED_CONTRIB_EXTENSIONS])


Expand Down
67 changes: 32 additions & 35 deletions bazel/get_workspace_status
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
#!/bin/bash

# This file was imported from https://github.com/bazelbuild/bazel at d6fec93.

# This script will be run bazel when building process starts to
# generate key-value information that represents the status of the
# workspace. The output should be like
#
# KEY1 VALUE1
# KEY2 VALUE2
# Copyright 2020 Istio Authors. All Rights Reserved.
#
# If the script exits with non-zero code, it's considered as a failure
# and the output will be discarded.

# For Envoy in particular, we want to force binaries to relink when the Git
# SHA changes (https://github.com/envoyproxy/envoy/issues/2551). This can be
# done by prefixing keys with "STABLE_". To avoid breaking compatibility with
# other status scripts, this one still echos the non-stable ("volatile") names.
# 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.
#
################################################################################

# If this SOURCE_VERSION file exists then it must have been placed here by a
# distribution doing a non-git, source build.
# Distributions would be expected to echo the commit/tag as BUILD_SCM_REVISION
if [ -f SOURCE_VERSION ]
then
echo "BUILD_SCM_REVISION $(cat SOURCE_VERSION)"
echo "STABLE_BUILD_SCM_REVISION $(cat SOURCE_VERSION)"
echo "BUILD_SCM_STATUS Distribution"
exit 0
if [ -z "${BUILD_SCM_REVISION}" ]; then
if git rev-parse --verify --quiet HEAD >/dev/null; then
BUILD_SCM_REVISION="$(git rev-parse --verify HEAD)"
else
exit 1
fi
fi

# The code below presents an implementation that works for git repository
git_rev=$(git rev-parse HEAD) || exit 1
echo "BUILD_SCM_REVISION ${git_rev}"
echo "STABLE_BUILD_SCM_REVISION ${git_rev}"
if [ -z "${BUILD_SCM_STATUS}" ]; then
if git diff-index --quiet HEAD; then
BUILD_SCM_STATUS="Clean"
else
BUILD_SCM_STATUS="Modified"
fi
fi

# Check whether there are any uncommitted changes
tree_status="Clean"
git diff-index --quiet HEAD -- || {
tree_status="Modified"
}
echo "BUILD_SCM_STATUS ${tree_status}"
echo "STABLE_BUILD_SCM_STATUS ${tree_status}"
echo "BUILD_SCM_REVISION ${BUILD_SCM_REVISION}"
echo "BUILD_SCM_STATUS ${BUILD_SCM_STATUS}"
echo "BUILD_CONFIG ${BUILD_CONFIG:-default}"
echo "DOCKER_REPOSITORY ${DOCKER_REPOSITORY:-istio-testing/envoy}"
echo "WASM_REPOSITORY ${WASM_REPOSITORY:-istio-testing/wasm}"
5 changes: 2 additions & 3 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ def istioapi_dependencies():
def docker_dependencies():
http_archive(
name = "io_bazel_rules_docker",
sha256 = "59d5b42ac315e7eadffa944e86e90c2990110a1c8075f1cd145f487e999d22b3",
strip_prefix = "rules_docker-0.17.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.17.0/rules_docker-v0.17.0.tar.gz"],
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"],
)
42 changes: 21 additions & 21 deletions bazel/setup_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ BAZELRC_FILE="${BAZELRC_FILE:-$(bazel info workspace)/clang.bazelrc}"
LLVM_PREFIX=$1

if [[ ! -e "${LLVM_PREFIX}/bin/llvm-config" ]]; then
echo "Error: cannot find llvm-config in ${LLVM_PREFIX}."
exit 1
fi
echo "Error: cannot find llvm-config in ${LLVM_PREFIX}."
exit 1
fi

PATH="$("${LLVM_PREFIX}"/bin/llvm-config --bindir):${PATH}"
export PATH
PATH="$("${LLVM_PREFIX}"/bin/llvm-config --bindir):${PATH}"
export PATH

RT_LIBRARY_PATH="$(dirname "$(find "$(llvm-config --libdir)" -name libclang_rt.ubsan_standalone_cxx-x86_64.a | head -1)")"
RT_LIBRARY_PATH="$(llvm-config --libdir)/clang/$(llvm-config --version)/lib/$(llvm-config --host-target)"

echo "# Generated file, do not edit. If you want to disable clang, just delete this file.
build:clang --action_env='PATH=${PATH}'
build:clang --action_env=CC=clang
build:clang --action_env=CXX=clang++
build:clang --action_env='LLVM_CONFIG=${LLVM_PREFIX}/bin/llvm-config'
build:clang --repo_env='LLVM_CONFIG=${LLVM_PREFIX}/bin/llvm-config'
build:clang --linkopt='-L$(llvm-config --libdir)'
build:clang --linkopt='-Wl,-rpath,$(llvm-config --libdir)'
echo "# Generated file, do not edit. If you want to disable clang, just delete this file.
build:clang --action_env='PATH=${PATH}'
build:clang --action_env=CC=clang
build:clang --action_env=CXX=clang++
build:clang --action_env='LLVM_CONFIG=${LLVM_PREFIX}/bin/llvm-config'
build:clang --repo_env='LLVM_CONFIG=${LLVM_PREFIX}/bin/llvm-config'
build:clang --linkopt='-L$(llvm-config --libdir)'
build:clang --linkopt='-Wl,-rpath,$(llvm-config --libdir)'
build:clang-asan --action_env=ENVOY_UBSAN_VPTR=1
build:clang-asan --copt=-fsanitize=vptr,function
build:clang-asan --linkopt=-fsanitize=vptr,function
build:clang-asan --linkopt='-L${RT_LIBRARY_PATH}'
build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone-x86_64.a
build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx-x86_64.a
" > "${BAZELRC_FILE}"
build:clang-asan --action_env=ENVOY_UBSAN_VPTR=1
build:clang-asan --copt=-fsanitize=vptr,function
build:clang-asan --linkopt=-fsanitize=vptr,function
build:clang-asan --linkopt='-L${RT_LIBRARY_PATH}'
build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone.a
build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx.a
" >"${BAZELRC_FILE}"

0 comments on commit b30da26

Please sign in to comment.