From b1cf9605c8ea719b430a5a802780639ab83b8a64 Mon Sep 17 00:00:00 2001 From: "carmel.levin" Date: Thu, 12 May 2022 10:16:46 +0300 Subject: [PATCH] Don't build unused 'tcp_stats' extension, which can't compile in centos7 --- api/BUILD | 3 ++- .../transport_sockets/tcp_stats/v3/tcp_stats.proto | 10 +++++++--- api/versioning/BUILD | 3 ++- source/extensions/extensions_build_config.bzl | 3 ++- source/extensions/extensions_metadata.yaml | 13 +++++++------ tools/code_format/check_format.py | 2 +- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/api/BUILD b/api/BUILD index a188155e05fc..e62b08fb9535 100644 --- a/api/BUILD +++ b/api/BUILD @@ -253,7 +253,8 @@ proto_library( "//envoy/extensions/transport_sockets/s2a/v3:pkg", "//envoy/extensions/transport_sockets/starttls/v3:pkg", "//envoy/extensions/transport_sockets/tap/v3:pkg", - "//envoy/extensions/transport_sockets/tcp_stats/v3:pkg", + # tcp_stats cannot be compiled in rhel7 due to old linux headers (tcp.h). + # "//envoy/extensions/transport_sockets/tcp_stats/v3:pkg", "//envoy/extensions/transport_sockets/tls/v3:pkg", "//envoy/extensions/upstreams/http/generic/v3:pkg", "//envoy/extensions/upstreams/http/http/v3:pkg", diff --git a/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto b/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto index 7428dacae8fe..f907a5655934 100644 --- a/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto +++ b/api/envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto @@ -1,6 +1,8 @@ syntax = "proto3"; -package envoy.extensions.transport_sockets.tcp_stats.v3; + +// tcp_stats cannot be compiled in rhel7 due to old linux headers (tcp.h). +// package envoy.extensions.transport_sockets.tcp_stats.v3; import "envoy/config/core/v3/base.proto"; @@ -9,10 +11,12 @@ import "google/protobuf/duration.proto"; import "udpa/annotations/status.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tcp_stats.v3"; +// tcp_stats cannot be compiled in rhel7 due to old linux headers (tcp.h). +// option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.tcp_stats.v3"; option java_outer_classname = "TcpStatsProto"; option java_multiple_files = true; -option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tcp_stats/v3;tcp_statsv3"; +// tcp_stats cannot be compiled in rhel7 due to old linux headers (tcp.h). +// option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tcp_stats/v3;tcp_statsv3"; option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#protodoc-title: TCP Stats Transport Socket wrapper] diff --git a/api/versioning/BUILD b/api/versioning/BUILD index ad1b8e817a1f..2041403013a9 100644 --- a/api/versioning/BUILD +++ b/api/versioning/BUILD @@ -193,7 +193,8 @@ proto_library( "//envoy/extensions/transport_sockets/s2a/v3:pkg", "//envoy/extensions/transport_sockets/starttls/v3:pkg", "//envoy/extensions/transport_sockets/tap/v3:pkg", - "//envoy/extensions/transport_sockets/tcp_stats/v3:pkg", + # tcp_stats cannot be compiled in rhel7 due to old linux headers (tcp.h). + # "//envoy/extensions/transport_sockets/tcp_stats/v3:pkg", "//envoy/extensions/transport_sockets/tls/v3:pkg", "//envoy/extensions/upstreams/http/generic/v3:pkg", "//envoy/extensions/upstreams/http/http/v3:pkg", diff --git a/source/extensions/extensions_build_config.bzl b/source/extensions/extensions_build_config.bzl index c8a7d1180731..bcf32faaf9c2 100644 --- a/source/extensions/extensions_build_config.bzl +++ b/source/extensions/extensions_build_config.bzl @@ -208,7 +208,8 @@ EXTENSIONS = { "envoy.transport_sockets.raw_buffer": "//source/extensions/transport_sockets/raw_buffer:config", "envoy.transport_sockets.tap": "//source/extensions/transport_sockets/tap:config", "envoy.transport_sockets.starttls": "//source/extensions/transport_sockets/starttls:config", - "envoy.transport_sockets.tcp_stats": "//source/extensions/transport_sockets/tcp_stats:config", + # tcp_stats cannot be compiled in rhel7 due to old linux headers (tcp.h). + # "envoy.transport_sockets.tcp_stats": "//source/extensions/transport_sockets/tcp_stats:config", # # Retry host predicates diff --git a/source/extensions/extensions_metadata.yaml b/source/extensions/extensions_metadata.yaml index 88e18cf83f62..69cbcb9ef764 100644 --- a/source/extensions/extensions_metadata.yaml +++ b/source/extensions/extensions_metadata.yaml @@ -673,12 +673,13 @@ envoy.transport_sockets.tap: - envoy.transport_sockets.upstream security_posture: requires_trusted_downstream_and_upstream status: alpha -envoy.transport_sockets.tcp_stats: - categories: - - envoy.transport_sockets.downstream - - envoy.transport_sockets.upstream - security_posture: robust_to_untrusted_downstream_and_upstream - status: alpha +# tcp_stats cannot be compiled in rhel7 due to old linux headers (tcp.h). +# envoy.transport_sockets.tcp_stats: +# categories: +# - envoy.transport_sockets.downstream +# - envoy.transport_sockets.upstream +# security_posture: robust_to_untrusted_downstream_and_upstream +# status: alpha envoy.transport_sockets.tls: categories: - envoy.transport_sockets.downstream diff --git a/tools/code_format/check_format.py b/tools/code_format/check_format.py index dc6365a8a8b4..07c7e2691113 100755 --- a/tools/code_format/check_format.py +++ b/tools/code_format/check_format.py @@ -75,7 +75,7 @@ # Histogram names which are allowed to be suffixed with the unit symbol, all of the pre-existing # ones were grandfathered as part of PR #8484 for backwards compatibility. HISTOGRAM_WITH_SI_SUFFIX_ALLOWLIST = ( - "cx_rtt_us", "cx_rtt_variance_us", "downstream_cx_length_ms", "downstream_cx_length_ms", + "downstream_cx_length_ms", "downstream_cx_length_ms", "initialization_time_ms", "loop_duration_us", "poll_delay_us", "request_time_ms", "upstream_cx_connect_ms", "upstream_cx_length_ms")