From e255e5ae6f613ee6a829e523b975cccae252ccad Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 00:12:32 +0000 Subject: [PATCH 01/39] deps: update abseil and cel-cpp Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 194 +++--------------- bazel/repository_locations.bzl | 12 +- .../filters/common/expr/evaluator.h | 11 + 3 files changed, 45 insertions(+), 172 deletions(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 15bf9dcd0729..76963d749b9c 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -1,168 +1,30 @@ -diff --git a/base/memory_manager.cc b/base/memory_manager.cc -index 1b7b355..4c7810c 100644 ---- a/base/memory_manager.cc -+++ b/base/memory_manager.cc -@@ -234,7 +234,7 @@ class GlobalMemoryManager final : public MemoryManager { - void* Allocate(size_t size, size_t align) override { - static_cast(size); - static_cast(align); -- ABSL_INTERNAL_UNREACHABLE; -+ ABSL_UNREACHABLE(); - return nullptr; +diff --git a/common/memory.h b/common/memory.h +index 35a766b..c32e039 100644 +--- a/common/memory.h ++++ b/common/memory.h +@@ -552,10 +552,10 @@ class PoolingMemoryManager { + ABSL_DCHECK(absl::has_single_bit(alignment)) + << "alignment must be a power of 2"; + if (ptr == nullptr) { +- ABSL_DCHECK_EQ(size, 0); ++ ABSL_DCHECK_EQ(size, size_t(0)); + return false; + } +- ABSL_DCHECK_GT(size, 0); ++ ABSL_DCHECK_GT(size, size_t(0)); + return DeallocateImpl(ptr, size, alignment); } -@@ -242,7 +242,7 @@ class GlobalMemoryManager final : public MemoryManager { - void OwnDestructor(void* pointer, void (*destructor)(void*)) override { - static_cast(pointer); - static_cast(destructor); -- ABSL_INTERNAL_UNREACHABLE; -+ ABSL_UNREACHABLE(); - } - }; - -diff --git a/eval/eval/evaluator_stack.h b/eval/eval/evaluator_stack.h -index 1ecab27..9df65d7 100644 ---- a/eval/eval/evaluator_stack.h -+++ b/eval/eval/evaluator_stack.h -@@ -5,6 +5,7 @@ - #include - #include - -+#include "absl/log/log.h" - #include "absl/types/span.h" - #include "eval/eval/attribute_trail.h" - #include "eval/public/cel_value.h" -diff --git a/eval/public/cel_expr_builder_factory.h b/eval/public/cel_expr_builder_factory.h -index 7321e29..0d0d5e6 100644 ---- a/eval/public/cel_expr_builder_factory.h -+++ b/eval/public/cel_expr_builder_factory.h -@@ -1,6 +1,7 @@ - #ifndef THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_EXPR_BUILDER_FACTORY_H_ - #define THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_EXPR_BUILDER_FACTORY_H_ - -+#include "absl/log/log.h" - #include "google/protobuf/descriptor.h" - #include "eval/public/cel_expression.h" - #include "eval/public/cel_options.h" -diff --git a/eval/public/cel_value.h b/eval/public/cel_value.h -index b2d13f8..73e1909 100644 ---- a/eval/public/cel_value.h -+++ b/eval/public/cel_value.h -@@ -25,7 +25,6 @@ - #include "absl/base/attributes.h" - #include "absl/base/macros.h" - #include "absl/base/optimization.h" --#include "absl/log/log.h" - #include "absl/status/status.h" - #include "absl/status/statusor.h" - #include "absl/strings/str_cat.h" -@@ -481,8 +480,8 @@ class CelValue { - } - - // Crashes with a null pointer error. -- static void CrashNullPointer(Type type) ABSL_ATTRIBUTE_COLD { -- LOG(FATAL) << "Null pointer supplied for " << TypeName(type); // Crash ok -+ static void CrashNullPointer(Type) ABSL_ATTRIBUTE_COLD { -+ ABSL_ASSERT(false); - } - - // Null pointer checker for pointer-based types. -@@ -493,11 +492,9 @@ class CelValue { - } - - // Crashes with a type mismatch error. -- static void CrashTypeMismatch(Type requested_type, -- Type actual_type) ABSL_ATTRIBUTE_COLD { -- LOG(FATAL) << "Type mismatch" // Crash ok -- << ": expected " << TypeName(requested_type) // Crash ok -- << ", encountered " << TypeName(actual_type); // Crash ok -+ static void CrashTypeMismatch(Type, -+ Type) ABSL_ATTRIBUTE_COLD { -+ ABSL_ASSERT(false); - } - - // Gets value of type specified -diff --git a/eval/public/portable_cel_expr_builder_factory.cc b/eval/public/portable_cel_expr_builder_factory.cc -index 80ac45c..7dceb93 100644 ---- a/eval/public/portable_cel_expr_builder_factory.cc -+++ b/eval/public/portable_cel_expr_builder_factory.cc -@@ -20,6 +20,7 @@ - #include - #include - -+#include "absl/log/log.h" - #include "absl/status/status.h" - #include "eval/compiler/flat_expr_builder.h" - #include "eval/public/cel_options.h" -diff --git a/eval/public/structs/BUILD b/eval/public/structs/BUILD -index 9187518..5151bb0 100644 ---- a/eval/public/structs/BUILD -+++ b/eval/public/structs/BUILD -@@ -192,7 +192,6 @@ cc_library( - hdrs = ["legacy_type_provider.h"], - deps = [ - ":legacy_type_adapter", -- "//base:type_provider", - "@com_google_absl//absl/types:optional", - ], - ) -diff --git a/eval/public/structs/field_access_impl.cc b/eval/public/structs/field_access_impl.cc -index 788a476..e4b70b3 100644 ---- a/eval/public/structs/field_access_impl.cc -+++ b/eval/public/structs/field_access_impl.cc -@@ -25,6 +25,7 @@ - #include "google/protobuf/arena.h" - #include "google/protobuf/map_field.h" - #include "absl/container/flat_hash_set.h" -+#include "absl/log/log.h" - #include "absl/status/status.h" - #include "absl/status/statusor.h" - #include "absl/strings/str_cat.h" -diff --git a/eval/public/structs/legacy_type_provider.h b/eval/public/structs/legacy_type_provider.h -index b1623fc..d3d88d6 100644 ---- a/eval/public/structs/legacy_type_provider.h -+++ b/eval/public/structs/legacy_type_provider.h -@@ -16,7 +16,6 @@ - #define THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_STRUCTS_TYPE_PROVIDER_H_ - - #include "absl/types/optional.h" --#include "base/type_provider.h" - #include "eval/public/structs/legacy_type_adapter.h" - - namespace google::api::expr::runtime { -@@ -25,8 +24,10 @@ namespace google::api::expr::runtime { - // - // Note: This API is not finalized. Consult the CEL team before introducing new - // implementations. --class LegacyTypeProvider : public cel::TypeProvider { -+class LegacyTypeProvider { - public: -+ virtual ~LegacyTypeProvider() = default; -+ - // Return LegacyTypeAdapter for the fully qualified type name if available. - // - // nullopt values are interpreted as not present. -@@ -45,7 +46,7 @@ class LegacyTypeProvider : public cel::TypeProvider { - // created ones, the TypeInfoApis returned from this method should be the same - // as the ones used in value creation. - virtual absl::optional ProvideLegacyTypeInfo( -- absl::string_view name) const { -+ absl::string_view) const { - return absl::nullopt; - } - }; -diff --git a/base/function_result.h b/base/function_result.h -index 9bc2d67..bf6110c 100644 ---- a/base/function_result.h -+++ b/base/function_result.h -@@ -26,7 +26,10 @@ namespace cel { - // allows for lazy evaluation of expensive functions. - class FunctionResult final { - public: -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wdefaulted-function-deleted" - FunctionResult() = default; -+#pragma GCC diagnostic pop - FunctionResult(const FunctionResult&) = default; - FunctionResult(FunctionResult&&) = default; - FunctionResult& operator=(const FunctionResult&) = default; +diff --git a/common/native_type.h b/common/native_type.h +index b965411..94750f6 100644 +--- a/common/native_type.h ++++ b/common/native_type.h +@@ -96,7 +96,7 @@ class ABSL_ATTRIBUTE_TRIVIAL_ABI NativeTypeId final { + std::negation>>, + std::is_final>>, + NativeTypeId> +- Of(const T& type) noexcept { ++ Of(const T&) noexcept { + static_assert(!std::is_pointer_v); + static_assert(std::is_same_v>); + static_assert(!std::is_same_v>); diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 7c4d5ca49dfb..15fb39bef888 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -162,12 +162,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Abseil", project_desc = "Open source collection of C++ libraries drawn from the most fundamental pieces of Google’s internal codebase", project_url = "https://abseil.io/", - version = "c8b33b0191a2db8364cacf94b267ea8a3f20ad83", - sha256 = "a7803eac00bf68eae1a84ee3b9fcf0c1173e8d9b89b2cee92c7b487ea65be2a9", + version = "1adf896ec842bd9788a1bbede94a33e1402b8ecb", + sha256 = "a35f2f93ed0365f6ddd33b99ead6475854547ecf1a0d8a5e8397d7d9d692b280", strip_prefix = "abseil-cpp-{version}", urls = ["https://github.com/abseil/abseil-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_core", "controlplane"], - release_date = "2023-05-16", + release_date = "2023-07-11", cpe = "N/A", license = "Apache-2.0", license_url = "https://github.com/abseil/abseil-cpp/blob/{version}/LICENSE", @@ -1201,8 +1201,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Common Expression Language (CEL) C++ library", project_desc = "Common Expression Language (CEL) C++ library", project_url = "https://opensource.google/projects/cel", - version = "da0aba702f44a41ec6d2eb4bbf6a9f01efc2746d", - sha256 = "d62b93fd07c6151749e83855157f3f2778d62c168318f9c40dfcfe1c336c496f", + version = "e14d338d0f1bc64e54c4275ac5034fe5dedba969", + sha256 = "a0fcf8126d4fb8e0e00be79e626cac741e40b4dcef7d549e99f7a7ef6d7c5443", strip_prefix = "cel-cpp-{version}", urls = ["https://github.com/google/cel-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], @@ -1222,7 +1222,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( "envoy.matching.inputs.cel_data_input", "envoy.matching.matchers.cel_matcher", ], - release_date = "2023-03-08", + release_date = "2023-12-19", cpe = "N/A", ), com_github_google_flatbuffers = dict( diff --git a/source/extensions/filters/common/expr/evaluator.h b/source/extensions/filters/common/expr/evaluator.h index e250469298fe..8e243b40592d 100644 --- a/source/extensions/filters/common/expr/evaluator.h +++ b/source/extensions/filters/common/expr/evaluator.h @@ -6,10 +6,21 @@ #include "source/common/protobuf/protobuf.h" #include "source/extensions/filters/common/expr/context.h" +// CEL-CPP does not enforce unused parameter checks consistently, so we relax it here. + +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + #include "eval/public/activation.h" #include "eval/public/cel_expression.h" #include "eval/public/cel_value.h" +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + namespace Envoy { namespace Extensions { namespace Filters { From e40a25f7fa7aea3bb36728ee113cc66a661b9135 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 00:51:52 +0000 Subject: [PATCH 02/39] try to fix Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 76963d749b9c..d52da5ef174d 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -1,3 +1,21 @@ +diff --git a/base/internal/value.h b/base/internal/value.h +index fb3e845..a08a5f7 100644 +--- a/base/internal/value.h ++++ b/base/internal/value.h +@@ -55,13 +55,9 @@ NativeTypeId GetListValueTypeId(const ListValue& list_value); + + NativeTypeId GetMapValueTypeId(const MapValue& map_value); + +-static_assert(std::is_trivially_copyable_v, +- "absl::Duration must be trivially copyable."); + static_assert(std::is_trivially_destructible_v, + "absl::Duration must be trivially destructible."); + +-static_assert(std::is_trivially_copyable_v, +- "absl::Time must be trivially copyable."); + static_assert(std::is_trivially_destructible_v, + "absl::Time must be trivially destructible."); + diff --git a/common/memory.h b/common/memory.h index 35a766b..c32e039 100644 --- a/common/memory.h From 1403f2315e7fcc5e64bc58c91239670d9e3cc08f Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 01:02:05 +0000 Subject: [PATCH 03/39] more assertions Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index d52da5ef174d..bc9702968655 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -16,6 +16,19 @@ index fb3e845..a08a5f7 100644 static_assert(std::is_trivially_destructible_v, "absl::Time must be trivially destructible."); +diff --git a/base/value.h b/base/value.h +index 5d94d5e..d53370c 100644 +--- a/base/value.h ++++ b/base/value.h +@@ -336,8 +336,6 @@ CEL_INTERNAL_VALUE_DECL(Value); + } // namespace cel + + #define CEL_INTERNAL_SIMPLE_VALUE_STANDALONES(value_class) \ +- static_assert(std::is_trivially_copyable_v, \ +- #value_class " must be trivially copyable"); \ + static_assert(std::is_trivially_destructible_v, \ + #value_class " must be trivially destructible"); \ + \ diff --git a/common/memory.h b/common/memory.h index 35a766b..c32e039 100644 --- a/common/memory.h From aba69b018377a230013e31502f0dc6d5b9215c62 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 05:31:28 +0000 Subject: [PATCH 04/39] use version abseil Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 12 ++++++++++++ bazel/repository_locations.bzl | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index bc9702968655..b2ae5db76ac7 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -59,3 +59,15 @@ index b965411..94750f6 100644 static_assert(!std::is_pointer_v); static_assert(std::is_same_v>); static_assert(!std::is_same_v>); +diff --git a/tools/flatbuffers_backed_impl.h b/tools/flatbuffers_backed_impl.h +index e9ea9f2..d75129d 100644 +--- a/tools/flatbuffers_backed_impl.h ++++ b/tools/flatbuffers_backed_impl.h +@@ -24,6 +24,7 @@ class FlatBuffersMapImpl : public CelMap { + + absl::optional operator[](CelValue cel_key) const override; + ++ using CelMap::ListKeys; + absl::StatusOr ListKeys() const override { return &keys_; } + + private: diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 15fb39bef888..4f72ab7884b0 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -162,12 +162,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Abseil", project_desc = "Open source collection of C++ libraries drawn from the most fundamental pieces of Google’s internal codebase", project_url = "https://abseil.io/", - version = "1adf896ec842bd9788a1bbede94a33e1402b8ecb", - sha256 = "a35f2f93ed0365f6ddd33b99ead6475854547ecf1a0d8a5e8397d7d9d692b280", + version = "20230802.1", + sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", strip_prefix = "abseil-cpp-{version}", urls = ["https://github.com/abseil/abseil-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_core", "controlplane"], - release_date = "2023-07-11", + release_date = "2023-09-18", cpe = "N/A", license = "Apache-2.0", license_url = "https://github.com/abseil/abseil-cpp/blob/{version}/LICENSE", From 52f0c85cede5a6f9215d7ac36c7c7cbe111ce0ad Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 18:22:36 +0000 Subject: [PATCH 05/39] rollback one abseil release Signed-off-by: Kuat Yessenov --- bazel/repository_locations.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 4f72ab7884b0..32cd4994c98e 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -162,12 +162,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Abseil", project_desc = "Open source collection of C++ libraries drawn from the most fundamental pieces of Google’s internal codebase", project_url = "https://abseil.io/", - version = "20230802.1", - sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", + version = "20230802.0", + sha256 = "59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5", strip_prefix = "abseil-cpp-{version}", urls = ["https://github.com/abseil/abseil-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_core", "controlplane"], - release_date = "2023-09-18", + release_date = "2023-08-07", cpe = "N/A", license = "Apache-2.0", license_url = "https://github.com/abseil/abseil-cpp/blob/{version}/LICENSE", From 483540eb4a4a9337df40981868be1c8684ab4017 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 19:44:14 +0000 Subject: [PATCH 06/39] silence cel cpp Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 42 ---------------------------------- bazel/repository_locations.bzl | 4 ++-- 2 files changed, 2 insertions(+), 44 deletions(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index b2ae5db76ac7..656a7c749b99 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -29,45 +29,3 @@ index 5d94d5e..d53370c 100644 static_assert(std::is_trivially_destructible_v, \ #value_class " must be trivially destructible"); \ \ -diff --git a/common/memory.h b/common/memory.h -index 35a766b..c32e039 100644 ---- a/common/memory.h -+++ b/common/memory.h -@@ -552,10 +552,10 @@ class PoolingMemoryManager { - ABSL_DCHECK(absl::has_single_bit(alignment)) - << "alignment must be a power of 2"; - if (ptr == nullptr) { -- ABSL_DCHECK_EQ(size, 0); -+ ABSL_DCHECK_EQ(size, size_t(0)); - return false; - } -- ABSL_DCHECK_GT(size, 0); -+ ABSL_DCHECK_GT(size, size_t(0)); - return DeallocateImpl(ptr, size, alignment); - } - -diff --git a/common/native_type.h b/common/native_type.h -index b965411..94750f6 100644 ---- a/common/native_type.h -+++ b/common/native_type.h -@@ -96,7 +96,7 @@ class ABSL_ATTRIBUTE_TRIVIAL_ABI NativeTypeId final { - std::negation>>, - std::is_final>>, - NativeTypeId> -- Of(const T& type) noexcept { -+ Of(const T&) noexcept { - static_assert(!std::is_pointer_v); - static_assert(std::is_same_v>); - static_assert(!std::is_same_v>); -diff --git a/tools/flatbuffers_backed_impl.h b/tools/flatbuffers_backed_impl.h -index e9ea9f2..d75129d 100644 ---- a/tools/flatbuffers_backed_impl.h -+++ b/tools/flatbuffers_backed_impl.h -@@ -24,6 +24,7 @@ class FlatBuffersMapImpl : public CelMap { - - absl::optional operator[](CelValue cel_key) const override; - -+ using CelMap::ListKeys; - absl::StatusOr ListKeys() const override { return &keys_; } - - private: diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 32cd4994c98e..6fbcc01babc9 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -1201,8 +1201,8 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Common Expression Language (CEL) C++ library", project_desc = "Common Expression Language (CEL) C++ library", project_url = "https://opensource.google/projects/cel", - version = "e14d338d0f1bc64e54c4275ac5034fe5dedba969", - sha256 = "a0fcf8126d4fb8e0e00be79e626cac741e40b4dcef7d549e99f7a7ef6d7c5443", + version = "0abd738f9f54388452e6ebb0955eb039f9162b3d", + sha256 = "d163805320a782c5194b7496cdd5e8c9d9604eeffc1e531770cf6b130bc182fd", strip_prefix = "cel-cpp-{version}", urls = ["https://github.com/google/cel-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_ext"], From 989d91b6cdaa2202952fe14186896a3de622ccec Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 19:55:24 +0000 Subject: [PATCH 07/39] fix date Signed-off-by: Kuat Yessenov --- bazel/repository_locations.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 6fbcc01babc9..67429c39ea29 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -1222,7 +1222,7 @@ REPOSITORY_LOCATIONS_SPEC = dict( "envoy.matching.inputs.cel_data_input", "envoy.matching.matchers.cel_matcher", ], - release_date = "2023-12-19", + release_date = "2023-12-20", cpe = "N/A", ), com_github_google_flatbuffers = dict( From 271bc8d45e7277dbce3a6e75c698f9172d55ec35 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 21:58:36 +0000 Subject: [PATCH 08/39] fix gcc Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 656a7c749b99..d6897b34b358 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -29,3 +29,15 @@ index 5d94d5e..d53370c 100644 static_assert(std::is_trivially_destructible_v, \ #value_class " must be trivially destructible"); \ \ +diff --git a/tools/flatbuffers_backed_impl.cc b/tools/flatbuffers_backed_impl.cc +index 10c0b1c..45ba72f 100644 +--- a/tools/flatbuffers_backed_impl.cc ++++ b/tools/flatbuffers_backed_impl.cc +@@ -130,6 +130,7 @@ class ObjectStringIndexedMapImpl : public CelMap { + return absl::nullopt; + } + ++ using CelMap::ListKeys; + absl::StatusOr ListKeys() const override { return &keys_; } + + private: From 0b9642a43adf4718686b4de3a651c41884e846f5 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 22:32:54 +0000 Subject: [PATCH 09/39] patch more Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 50 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index d6897b34b358..2790da500a55 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -29,6 +29,56 @@ index 5d94d5e..d53370c 100644 static_assert(std::is_trivially_destructible_v, \ #value_class " must be trivially destructible"); \ \ +diff --git a/internal/strings.cc b/internal/strings.cc +index dc5a118..24457ab 100644 +--- a/internal/strings.cc ++++ b/internal/strings.cc +@@ -53,12 +53,12 @@ bool CheckForClosingString(absl::string_view source, + if (closing_str.empty()) return true; + + const char* p = source.data(); +- const char* end = source.end(); ++ const char* end = p + source.size(); + + bool is_closed = false; + while (p + closing_str.length() <= end) { + if (*p != '\\') { +- size_t cur_pos = p - source.begin(); ++ size_t cur_pos = p - source.data(); + bool is_closing = + absl::StartsWith(absl::ClippedSubstr(source, cur_pos), closing_str); + if (is_closing && p + closing_str.length() < end) { +@@ -132,7 +132,7 @@ bool UnescapeInternal(absl::string_view source, absl::string_view closing_str, + dest->reserve(source.size()); + + const char* p = source.data(); +- const char* end = source.end(); ++ const char* end = p + source.size(); + const char* last_byte = end - 1; + + while (p < end) { +@@ -446,7 +446,9 @@ std::string EscapeInternal(absl::string_view src, bool escape_all_bytes, + // byte. + dest.reserve(src.size() * 4); + bool last_hex_escape = false; // true if last output char was \xNN. +- for (const char* p = src.begin(); p < src.end(); ++p) { ++ const char* p = src.data(); ++ const char* end = p + src.size(); ++ for (; p < end; ++p) { + unsigned char c = static_cast(*p); + bool is_hex_escape = false; + switch (c) { +@@ -552,7 +554,9 @@ std::string EscapeString(absl::string_view str) { + std::string EscapeBytes(absl::string_view str, bool escape_all_bytes, + char escape_quote_char) { + std::string escaped_bytes; +- for (const char* p = str.begin(); p < str.end(); ++p) { ++ const char* p = str.data(); ++ const char* end = p + str.size(); ++ for (; p < end; ++p) { + unsigned char c = *p; + if (escape_all_bytes || !absl::ascii_isprint(c)) { + escaped_bytes += "\\x"; diff --git a/tools/flatbuffers_backed_impl.cc b/tools/flatbuffers_backed_impl.cc index 10c0b1c..45ba72f 100644 --- a/tools/flatbuffers_backed_impl.cc From 4254668c07e7d98e189adaf1d5bd18989bc3fc41 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 20 Dec 2023 22:52:21 +0000 Subject: [PATCH 10/39] relax more assertions Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 2790da500a55..2b8653e85bbf 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -16,6 +16,20 @@ index fb3e845..a08a5f7 100644 static_assert(std::is_trivially_destructible_v, "absl::Time must be trivially destructible."); +diff --git a/base/memory.h b/base/memory.h +index 3552e19..bd2bd9b 100644 +--- a/base/memory.h ++++ b/base/memory.h +@@ -164,7 +164,8 @@ std::enable_if_t, Handle> HandleFactory::Make( + MemoryManagerRef memory_manager, Args&&... args) { + static_assert(std::is_base_of_v, "F is not derived from T"); + #if defined(__cpp_lib_is_pointer_interconvertible) && \ +- __cpp_lib_is_pointer_interconvertible >= 201907L ++ __cpp_lib_is_pointer_interconvertible >= 201907L && \ ++ !defined(WIN32) + // Only available in C++20. + static_assert(std::is_pointer_interconvertible_base_of_v, + "F must be pointer interconvertible to Data"); diff --git a/base/value.h b/base/value.h index 5d94d5e..d53370c 100644 --- a/base/value.h From fa574649ba8950ee4f8d6b65eda6db9faa789b7e Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 00:18:32 +0000 Subject: [PATCH 11/39] relax inline size Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 2b8653e85bbf..4f6d5bf31f46 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -1,5 +1,5 @@ diff --git a/base/internal/value.h b/base/internal/value.h -index fb3e845..a08a5f7 100644 +index fb3e845..62962c7 100644 --- a/base/internal/value.h +++ b/base/internal/value.h @@ -55,13 +55,9 @@ NativeTypeId GetListValueTypeId(const ListValue& list_value); @@ -16,6 +16,18 @@ index fb3e845..a08a5f7 100644 static_assert(std::is_trivially_destructible_v, "absl::Time must be trivially destructible."); +@@ -102,7 +98,11 @@ static_assert(kValueInlineSize <= 32, + static_assert(kValueInlineAlign <= alignof(std::max_align_t), + "Alignment of an inline value should not be overaligned."); + ++#ifdef WIN32 ++using AnyValue = AnyData<64, kValueInlineAlign>; ++#else + using AnyValue = AnyData; ++#endif + + // Metaprogramming utility for interacting with Value. + // diff --git a/base/memory.h b/base/memory.h index 3552e19..bd2bd9b 100644 --- a/base/memory.h From ff9c48e75ad6e16a64817efa3931b3b422b49b44 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 00:36:45 +0000 Subject: [PATCH 12/39] try again Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 14 ++++++++------ source/extensions/filters/common/expr/context.cc | 1 + source/extensions/filters/common/expr/context.h | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 4f6d5bf31f46..41635c0ff1a9 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -29,19 +29,21 @@ index fb3e845..62962c7 100644 // Metaprogramming utility for interacting with Value. // diff --git a/base/memory.h b/base/memory.h -index 3552e19..bd2bd9b 100644 +index 3552e19..492966d 100644 --- a/base/memory.h +++ b/base/memory.h -@@ -164,7 +164,8 @@ std::enable_if_t, Handle> HandleFactory::Make( - MemoryManagerRef memory_manager, Args&&... args) { +@@ -165,9 +165,11 @@ std::enable_if_t, Handle> HandleFactory::Make( static_assert(std::is_base_of_v, "F is not derived from T"); #if defined(__cpp_lib_is_pointer_interconvertible) && \ -- __cpp_lib_is_pointer_interconvertible >= 201907L -+ __cpp_lib_is_pointer_interconvertible >= 201907L && \ -+ !defined(WIN32) + __cpp_lib_is_pointer_interconvertible >= 201907L ++#ifndef WIN32 // Only available in C++20. static_assert(std::is_pointer_interconvertible_base_of_v, "F must be pointer interconvertible to Data"); ++#endif + #endif + if (memory_manager.memory_management() == MemoryManagement::kPooling) { + void* addr; diff --git a/base/value.h b/base/value.h index 5d94d5e..d53370c 100644 --- a/base/value.h diff --git a/source/extensions/filters/common/expr/context.cc b/source/extensions/filters/common/expr/context.cc index a609e8be884a..a84fe1e4cf47 100644 --- a/source/extensions/filters/common/expr/context.cc +++ b/source/extensions/filters/common/expr/context.cc @@ -303,6 +303,7 @@ class FilterStateObjectWrapper : public google::api::expr::runtime::CelMap { // Default stubs. int size() const override { return 0; } bool empty() const override { return true; } + using CelMap::ListKeys; absl::StatusOr ListKeys() const override { return &WrapperFields::get().Empty; } diff --git a/source/extensions/filters/common/expr/context.h b/source/extensions/filters/common/expr/context.h index ff1f127373cf..1e928fd78b02 100644 --- a/source/extensions/filters/common/expr/context.h +++ b/source/extensions/filters/common/expr/context.h @@ -158,6 +158,7 @@ class BaseWrapper : public google::api::expr::runtime::CelMap { public: BaseWrapper(Protobuf::Arena& arena) : arena_(arena) {} int size() const override { return 0; } + using CelMap::ListKeys; absl::StatusOr ListKeys() const override { return absl::UnimplementedError("ListKeys() is not implemented"); } From 7a5477b9549a3e6b4827369c66b25fa137d98862 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 00:55:59 +0000 Subject: [PATCH 13/39] try again Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 41635c0ff1a9..92dfe66f00c9 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -1,5 +1,5 @@ diff --git a/base/internal/value.h b/base/internal/value.h -index fb3e845..62962c7 100644 +index fb3e845..b527e98 100644 --- a/base/internal/value.h +++ b/base/internal/value.h @@ -55,13 +55,9 @@ NativeTypeId GetListValueTypeId(const ListValue& list_value); @@ -20,7 +20,7 @@ index fb3e845..62962c7 100644 static_assert(kValueInlineAlign <= alignof(std::max_align_t), "Alignment of an inline value should not be overaligned."); -+#ifdef WIN32 ++#ifdef _MSC_VER +using AnyValue = AnyData<64, kValueInlineAlign>; +#else using AnyValue = AnyData; @@ -29,14 +29,14 @@ index fb3e845..62962c7 100644 // Metaprogramming utility for interacting with Value. // diff --git a/base/memory.h b/base/memory.h -index 3552e19..492966d 100644 +index 3552e19..47ca57e 100644 --- a/base/memory.h +++ b/base/memory.h @@ -165,9 +165,11 @@ std::enable_if_t, Handle> HandleFactory::Make( static_assert(std::is_base_of_v, "F is not derived from T"); #if defined(__cpp_lib_is_pointer_interconvertible) && \ __cpp_lib_is_pointer_interconvertible >= 201907L -+#ifndef WIN32 ++#ifndef _MSC_VER // Only available in C++20. static_assert(std::is_pointer_interconvertible_base_of_v, "F must be pointer interconvertible to Data"); From 110df4e24c552f0b4cb743bc757dce0e61843793 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 01:38:15 +0000 Subject: [PATCH 14/39] fix Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 92dfe66f00c9..40d82d9c3075 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -57,6 +57,19 @@ index 5d94d5e..d53370c 100644 static_assert(std::is_trivially_destructible_v, \ #value_class " must be trivially destructible"); \ \ +diff --git a/eval/public/cel_value.cc b/eval/public/cel_value.cc +index 6aeff6d..c43864c 100644 +--- a/eval/public/cel_value.cc ++++ b/eval/public/cel_value.cc +@@ -107,7 +107,7 @@ struct DebugStringVisitor { + + } // namespace + +-const absl::string_view kPayloadUrlMissingAttributePath = ++ABSL_CONST_INIT const absl::string_view kPayloadUrlMissingAttributePath = + cel::runtime_internal::kPayloadUrlMissingAttributePath; + + CelValue CelValue::CreateDuration(absl::Duration value) { diff --git a/internal/strings.cc b/internal/strings.cc index dc5a118..24457ab 100644 --- a/internal/strings.cc From b0da121187c57541e16cd8f335228482a534cc64 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 05:30:14 +0000 Subject: [PATCH 15/39] more fixes Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 14 ++++++++++++-- source/extensions/filters/common/expr/context.h | 1 + test/extensions/common/wasm/context_test.cc | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 40d82d9c3075..053f10c3228d 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -1,5 +1,5 @@ diff --git a/base/internal/value.h b/base/internal/value.h -index fb3e845..b527e98 100644 +index fb3e845..375dec8 100644 --- a/base/internal/value.h +++ b/base/internal/value.h @@ -55,13 +55,9 @@ NativeTypeId GetListValueTypeId(const ListValue& list_value); @@ -16,7 +16,17 @@ index fb3e845..b527e98 100644 static_assert(std::is_trivially_destructible_v, "absl::Time must be trivially destructible."); -@@ -102,7 +98,11 @@ static_assert(kValueInlineSize <= 32, +@@ -92,6 +88,9 @@ struct InlineValue final { + int64_t number; + } enum_value; + }; ++#ifdef _MSC_VER ++ ~InlineValue() = delete; ++#endif + }; + + inline constexpr size_t kValueInlineSize = sizeof(InlineValue); +@@ -102,7 +101,11 @@ static_assert(kValueInlineSize <= 32, static_assert(kValueInlineAlign <= alignof(std::max_align_t), "Alignment of an inline value should not be overaligned."); diff --git a/source/extensions/filters/common/expr/context.h b/source/extensions/filters/common/expr/context.h index 1e928fd78b02..b397a6e35868 100644 --- a/source/extensions/filters/common/expr/context.h +++ b/source/extensions/filters/common/expr/context.h @@ -125,6 +125,7 @@ template class HeadersWrapper : public google::api::expr::runtime::Cel } int size() const override { return ListKeys().value()->size(); } bool empty() const override { return value_ == nullptr ? true : value_->empty(); } + using CelMap::ListKeys; absl::StatusOr ListKeys() const override { if (value_ == nullptr) { return &WrapperFields::get().Empty; diff --git a/test/extensions/common/wasm/context_test.cc b/test/extensions/common/wasm/context_test.cc index 2ca56d9c1b69..5e91cc99d03a 100644 --- a/test/extensions/common/wasm/context_test.cc +++ b/test/extensions/common/wasm/context_test.cc @@ -51,6 +51,7 @@ class MockCelMap : public CelMap { return MockIndexOperator(index); } MOCK_METHOD(absl::optional, MockIndexOperator, (CelValue), (const)); + using CelMap::ListKeys; MOCK_METHOD(absl::StatusOr, ListKeys, (), (const, override)); MOCK_METHOD(int, size, (), (const, override)); }; From baf7a2fd047fcdd2bfdb6265ce7ce011730fe23c Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 06:05:51 +0000 Subject: [PATCH 16/39] again Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 053f10c3228d..5a85bff1560c 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -67,6 +67,26 @@ index 5d94d5e..d53370c 100644 static_assert(std::is_trivially_destructible_v, \ #value_class " must be trivially destructible"); \ \ +diff --git a/eval/internal/interop.cc b/eval/internal/interop.cc +index 3acde6c..62e8c68 100644 +--- a/eval/internal/interop.cc ++++ b/eval/internal/interop.cc +@@ -729,6 +729,7 @@ absl::StatusOr ToLegacyValue(google::protobuf::Arena* arena, + return CelValue::CreateMessageWrapper( + MessageWrapperAccess::Make(message, type_info)); + } ++#ifndef _MSC_VER + if (ProtoStructValueToMessageWrapper) { + auto maybe_message_wrapper = ProtoStructValueToMessageWrapper(*value); + if (maybe_message_wrapper.has_value()) { +@@ -736,6 +737,7 @@ absl::StatusOr ToLegacyValue(google::protobuf::Arena* arena, + std::move(maybe_message_wrapper).value()); + } + } ++#endif + return absl::UnimplementedError( + "only legacy struct types and values can be used for interop"); + } diff --git a/eval/public/cel_value.cc b/eval/public/cel_value.cc index 6aeff6d..c43864c 100644 --- a/eval/public/cel_value.cc From 91f35644fce19e0436de85f3d7496dda9628418a Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 19:23:11 +0000 Subject: [PATCH 17/39] again Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 4 ++-- bazel/repository_locations.bzl | 6 +++--- source/extensions/common/wasm/context.cc | 11 +++++++++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 5a85bff1560c..b9c08dd494a0 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -68,14 +68,14 @@ index 5d94d5e..d53370c 100644 #value_class " must be trivially destructible"); \ \ diff --git a/eval/internal/interop.cc b/eval/internal/interop.cc -index 3acde6c..62e8c68 100644 +index 3acde6c..2124f98 100644 --- a/eval/internal/interop.cc +++ b/eval/internal/interop.cc @@ -729,6 +729,7 @@ absl::StatusOr ToLegacyValue(google::protobuf::Arena* arena, return CelValue::CreateMessageWrapper( MessageWrapperAccess::Make(message, type_info)); } -+#ifndef _MSC_VER ++#if ABSL_HAVE_ATTRIBUTE_WEAK if (ProtoStructValueToMessageWrapper) { auto maybe_message_wrapper = ProtoStructValueToMessageWrapper(*value); if (maybe_message_wrapper.has_value()) { diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl index 67429c39ea29..547cb376e01b 100644 --- a/bazel/repository_locations.bzl +++ b/bazel/repository_locations.bzl @@ -162,12 +162,12 @@ REPOSITORY_LOCATIONS_SPEC = dict( project_name = "Abseil", project_desc = "Open source collection of C++ libraries drawn from the most fundamental pieces of Google’s internal codebase", project_url = "https://abseil.io/", - version = "20230802.0", - sha256 = "59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5", + version = "20230802.1", + sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", strip_prefix = "abseil-cpp-{version}", urls = ["https://github.com/abseil/abseil-cpp/archive/{version}.tar.gz"], use_category = ["dataplane_core", "controlplane"], - release_date = "2023-08-07", + release_date = "2023-09-18", cpe = "N/A", license = "Apache-2.0", license_url = "https://github.com/abseil/abseil-cpp/blob/{version}/LICENSE", diff --git a/source/extensions/common/wasm/context.cc b/source/extensions/common/wasm/context.cc index 57c0c24146b9..8d698c80b046 100644 --- a/source/extensions/common/wasm/context.cc +++ b/source/extensions/common/wasm/context.cc @@ -36,11 +36,22 @@ #include "absl/container/node_hash_map.h" #include "absl/strings/str_cat.h" #include "absl/synchronization/mutex.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif + #include "eval/public/cel_value.h" #include "eval/public/containers/field_access.h" #include "eval/public/containers/field_backed_list_impl.h" #include "eval/public/containers/field_backed_map_impl.h" #include "eval/public/structs/cel_proto_wrapper.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + #include "include/proxy-wasm/pairs_util.h" #include "openssl/bytestring.h" #include "openssl/hmac.h" From 01bcac5b933acedf8cd17eff63564a4e00818597 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 20:25:45 +0000 Subject: [PATCH 18/39] extern weak Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 113 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 1 deletion(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index b9c08dd494a0..8be21e02ad64 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -54,6 +54,21 @@ index 3552e19..47ca57e 100644 #endif if (memory_manager.memory_management() == MemoryManagement::kPooling) { void* addr; +diff --git a/base/types/struct_type.h b/base/types/struct_type.h +index 68d2617..95701e1 100644 +--- a/base/types/struct_type.h ++++ b/base/types/struct_type.h +@@ -229,8 +229,8 @@ namespace base_internal { + // heap allocations during interop. So we have an inline variant and heap + // variant. + +-ABSL_ATTRIBUTE_WEAK absl::string_view MessageTypeName(uintptr_t msg); +-ABSL_ATTRIBUTE_WEAK size_t MessageTypeFieldCount(uintptr_t msg); ++extern ABSL_ATTRIBUTE_WEAK absl::string_view MessageTypeName(uintptr_t msg); ++extern ABSL_ATTRIBUTE_WEAK size_t MessageTypeFieldCount(uintptr_t msg); + + class LegacyStructValueFieldIterator; + diff --git a/base/value.h b/base/value.h index 5d94d5e..d53370c 100644 --- a/base/value.h @@ -67,10 +82,106 @@ index 5d94d5e..d53370c 100644 static_assert(std::is_trivially_destructible_v, \ #value_class " must be trivially destructible"); \ \ +diff --git a/base/values/list_value.h b/base/values/list_value.h +index fb6ed6e..61e1293 100644 +--- a/base/values/list_value.h ++++ b/base/values/list_value.h +@@ -146,13 +146,13 @@ class ListValue::Iterator { + + namespace base_internal { + +-ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyListValueGet( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyListValueGet( + uintptr_t impl, ValueFactory& value_factory, size_t index); +-ABSL_ATTRIBUTE_WEAK size_t LegacyListValueSize(uintptr_t impl); +-ABSL_ATTRIBUTE_WEAK bool LegacyListValueEmpty(uintptr_t impl); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr LegacyListValueAnyOf( ++extern ABSL_ATTRIBUTE_WEAK size_t LegacyListValueSize(uintptr_t impl); ++extern ABSL_ATTRIBUTE_WEAK bool LegacyListValueEmpty(uintptr_t impl); ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr LegacyListValueAnyOf( + ValueFactory& value_factory, uintptr_t impl, ListValue::AnyOfCallback cb); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyListValueContains( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyListValueContains( + ValueFactory& value_factory, uintptr_t impl, const Handle& other); + + class LegacyListValue final : public ListValue, public InlineData { +diff --git a/base/values/map_value.h b/base/values/map_value.h +index 8e130af..c8d1210 100644 +--- a/base/values/map_value.h ++++ b/base/values/map_value.h +@@ -150,14 +150,14 @@ CEL_INTERNAL_VALUE_DECL(MapValue); + + namespace base_internal { + +-ABSL_ATTRIBUTE_WEAK size_t LegacyMapValueSize(uintptr_t impl); +-ABSL_ATTRIBUTE_WEAK bool LegacyMapValueEmpty(uintptr_t impl); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr>> ++extern ABSL_ATTRIBUTE_WEAK size_t LegacyMapValueSize(uintptr_t impl); ++extern ABSL_ATTRIBUTE_WEAK bool LegacyMapValueEmpty(uintptr_t impl); ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr>> + LegacyMapValueGet(uintptr_t impl, ValueFactory& value_factory, + const Handle& key); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr LegacyMapValueHas( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr LegacyMapValueHas( + uintptr_t impl, const Handle& key); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyMapValueListKeys( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyMapValueListKeys( + uintptr_t impl, ValueFactory& value_factory); + + constexpr absl::string_view kErrNoSuchKey = "Key not found in map"; +diff --git a/base/values/struct_value.h b/base/values/struct_value.h +index e7237f6..1bbbfc9 100644 +--- a/base/values/struct_value.h ++++ b/base/values/struct_value.h +@@ -217,26 +217,26 @@ namespace base_internal { + // heap allocations during interop. So we have an inline variant and heap + // variant. + +-ABSL_ATTRIBUTE_WEAK void MessageValueHash(uintptr_t msg, uintptr_t type_info, ++extern ABSL_ATTRIBUTE_WEAK void MessageValueHash(uintptr_t msg, uintptr_t type_info, + absl::HashState state); +-ABSL_ATTRIBUTE_WEAK bool MessageValueEquals(uintptr_t lhs_msg, ++extern ABSL_ATTRIBUTE_WEAK bool MessageValueEquals(uintptr_t lhs_msg, + uintptr_t lhs_type_info, + const Value& rhs); +-ABSL_ATTRIBUTE_WEAK size_t MessageValueFieldCount(uintptr_t msg, ++extern ABSL_ATTRIBUTE_WEAK size_t MessageValueFieldCount(uintptr_t msg, + uintptr_t type_info); +-ABSL_ATTRIBUTE_WEAK std::vector MessageValueListFields( ++extern ABSL_ATTRIBUTE_WEAK std::vector MessageValueListFields( + uintptr_t msg, uintptr_t type_info); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueHasFieldByNumber( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueHasFieldByNumber( + uintptr_t msg, uintptr_t type_info, int64_t number); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueHasFieldByName( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueHasFieldByName( + uintptr_t msg, uintptr_t type_info, absl::string_view name); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr> MessageValueGetFieldByNumber( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> MessageValueGetFieldByNumber( + uintptr_t msg, uintptr_t type_info, ValueFactory& value_factory, + int64_t number, bool unbox_null_wrapper_types); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueQualify( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueQualify( + uintptr_t msg, uintptr_t type_info, ValueFactory& value_factory, + absl::Span qualifiers, bool presence_test); +-ABSL_ATTRIBUTE_WEAK absl::StatusOr> MessageValueGetFieldByName( ++extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> MessageValueGetFieldByName( + uintptr_t msg, uintptr_t type_info, ValueFactory& value_factory, + absl::string_view name, bool unbox_null_wrapper_types); + diff --git a/eval/internal/interop.cc b/eval/internal/interop.cc -index 3acde6c..2124f98 100644 +index 3acde6c..38db89f 100644 --- a/eval/internal/interop.cc +++ b/eval/internal/interop.cc +@@ -65,7 +65,7 @@ + #include "google/protobuf/message.h" + + namespace google::api::expr::runtime { +-ABSL_ATTRIBUTE_WEAK const LegacyTypeInfoApis& GetGenericProtoTypeInfoInstance(); ++extern ABSL_ATTRIBUTE_WEAK const LegacyTypeInfoApis& GetGenericProtoTypeInfoInstance(); + } + + namespace cel::interop_internal { @@ -729,6 +729,7 @@ absl::StatusOr ToLegacyValue(google::protobuf::Arena* arena, return CelValue::CreateMessageWrapper( MessageWrapperAccess::Make(message, type_info)); From b5da5854c10bf981735def0717dc956d4a8e123f Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 20:57:04 +0000 Subject: [PATCH 19/39] try again Signed-off-by: Kuat Yessenov --- source/extensions/filters/common/expr/BUILD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/extensions/filters/common/expr/BUILD b/source/extensions/filters/common/expr/BUILD index ebeb45ce0adb..d3d185963440 100644 --- a/source/extensions/filters/common/expr/BUILD +++ b/source/extensions/filters/common/expr/BUILD @@ -17,6 +17,7 @@ envoy_cc_library( "//envoy/singleton:manager_interface", "//source/common/http:utility_lib", "//source/common/protobuf", + "@com_google_cel_cpp//eval/internal:interop", "@com_google_cel_cpp//eval/public:activation", "@com_google_cel_cpp//eval/public:builtin_func_registrar", "@com_google_cel_cpp//eval/public:cel_expr_builder_factory", @@ -36,6 +37,7 @@ envoy_cc_library( "//source/common/http:utility_lib", "//source/common/singleton:const_singleton", "//source/common/stream_info:utility_lib", + "@com_google_cel_cpp//eval/internal:interop", "@com_google_cel_cpp//eval/public:cel_value", "@com_google_cel_cpp//eval/public:cel_value_producer", "@com_google_cel_cpp//eval/public/containers:container_backed_list_impl", @@ -57,6 +59,7 @@ envoy_cc_library( "//source/common/protobuf", "//source/common/singleton:const_singleton", "@com_github_google_flatbuffers//:flatbuffers", + "@com_google_cel_cpp//eval/internal:interop", "@com_google_cel_cpp//eval/public:cel_value", "@com_google_cel_cpp//eval/public/structs:cel_proto_wrapper", "@com_google_cel_cpp//tools:flatbuffers_backed_impl", From b898cd57519a3b5a5e9ae009323cdca9663db14f Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 21 Dec 2023 20:58:37 +0000 Subject: [PATCH 20/39] gcc Signed-off-by: Kuat Yessenov --- source/extensions/filters/common/expr/cel_state.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/extensions/filters/common/expr/cel_state.h b/source/extensions/filters/common/expr/cel_state.h index 6c4659dcc53b..9509ef19f3de 100644 --- a/source/extensions/filters/common/expr/cel_state.h +++ b/source/extensions/filters/common/expr/cel_state.h @@ -9,8 +9,18 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverloaded-virtual" +#endif + #include "eval/public/cel_value.h" +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + namespace Envoy { namespace Extensions { namespace Filters { From 16edfd400a62863edc1d8917286333d972b02f52 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 3 Jan 2024 22:09:27 +0000 Subject: [PATCH 21/39] simplify Signed-off-by: Kuat Yessenov --- bazel/cel-cpp.patch | 200 -------------------------------------------- 1 file changed, 200 deletions(-) diff --git a/bazel/cel-cpp.patch b/bazel/cel-cpp.patch index 8be21e02ad64..dddd678e0ada 100644 --- a/bazel/cel-cpp.patch +++ b/bazel/cel-cpp.patch @@ -1,203 +1,3 @@ -diff --git a/base/internal/value.h b/base/internal/value.h -index fb3e845..375dec8 100644 ---- a/base/internal/value.h -+++ b/base/internal/value.h -@@ -55,13 +55,9 @@ NativeTypeId GetListValueTypeId(const ListValue& list_value); - - NativeTypeId GetMapValueTypeId(const MapValue& map_value); - --static_assert(std::is_trivially_copyable_v, -- "absl::Duration must be trivially copyable."); - static_assert(std::is_trivially_destructible_v, - "absl::Duration must be trivially destructible."); - --static_assert(std::is_trivially_copyable_v, -- "absl::Time must be trivially copyable."); - static_assert(std::is_trivially_destructible_v, - "absl::Time must be trivially destructible."); - -@@ -92,6 +88,9 @@ struct InlineValue final { - int64_t number; - } enum_value; - }; -+#ifdef _MSC_VER -+ ~InlineValue() = delete; -+#endif - }; - - inline constexpr size_t kValueInlineSize = sizeof(InlineValue); -@@ -102,7 +101,11 @@ static_assert(kValueInlineSize <= 32, - static_assert(kValueInlineAlign <= alignof(std::max_align_t), - "Alignment of an inline value should not be overaligned."); - -+#ifdef _MSC_VER -+using AnyValue = AnyData<64, kValueInlineAlign>; -+#else - using AnyValue = AnyData; -+#endif - - // Metaprogramming utility for interacting with Value. - // -diff --git a/base/memory.h b/base/memory.h -index 3552e19..47ca57e 100644 ---- a/base/memory.h -+++ b/base/memory.h -@@ -165,9 +165,11 @@ std::enable_if_t, Handle> HandleFactory::Make( - static_assert(std::is_base_of_v, "F is not derived from T"); - #if defined(__cpp_lib_is_pointer_interconvertible) && \ - __cpp_lib_is_pointer_interconvertible >= 201907L -+#ifndef _MSC_VER - // Only available in C++20. - static_assert(std::is_pointer_interconvertible_base_of_v, - "F must be pointer interconvertible to Data"); -+#endif - #endif - if (memory_manager.memory_management() == MemoryManagement::kPooling) { - void* addr; -diff --git a/base/types/struct_type.h b/base/types/struct_type.h -index 68d2617..95701e1 100644 ---- a/base/types/struct_type.h -+++ b/base/types/struct_type.h -@@ -229,8 +229,8 @@ namespace base_internal { - // heap allocations during interop. So we have an inline variant and heap - // variant. - --ABSL_ATTRIBUTE_WEAK absl::string_view MessageTypeName(uintptr_t msg); --ABSL_ATTRIBUTE_WEAK size_t MessageTypeFieldCount(uintptr_t msg); -+extern ABSL_ATTRIBUTE_WEAK absl::string_view MessageTypeName(uintptr_t msg); -+extern ABSL_ATTRIBUTE_WEAK size_t MessageTypeFieldCount(uintptr_t msg); - - class LegacyStructValueFieldIterator; - -diff --git a/base/value.h b/base/value.h -index 5d94d5e..d53370c 100644 ---- a/base/value.h -+++ b/base/value.h -@@ -336,8 +336,6 @@ CEL_INTERNAL_VALUE_DECL(Value); - } // namespace cel - - #define CEL_INTERNAL_SIMPLE_VALUE_STANDALONES(value_class) \ -- static_assert(std::is_trivially_copyable_v, \ -- #value_class " must be trivially copyable"); \ - static_assert(std::is_trivially_destructible_v, \ - #value_class " must be trivially destructible"); \ - \ -diff --git a/base/values/list_value.h b/base/values/list_value.h -index fb6ed6e..61e1293 100644 ---- a/base/values/list_value.h -+++ b/base/values/list_value.h -@@ -146,13 +146,13 @@ class ListValue::Iterator { - - namespace base_internal { - --ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyListValueGet( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyListValueGet( - uintptr_t impl, ValueFactory& value_factory, size_t index); --ABSL_ATTRIBUTE_WEAK size_t LegacyListValueSize(uintptr_t impl); --ABSL_ATTRIBUTE_WEAK bool LegacyListValueEmpty(uintptr_t impl); --ABSL_ATTRIBUTE_WEAK absl::StatusOr LegacyListValueAnyOf( -+extern ABSL_ATTRIBUTE_WEAK size_t LegacyListValueSize(uintptr_t impl); -+extern ABSL_ATTRIBUTE_WEAK bool LegacyListValueEmpty(uintptr_t impl); -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr LegacyListValueAnyOf( - ValueFactory& value_factory, uintptr_t impl, ListValue::AnyOfCallback cb); --ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyListValueContains( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyListValueContains( - ValueFactory& value_factory, uintptr_t impl, const Handle& other); - - class LegacyListValue final : public ListValue, public InlineData { -diff --git a/base/values/map_value.h b/base/values/map_value.h -index 8e130af..c8d1210 100644 ---- a/base/values/map_value.h -+++ b/base/values/map_value.h -@@ -150,14 +150,14 @@ CEL_INTERNAL_VALUE_DECL(MapValue); - - namespace base_internal { - --ABSL_ATTRIBUTE_WEAK size_t LegacyMapValueSize(uintptr_t impl); --ABSL_ATTRIBUTE_WEAK bool LegacyMapValueEmpty(uintptr_t impl); --ABSL_ATTRIBUTE_WEAK absl::StatusOr>> -+extern ABSL_ATTRIBUTE_WEAK size_t LegacyMapValueSize(uintptr_t impl); -+extern ABSL_ATTRIBUTE_WEAK bool LegacyMapValueEmpty(uintptr_t impl); -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr>> - LegacyMapValueGet(uintptr_t impl, ValueFactory& value_factory, - const Handle& key); --ABSL_ATTRIBUTE_WEAK absl::StatusOr LegacyMapValueHas( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr LegacyMapValueHas( - uintptr_t impl, const Handle& key); --ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyMapValueListKeys( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> LegacyMapValueListKeys( - uintptr_t impl, ValueFactory& value_factory); - - constexpr absl::string_view kErrNoSuchKey = "Key not found in map"; -diff --git a/base/values/struct_value.h b/base/values/struct_value.h -index e7237f6..1bbbfc9 100644 ---- a/base/values/struct_value.h -+++ b/base/values/struct_value.h -@@ -217,26 +217,26 @@ namespace base_internal { - // heap allocations during interop. So we have an inline variant and heap - // variant. - --ABSL_ATTRIBUTE_WEAK void MessageValueHash(uintptr_t msg, uintptr_t type_info, -+extern ABSL_ATTRIBUTE_WEAK void MessageValueHash(uintptr_t msg, uintptr_t type_info, - absl::HashState state); --ABSL_ATTRIBUTE_WEAK bool MessageValueEquals(uintptr_t lhs_msg, -+extern ABSL_ATTRIBUTE_WEAK bool MessageValueEquals(uintptr_t lhs_msg, - uintptr_t lhs_type_info, - const Value& rhs); --ABSL_ATTRIBUTE_WEAK size_t MessageValueFieldCount(uintptr_t msg, -+extern ABSL_ATTRIBUTE_WEAK size_t MessageValueFieldCount(uintptr_t msg, - uintptr_t type_info); --ABSL_ATTRIBUTE_WEAK std::vector MessageValueListFields( -+extern ABSL_ATTRIBUTE_WEAK std::vector MessageValueListFields( - uintptr_t msg, uintptr_t type_info); --ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueHasFieldByNumber( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueHasFieldByNumber( - uintptr_t msg, uintptr_t type_info, int64_t number); --ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueHasFieldByName( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueHasFieldByName( - uintptr_t msg, uintptr_t type_info, absl::string_view name); --ABSL_ATTRIBUTE_WEAK absl::StatusOr> MessageValueGetFieldByNumber( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> MessageValueGetFieldByNumber( - uintptr_t msg, uintptr_t type_info, ValueFactory& value_factory, - int64_t number, bool unbox_null_wrapper_types); --ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueQualify( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr MessageValueQualify( - uintptr_t msg, uintptr_t type_info, ValueFactory& value_factory, - absl::Span qualifiers, bool presence_test); --ABSL_ATTRIBUTE_WEAK absl::StatusOr> MessageValueGetFieldByName( -+extern ABSL_ATTRIBUTE_WEAK absl::StatusOr> MessageValueGetFieldByName( - uintptr_t msg, uintptr_t type_info, ValueFactory& value_factory, - absl::string_view name, bool unbox_null_wrapper_types); - -diff --git a/eval/internal/interop.cc b/eval/internal/interop.cc -index 3acde6c..38db89f 100644 ---- a/eval/internal/interop.cc -+++ b/eval/internal/interop.cc -@@ -65,7 +65,7 @@ - #include "google/protobuf/message.h" - - namespace google::api::expr::runtime { --ABSL_ATTRIBUTE_WEAK const LegacyTypeInfoApis& GetGenericProtoTypeInfoInstance(); -+extern ABSL_ATTRIBUTE_WEAK const LegacyTypeInfoApis& GetGenericProtoTypeInfoInstance(); - } - - namespace cel::interop_internal { -@@ -729,6 +729,7 @@ absl::StatusOr ToLegacyValue(google::protobuf::Arena* arena, - return CelValue::CreateMessageWrapper( - MessageWrapperAccess::Make(message, type_info)); - } -+#if ABSL_HAVE_ATTRIBUTE_WEAK - if (ProtoStructValueToMessageWrapper) { - auto maybe_message_wrapper = ProtoStructValueToMessageWrapper(*value); - if (maybe_message_wrapper.has_value()) { -@@ -736,6 +737,7 @@ absl::StatusOr ToLegacyValue(google::protobuf::Arena* arena, - std::move(maybe_message_wrapper).value()); - } - } -+#endif - return absl::UnimplementedError( - "only legacy struct types and values can be used for interop"); - } diff --git a/eval/public/cel_value.cc b/eval/public/cel_value.cc index 6aeff6d..c43864c 100644 --- a/eval/public/cel_value.cc From cdb8731f37dc120d560ae31cdce931ecd0efc6aa Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 3 Jan 2024 23:00:07 +0000 Subject: [PATCH 22/39] disable on windows Signed-off-by: Kuat Yessenov --- bazel/repositories.bzl | 17 +++++++++++++++++ source/extensions/filters/common/expr/BUILD | 3 +++ source/extensions/filters/common/rbac/BUILD | 4 ++++ source/extensions/matching/http/cel_input/BUILD | 1 + test/common/access_log/BUILD | 8 ++++++-- test/extensions/access_loggers/grpc/BUILD | 14 ++++++++++++-- .../grpc/grpc_access_log_utils_test.cc | 8 ++++++++ test/extensions/access_loggers/wasm/BUILD | 1 + test/extensions/bootstrap/wasm/BUILD | 4 ++++ test/extensions/filters/common/expr/BUILD | 4 ++++ .../filters/http/rate_limit_quota/BUILD | 7 +++++++ test/extensions/filters/http/rbac/BUILD | 4 ++++ test/extensions/filters/http/wasm/BUILD | 6 +++++- test/extensions/filters/network/rbac/BUILD | 3 +++ test/extensions/filters/network/wasm/BUILD | 2 ++ test/extensions/formatter/cel/BUILD | 1 + .../matching/input_matchers/cel_matcher/BUILD | 2 ++ .../rate_limit_descriptors/expr/BUILD | 1 + test/extensions/stats_sinks/wasm/BUILD | 2 ++ 19 files changed, 87 insertions(+), 5 deletions(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 4affb6bb757f..aa93c9c838d8 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -14,6 +14,23 @@ WINDOWS_SKIP_TARGETS = [ "envoy.tracers.dynamic_ot", "envoy.tracers.datadog", "envoy.tracers.opencensus", + # Extensions that require CEL. + "envoy.access_loggers.extension_filters.cel", + "envoy.rate_limit_descriptors.expr", + "envoy.filters.http.rate_limit_quota", + "envoy.formatter.cel", + "envoy.matching.inputs.cel_data_input", + "envoy.matching.matchers.cel_matcher", + # Wasm and RBAC extensions have a link dependency on CEL. + "envoy.access_loggers.wasm", + "envoy.bootstrap.wasm", + "envoy.filters.http.wasm", + "envoy.filters.network.wasm", + "envoy.stat_sinks.wasm", + # RBAC extensions have a link dependency on CEL. + "envoy.filters.http.rbac", + "envoy.filters.network.rbac", + "envoy.rbac.matchers.upstream_ip_port", ] NO_HTTP3_SKIP_TARGETS = [ diff --git a/source/extensions/filters/common/expr/BUILD b/source/extensions/filters/common/expr/BUILD index d3d185963440..bd92080eef75 100644 --- a/source/extensions/filters/common/expr/BUILD +++ b/source/extensions/filters/common/expr/BUILD @@ -12,6 +12,7 @@ envoy_cc_library( name = "evaluator_lib", srcs = ["evaluator.cc"], hdrs = ["evaluator.h"], + tags = ["skip_on_windows"], deps = [ ":context_lib", "//envoy/singleton:manager_interface", @@ -30,6 +31,7 @@ envoy_cc_library( name = "context_lib", srcs = ["context.cc"], hdrs = ["context.h"], + tags = ["skip_on_windows"], deps = [ ":cel_state_lib", "//source/common/grpc:common_lib", @@ -54,6 +56,7 @@ envoy_cc_library( hdrs = [ "cel_state.h", ], + tags = ["skip_on_windows"], deps = [ "//envoy/stream_info:filter_state_interface", "//source/common/protobuf", diff --git a/source/extensions/filters/common/rbac/BUILD b/source/extensions/filters/common/rbac/BUILD index 80a389104809..69df5c59201e 100644 --- a/source/extensions/filters/common/rbac/BUILD +++ b/source/extensions/filters/common/rbac/BUILD @@ -12,6 +12,7 @@ envoy_cc_library( name = "utility_lib", srcs = ["utility.cc"], hdrs = ["utility.h"], + tags = ["skip_on_windows"], deps = [ ":engine_lib", "//envoy/stats:stats_macros", @@ -27,6 +28,7 @@ envoy_cc_library( "matchers.h", ], external_deps = ["abseil_optional"], + tags = ["skip_on_windows"], deps = [ "//envoy/http:header_map_interface", "//envoy/network:connection_interface", @@ -46,6 +48,7 @@ envoy_cc_library( envoy_cc_library( name = "engine_interface", hdrs = ["engine.h"], + tags = ["skip_on_windows"], deps = [ "//envoy/http:filter_interface", "//envoy/http:header_map_interface", @@ -57,6 +60,7 @@ envoy_cc_library( name = "engine_lib", srcs = ["engine_impl.cc"], hdrs = ["engine_impl.h"], + tags = ["skip_on_windows"], deps = [ "//source/common/http/matching:data_impl_lib", "//source/common/http/matching:inputs_lib", diff --git a/source/extensions/matching/http/cel_input/BUILD b/source/extensions/matching/http/cel_input/BUILD index 0c283b322866..b68fefa162c1 100644 --- a/source/extensions/matching/http/cel_input/BUILD +++ b/source/extensions/matching/http/cel_input/BUILD @@ -14,6 +14,7 @@ envoy_cc_extension( hdrs = ["cel_input.h"], extra_visibility = [ ], + tags = ["skip_on_windows"], deps = [ "//envoy/http:filter_interface", "//envoy/http:header_map_interface", diff --git a/test/common/access_log/BUILD b/test/common/access_log/BUILD index 5269c116994b..ee2a2ef68481 100644 --- a/test/common/access_log/BUILD +++ b/test/common/access_log/BUILD @@ -21,7 +21,6 @@ envoy_cc_test( "//source/common/access_log:access_log_lib", "//source/common/stream_info:utility_lib", "//source/extensions/access_loggers/file:config", - "//source/extensions/access_loggers/filters/cel:config", "//source/extensions/access_loggers/stream:config", "//test/common/stream_info:test_util", "//test/common/upstream:utility_lib", @@ -36,7 +35,12 @@ envoy_cc_test( "//test/test_common:simulated_time_system_lib", "//test/test_common:utility_lib", "@envoy_api//envoy/config/accesslog/v3:pkg_cc_proto", - ], + ] + select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows ANTLR build + "//conditions:default": [ + "//source/extensions/access_loggers/filters/cel:config", + ], + }), ) envoy_cc_test( diff --git a/test/extensions/access_loggers/grpc/BUILD b/test/extensions/access_loggers/grpc/BUILD index 05d5477338a7..286c82c3ad57 100644 --- a/test/extensions/access_loggers/grpc/BUILD +++ b/test/extensions/access_loggers/grpc/BUILD @@ -32,15 +32,25 @@ envoy_extension_cc_test( envoy_extension_cc_test( name = "grpc_access_log_utils_test", srcs = ["grpc_access_log_utils_test.cc"], + copts = select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows CEL build + "//conditions:default": [ + "-DUSE_CEL", + ], + }), extension_names = ["envoy.access_loggers.http_grpc"], deps = [ "//source/extensions/access_loggers/grpc:grpc_access_log_utils", - "//source/extensions/filters/common/expr:cel_state_lib", "//test/mocks/local_info:local_info_mocks", "//test/mocks/ssl:ssl_mocks", "//test/mocks/stream_info:stream_info_mocks", "@envoy_api//envoy/data/accesslog/v3:pkg_cc_proto", - ], + ] + select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows CEL build + "//conditions:default": [ + "//source/extensions/filters/common/expr:cel_state_lib", + ], + }), ) envoy_extension_cc_test( diff --git a/test/extensions/access_loggers/grpc/grpc_access_log_utils_test.cc b/test/extensions/access_loggers/grpc/grpc_access_log_utils_test.cc index 372b7512e631..313430b21786 100644 --- a/test/extensions/access_loggers/grpc/grpc_access_log_utils_test.cc +++ b/test/extensions/access_loggers/grpc/grpc_access_log_utils_test.cc @@ -3,7 +3,10 @@ #include "source/common/http/header_map_impl.h" #include "source/common/stream_info/filter_state_impl.h" #include "source/extensions/access_loggers/grpc/grpc_access_log_utils.h" + +#if defined(USE_CEL) #include "source/extensions/filters/common/expr/cel_state.h" +#endif // USE_CEL #include "test/mocks/stream_info/mocks.h" @@ -13,8 +16,11 @@ namespace AccessLoggers { namespace GrpcCommon { namespace { +#if defined(USE_CEL) using Filters::Common::Expr::CelStatePrototype; using Filters::Common::Expr::CelStateType; +#endif // USE_CEL + using testing::_; using testing::Return; @@ -58,6 +64,7 @@ TEST(UtilityResponseFlagsToAccessLogResponseFlagsTest, All) { EXPECT_EQ(common_access_log_expected.DebugString(), common_access_log.DebugString()); } +#if defined(USE_CEL) // key is present only in downstream streamInfo's filter state TEST(UtilityExtractCommonAccessLogPropertiesTest, FilterStateFromDownstream) { NiceMock stream_info; @@ -156,6 +163,7 @@ TEST(UtilityExtractCommonAccessLogPropertiesTest, any.UnpackTo(&gotState); EXPECT_EQ(gotState.value(), "value_from_downstream_peer"); } +#endif // USE_CEL } // namespace } // namespace GrpcCommon diff --git a/test/extensions/access_loggers/wasm/BUILD b/test/extensions/access_loggers/wasm/BUILD index 47d6aa71e1c9..bb463c360c97 100644 --- a/test/extensions/access_loggers/wasm/BUILD +++ b/test/extensions/access_loggers/wasm/BUILD @@ -22,6 +22,7 @@ envoy_extension_cc_test( "//test/extensions/access_loggers/wasm/test_data:test_cpp.wasm", ]), extension_names = ["envoy.access_loggers.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/access_loggers/wasm:config", "//test/extensions/access_loggers/wasm/test_data:test_cpp_plugin", diff --git a/test/extensions/bootstrap/wasm/BUILD b/test/extensions/bootstrap/wasm/BUILD index 10932b0cadcd..c655f032da63 100644 --- a/test/extensions/bootstrap/wasm/BUILD +++ b/test/extensions/bootstrap/wasm/BUILD @@ -32,6 +32,7 @@ envoy_extension_cc_test( ]), extension_names = ["envoy.bootstrap.wasm"], external_deps = ["abseil_optional"], + tags = ["skip_on_windows"], deps = [ "//source/common/event:dispatcher_lib", "//source/common/stats:isolated_store_lib", @@ -55,6 +56,7 @@ envoy_extension_cc_test( "//test/extensions/bootstrap/wasm/test_data:http_cpp.wasm", ]), extension_names = ["envoy.bootstrap.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/bootstrap/wasm:config", "//source/extensions/common/wasm:wasm_lib", @@ -71,6 +73,7 @@ envoy_extension_cc_test( "//test/extensions/bootstrap/wasm/test_data:start_cpp.wasm", ]), extension_names = ["envoy.bootstrap.wasm"], + tags = ["skip_on_windows"], deps = [ "//envoy/registry", "//source/common/stats:isolated_store_lib", @@ -98,6 +101,7 @@ envoy_extension_cc_test_binary( "abseil_optional", "benchmark", ], + tags = ["skip_on_windows"], deps = [ "//source/common/event:dispatcher_lib", "//source/common/stats:isolated_store_lib", diff --git a/test/extensions/filters/common/expr/BUILD b/test/extensions/filters/common/expr/BUILD index ddda2980b9b8..82daf32f4c67 100644 --- a/test/extensions/filters/common/expr/BUILD +++ b/test/extensions/filters/common/expr/BUILD @@ -17,6 +17,7 @@ envoy_extension_cc_test( name = "context_test", srcs = ["context_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/common/network:filter_state_dst_address_lib", "//source/common/router:string_accessor_lib", @@ -38,6 +39,7 @@ envoy_extension_cc_test( name = "evaluator_test", srcs = ["evaluator_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/expr:evaluator_lib", "//test/test_common:utility_lib", @@ -48,6 +50,7 @@ envoy_extension_cc_test( envoy_proto_library( name = "evaluator_fuzz_proto", srcs = ["evaluator_fuzz.proto"], + tags = ["skip_on_windows"], deps = [ "//test/fuzz:common_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", @@ -58,6 +61,7 @@ envoy_cc_fuzz_test( name = "evaluator_fuzz_test", srcs = ["evaluator_fuzz_test.cc"], corpus = "evaluator_corpus", + tags = ["skip_on_windows"], deps = [ ":evaluator_fuzz_proto_cc_proto", "//source/extensions/filters/common/expr:evaluator_lib", diff --git a/test/extensions/filters/http/rate_limit_quota/BUILD b/test/extensions/filters/http/rate_limit_quota/BUILD index 7dea53a8460e..370231d06d9e 100644 --- a/test/extensions/filters/http/rate_limit_quota/BUILD +++ b/test/extensions/filters/http/rate_limit_quota/BUILD @@ -17,6 +17,7 @@ envoy_extension_cc_mock( name = "mocks", hdrs = ["mocks.h"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/http/rate_limit_quota", "@envoy_api//envoy/service/rate_limit_quota/v3:pkg_cc_proto", @@ -28,6 +29,7 @@ envoy_extension_cc_test( size = "small", srcs = ["config_test.cc"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ "//source/common/http:message_lib", "//source/extensions/filters/http/rate_limit_quota:config", @@ -42,6 +44,7 @@ envoy_extension_cc_test( size = "small", srcs = ["filter_test.cc"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ ":client_test_utils", ":test_utils", @@ -62,6 +65,7 @@ envoy_extension_cc_test( size = "small", srcs = ["client_test.cc"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ ":client_test_utils", ], @@ -71,6 +75,7 @@ envoy_extension_cc_test_library( name = "client_test_utils", hdrs = ["client_test_utils.h"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ ":mocks", "//source/common/http:header_map_lib", @@ -89,6 +94,7 @@ envoy_extension_cc_test_library( name = "test_utils", hdrs = ["test_utils.h"], extension_names = ["envoy.filters.http.rate_limit_quota"], + tags = ["skip_on_windows"], deps = [ ], ) @@ -101,6 +107,7 @@ envoy_extension_cc_test( shard_count = 2, tags = [ "cpu:3", + "skip_on_windows", ], deps = [ ":test_utils", diff --git a/test/extensions/filters/http/rbac/BUILD b/test/extensions/filters/http/rbac/BUILD index 92f3b3eb0067..6195d9cd4fe5 100644 --- a/test/extensions/filters/http/rbac/BUILD +++ b/test/extensions/filters/http/rbac/BUILD @@ -16,6 +16,7 @@ envoy_extension_cc_test( name = "config_test", srcs = ["config_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/http/rbac:config", "//test/mocks/server:factory_context_mocks", @@ -29,6 +30,7 @@ envoy_extension_cc_test( name = "rbac_filter_test", srcs = ["rbac_filter_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/http/rbac:rbac_filter_lib", @@ -52,6 +54,7 @@ envoy_extension_cc_test( srcs = ["rbac_filter_integration_test.cc"], extension_names = ["envoy.filters.http.rbac"], shard_count = 2, + tags = ["skip_on_windows"], deps = [ "//source/extensions/clusters/dynamic_forward_proxy:cluster", "//source/extensions/filters/http/dynamic_forward_proxy:config", @@ -68,6 +71,7 @@ envoy_extension_cc_mock( name = "route_config_mocks", hdrs = ["mocks.h"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/http/rbac:rbac_filter_lib", diff --git a/test/extensions/filters/http/wasm/BUILD b/test/extensions/filters/http/wasm/BUILD index cfbddf2e7712..2b4f39eb4631 100644 --- a/test/extensions/filters/http/wasm/BUILD +++ b/test/extensions/filters/http/wasm/BUILD @@ -37,7 +37,10 @@ envoy_extension_cc_test( ]), extension_names = ["envoy.filters.http.wasm"], shard_count = 50, - tags = ["cpu:4"], + tags = [ + "cpu:4", + "skip_on_windows", + ], deps = [ "//source/common/http:message_lib", "//source/extensions/filters/http/wasm:wasm_filter_lib", @@ -59,6 +62,7 @@ envoy_extension_cc_test( ]), extension_names = ["envoy.filters.http.wasm"], shard_count = 16, + tags = ["skip_on_windows"], deps = [ "//source/common/common:base64_lib", "//source/common/common:hex_lib", diff --git a/test/extensions/filters/network/rbac/BUILD b/test/extensions/filters/network/rbac/BUILD index 5475ef490c7e..7264d1596a61 100644 --- a/test/extensions/filters/network/rbac/BUILD +++ b/test/extensions/filters/network/rbac/BUILD @@ -15,6 +15,7 @@ envoy_extension_cc_test( name = "config_test", srcs = ["config_test.cc"], extension_names = ["envoy.filters.network.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/network/rbac:config", "//test/mocks/server:factory_context_mocks", @@ -27,6 +28,7 @@ envoy_extension_cc_test( name = "filter_test", srcs = ["filter_test.cc"], extension_names = ["envoy.filters.network.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/network:well_known_names", @@ -45,6 +47,7 @@ envoy_extension_cc_test( size = "large", srcs = ["integration_test.cc"], extension_names = ["envoy.filters.network.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/network/echo:config", "//source/extensions/filters/network/rbac:config", diff --git a/test/extensions/filters/network/wasm/BUILD b/test/extensions/filters/network/wasm/BUILD index 840a0f7afcbd..93069c892003 100644 --- a/test/extensions/filters/network/wasm/BUILD +++ b/test/extensions/filters/network/wasm/BUILD @@ -24,6 +24,7 @@ envoy_extension_cc_test( "//test/extensions/filters/network/wasm/test_data:test_cpp.wasm", ]), extension_names = ["envoy.filters.network.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/common/common:base64_lib", "//source/common/common:hex_lib", @@ -51,6 +52,7 @@ envoy_extension_cc_test( "//test/extensions/filters/network/wasm/test_data:resume_call_rust.wasm", ]), extension_names = ["envoy.filters.network.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/network/wasm:wasm_filter_lib", "//test/extensions/common/wasm:wasm_runtime", diff --git a/test/extensions/formatter/cel/BUILD b/test/extensions/formatter/cel/BUILD index d1160a3b0188..e441c302878a 100644 --- a/test/extensions/formatter/cel/BUILD +++ b/test/extensions/formatter/cel/BUILD @@ -21,6 +21,7 @@ envoy_extension_cc_test( ], }), extension_names = ["envoy.formatter.cel"], + tags = ["skip_on_windows"], deps = [ "//source/common/formatter:substitution_formatter_lib", "//source/common/json:json_loader_lib", diff --git a/test/extensions/matching/input_matchers/cel_matcher/BUILD b/test/extensions/matching/input_matchers/cel_matcher/BUILD index a5a2f50ca4fa..74f2ce3473a2 100644 --- a/test/extensions/matching/input_matchers/cel_matcher/BUILD +++ b/test/extensions/matching/input_matchers/cel_matcher/BUILD @@ -15,12 +15,14 @@ envoy_package() envoy_cc_test_library( name = "cel_matcher_test_lib", hdrs = ["cel_matcher_test.h"], + tags = ["skip_on_windows"], ) envoy_extension_cc_test( name = "cel_matcher_test", srcs = ["cel_matcher_test.cc"], extension_names = ["envoy.matching.matchers.cel_matcher"], + tags = ["skip_on_windows"], deps = [ ":cel_matcher_test_lib", "//source/common/matcher:matcher_lib", diff --git a/test/extensions/rate_limit_descriptors/expr/BUILD b/test/extensions/rate_limit_descriptors/expr/BUILD index 2107c282c88b..f6f7ad16841d 100644 --- a/test/extensions/rate_limit_descriptors/expr/BUILD +++ b/test/extensions/rate_limit_descriptors/expr/BUILD @@ -21,6 +21,7 @@ envoy_extension_cc_test( ], }), extension_names = ["envoy.rate_limit_descriptors.expr"], + tags = ["skip_on_windows"], deps = [ "//source/common/protobuf:utility_lib", "//source/common/router:router_ratelimit_lib", diff --git a/test/extensions/stats_sinks/wasm/BUILD b/test/extensions/stats_sinks/wasm/BUILD index 8f40393ed055..9ad8c633cfa0 100644 --- a/test/extensions/stats_sinks/wasm/BUILD +++ b/test/extensions/stats_sinks/wasm/BUILD @@ -22,6 +22,7 @@ envoy_extension_cc_test( "//test/extensions/stats_sinks/wasm/test_data:test_context_cpp.wasm", ]), extension_names = ["envoy.stat_sinks.wasm"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/stat_sinks/wasm:config", "//test/extensions/common/wasm:wasm_runtime", @@ -39,6 +40,7 @@ envoy_extension_cc_test( ]), extension_names = ["envoy.stat_sinks.wasm"], external_deps = ["abseil_optional"], + tags = ["skip_on_windows"], deps = [ "//source/common/stats:stats_lib", "//source/extensions/common/wasm:wasm_lib", From 42eff97c74ddf69904943c314856b4a3ed60a5fa Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 3 Jan 2024 23:05:55 +0000 Subject: [PATCH 23/39] oops Signed-off-by: Kuat Yessenov --- source/extensions/filters/common/expr/BUILD | 3 --- test/extensions/filters/common/expr/BUILD | 1 - 2 files changed, 4 deletions(-) diff --git a/source/extensions/filters/common/expr/BUILD b/source/extensions/filters/common/expr/BUILD index bd92080eef75..e3cc16200459 100644 --- a/source/extensions/filters/common/expr/BUILD +++ b/source/extensions/filters/common/expr/BUILD @@ -18,7 +18,6 @@ envoy_cc_library( "//envoy/singleton:manager_interface", "//source/common/http:utility_lib", "//source/common/protobuf", - "@com_google_cel_cpp//eval/internal:interop", "@com_google_cel_cpp//eval/public:activation", "@com_google_cel_cpp//eval/public:builtin_func_registrar", "@com_google_cel_cpp//eval/public:cel_expr_builder_factory", @@ -39,7 +38,6 @@ envoy_cc_library( "//source/common/http:utility_lib", "//source/common/singleton:const_singleton", "//source/common/stream_info:utility_lib", - "@com_google_cel_cpp//eval/internal:interop", "@com_google_cel_cpp//eval/public:cel_value", "@com_google_cel_cpp//eval/public:cel_value_producer", "@com_google_cel_cpp//eval/public/containers:container_backed_list_impl", @@ -62,7 +60,6 @@ envoy_cc_library( "//source/common/protobuf", "//source/common/singleton:const_singleton", "@com_github_google_flatbuffers//:flatbuffers", - "@com_google_cel_cpp//eval/internal:interop", "@com_google_cel_cpp//eval/public:cel_value", "@com_google_cel_cpp//eval/public/structs:cel_proto_wrapper", "@com_google_cel_cpp//tools:flatbuffers_backed_impl", diff --git a/test/extensions/filters/common/expr/BUILD b/test/extensions/filters/common/expr/BUILD index 82daf32f4c67..eed363cec5b3 100644 --- a/test/extensions/filters/common/expr/BUILD +++ b/test/extensions/filters/common/expr/BUILD @@ -50,7 +50,6 @@ envoy_extension_cc_test( envoy_proto_library( name = "evaluator_fuzz_proto", srcs = ["evaluator_fuzz.proto"], - tags = ["skip_on_windows"], deps = [ "//test/fuzz:common_proto", "@com_google_googleapis//google/api/expr/v1alpha1:syntax_proto", From 6b9b5d620d2a537e7c387b4b9109c08f6eb60f34 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Wed, 3 Jan 2024 23:32:56 +0000 Subject: [PATCH 24/39] skip another test Signed-off-by: Kuat Yessenov --- test/extensions/access_loggers/grpc/BUILD | 13 ++++++++++++- .../grpc/tcp_grpc_access_log_integration_test.cc | 7 ++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/test/extensions/access_loggers/grpc/BUILD b/test/extensions/access_loggers/grpc/BUILD index 286c82c3ad57..50aac8836e8b 100644 --- a/test/extensions/access_loggers/grpc/BUILD +++ b/test/extensions/access_loggers/grpc/BUILD @@ -120,6 +120,12 @@ envoy_extension_cc_test( name = "tcp_grpc_access_log_integration_test", size = "large", srcs = ["tcp_grpc_access_log_integration_test.cc"], + copts = select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows CEL build + "//conditions:default": [ + "-DUSE_CEL", + ], + }), extension_names = ["envoy.access_loggers.tcp_grpc"], deps = [ "//source/common/buffer:zero_copy_input_stream_lib", @@ -145,5 +151,10 @@ envoy_extension_cc_test( "@envoy_api//envoy/extensions/filters/network/rbac/v3:pkg_cc_proto", "@envoy_api//envoy/extensions/filters/network/tcp_proxy/v3:pkg_cc_proto", "@envoy_api//envoy/service/accesslog/v3:pkg_cc_proto", - ], + ] + select({ + "//bazel:windows_x86_64": [], # TODO: fix the windows CEL build + "//conditions:default": [ + "//source/extensions/filters/network/rbac:config", + ], + }), ) diff --git a/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc b/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc index c962d56706ce..413002036687 100644 --- a/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc +++ b/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc @@ -13,7 +13,6 @@ #include "source/common/grpc/common.h" #include "source/common/version/version.h" #include "source/extensions/filters/listener/tls_inspector/tls_inspector.h" -#include "source/extensions/filters/network/rbac/config.h" #include "source/extensions/transport_sockets/tls/context_manager_impl.h" #include "source/extensions/transport_sockets/tls/ssl_socket.h" @@ -22,6 +21,10 @@ #include "test/integration/ssl_utility.h" #include "test/test_common/utility.h" +#if defined(USE_CEL) +#include "source/extensions/filters/network/rbac/config.h" +#endif // USE_CEL + #include "gtest/gtest.h" using testing::AssertionResult; @@ -407,6 +410,7 @@ TEST_P(TcpGrpcAccessLogIntegrationTest, BasicAccessLogFlowWithIntermediateLog) { cleanup(); } +#if defined(USE_CEL) // Test RBAC. TEST_P(TcpGrpcAccessLogIntegrationTest, RBACAccessLogFlow) { config_helper_.addNetworkFilter(R"EOF( @@ -489,6 +493,7 @@ name: envoy.filters.network.rbac cleanup(); } +#endif // USE_CEL // Ssl Terminated by Envoy, no `ja3` fingerprint. TEST_P(TcpGrpcAccessLogIntegrationTest, SslTerminatedNoJA3) { From f54d1193baf321d97a60d35e5ae444ce5e866a5c Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 4 Jan 2024 00:03:04 +0000 Subject: [PATCH 25/39] fix Signed-off-by: Kuat Yessenov --- test/extensions/access_loggers/grpc/BUILD | 1 - 1 file changed, 1 deletion(-) diff --git a/test/extensions/access_loggers/grpc/BUILD b/test/extensions/access_loggers/grpc/BUILD index 50aac8836e8b..caffcbb34d23 100644 --- a/test/extensions/access_loggers/grpc/BUILD +++ b/test/extensions/access_loggers/grpc/BUILD @@ -136,7 +136,6 @@ envoy_extension_cc_test( "//source/extensions/filters/listener/tls_inspector:config", "//source/extensions/filters/listener/tls_inspector:tls_inspector_lib", "//source/extensions/filters/network/echo:config", - "//source/extensions/filters/network/rbac:config", "//source/extensions/filters/network/tcp_proxy:config", "//source/extensions/transport_sockets/tls:config", "//source/extensions/transport_sockets/tls:context_config_lib", From f21f1ba643a6dde76d3e06d43cc70507c6a97e1a Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 4 Jan 2024 00:29:35 +0000 Subject: [PATCH 26/39] skip more Signed-off-by: Kuat Yessenov --- test/extensions/common/wasm/BUILD | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/extensions/common/wasm/BUILD b/test/extensions/common/wasm/BUILD index eaf3b573c9c8..14791f4599cd 100644 --- a/test/extensions/common/wasm/BUILD +++ b/test/extensions/common/wasm/BUILD @@ -21,6 +21,7 @@ envoy_cc_test( data = envoy_select_wasm_rust_tests([ "//test/extensions/common/wasm/test_data:test_rust.wasm", ]), + tags = ["skip_on_windows"], deps = [ "//source/extensions/common/wasm:wasm_lib", "//test/extensions/common/wasm:wasm_runtime", @@ -40,6 +41,7 @@ envoy_cc_test( "//test/extensions/common/wasm/test_data:test_restriction_cpp.wasm", ]), external_deps = ["abseil_optional"], + tags = ["skip_on_windows"], deps = [ "//source/common/common:hex_lib", "//source/common/crypto:utility_lib", @@ -63,6 +65,7 @@ envoy_cc_test( envoy_cc_test( name = "plugin_test", srcs = ["plugin_test.cc"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/common/wasm:wasm_lib", "//test/test_common:environment_lib", @@ -76,6 +79,7 @@ envoy_cc_test_binary( "abseil_optional", "benchmark", ], + tags = ["skip_on_windows"], deps = [ "//source/common/event:dispatcher_lib", "//source/extensions/common/wasm:wasm_lib", @@ -90,6 +94,7 @@ envoy_cc_test_library( name = "wasm_runtime", srcs = ["wasm_runtime.cc"], hdrs = ["wasm_runtime.h"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/wasm_runtime/null:config", "//source/extensions/wasm_runtime/v8:config", @@ -102,6 +107,7 @@ envoy_cc_test_library( envoy_cc_test( name = "wasm_runtime_factory_test", srcs = ["wasm_runtime_factory_test.cc"], + tags = ["skip_on_windows"], deps = [ "//envoy/registry", "//source/extensions/common/wasm:wasm_runtime_factory_interface", @@ -112,6 +118,7 @@ envoy_cc_test( envoy_cc_test( name = "context_test", srcs = ["context_test.cc"], + tags = ["skip_on_windows"], deps = [ "//envoy/common:base_includes", "//source/extensions/common/wasm:wasm_lib", @@ -130,6 +137,7 @@ envoy_cc_test( "-DWASM_USE_CEL_PARSER", ], }), + tags = ["skip_on_windows"], deps = [ "//source/common/network:filter_state_dst_address_lib", "//source/common/tcp_proxy", From 9f454407af1fe7d4d4a02638782f175a4116bfd6 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 4 Jan 2024 00:49:53 +0000 Subject: [PATCH 27/39] fix Signed-off-by: Kuat Yessenov --- test/extensions/filters/common/rbac/BUILD | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/extensions/filters/common/rbac/BUILD b/test/extensions/filters/common/rbac/BUILD index f4b8158bf825..3cdc7f4eb9ff 100644 --- a/test/extensions/filters/common/rbac/BUILD +++ b/test/extensions/filters/common/rbac/BUILD @@ -16,6 +16,7 @@ envoy_extension_cc_test( name = "matchers_test", srcs = ["matchers_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/common/stream_info:filter_state_lib", "//source/extensions/filters/common/expr:evaluator_lib", @@ -34,6 +35,7 @@ envoy_extension_cc_test( name = "engine_impl_test", srcs = ["engine_impl_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:engine_lib", "//source/extensions/filters/http/rbac:rbac_filter_lib", @@ -53,6 +55,7 @@ envoy_extension_cc_test( name = "utility_test", srcs = ["utility_test.cc"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:utility_lib", "//source/extensions/filters/http/rbac:rbac_filter_lib", @@ -65,6 +68,7 @@ envoy_extension_cc_mock( name = "engine_mocks", hdrs = ["mocks.h"], extension_names = ["envoy.filters.http.rbac"], + tags = ["skip_on_windows"], deps = [ "//source/extensions/filters/common/rbac:engine_lib", "@envoy_api//envoy/config/rbac/v3:pkg_cc_proto", From 780d871e91309ddb6132bca8dd85340d925aaae7 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 4 Jan 2024 01:21:05 +0000 Subject: [PATCH 28/39] extraneous dep Signed-off-by: Kuat Yessenov --- test/extensions/filters/http/composite/BUILD | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/extensions/filters/http/composite/BUILD b/test/extensions/filters/http/composite/BUILD index fd0777e78c5a..4b826772d3af 100644 --- a/test/extensions/filters/http/composite/BUILD +++ b/test/extensions/filters/http/composite/BUILD @@ -38,9 +38,6 @@ envoy_extension_cc_test( "//source/common/http/match_delegate:config", "//source/extensions/filters/http/composite:config", "//source/extensions/filters/http/composite:filter_lib", - "//source/extensions/matching/http/cel_input:cel_input_lib", - "//source/extensions/matching/input_matchers/cel_matcher:cel_matcher_lib", - "//source/extensions/matching/input_matchers/cel_matcher:config", "//test/common/grpc:grpc_client_integration_lib", "//test/common/http:common_lib", "//test/integration:http_integration_lib", From 3429f9d060c6c43fa79f7d92e7be2d6f82734f1e Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 4 Jan 2024 03:50:30 +0000 Subject: [PATCH 29/39] patches Signed-off-by: Kuat Yessenov --- test/config_test/config_test.cc | 2 +- test/integration/BUILD | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/config_test/config_test.cc b/test/config_test/config_test.cc index 645e6fb74e01..7db1c72d7209 100644 --- a/test/config_test/config_test.cc +++ b/test/config_test/config_test.cc @@ -47,7 +47,7 @@ OptionsImpl asConfigYaml(const OptionsImpl& src, Api::Api& api) { static std::vector unsuported_win32_configs = { #if defined(WIN32) && !defined(SO_ORIGINAL_DST) - "configs_original-dst-cluster_proxy_config.yaml" + "configs_original-dst-cluster_proxy_config.yaml", "rbac_envoy.yaml" #endif }; diff --git a/test/integration/BUILD b/test/integration/BUILD index 39f09bce4476..49a7f2f97577 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -417,6 +417,7 @@ envoy_sh_test( size = "large", srcs = ["run_envoy_test.sh"], cc_binary = [":hotrestart_main"], + coverage = False, data = [ "test_utility.sh", "//test/config/integration:server_config_files", From ed0fa84280f8c9b423622d7823c4c94a6f48b0d0 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 4 Jan 2024 05:57:46 +0000 Subject: [PATCH 30/39] patches Signed-off-by: Kuat Yessenov --- test/config_test/config_test.cc | 5 ++++- test/integration/admin_html/BUILD | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/config_test/config_test.cc b/test/config_test/config_test.cc index 7db1c72d7209..c41137526290 100644 --- a/test/config_test/config_test.cc +++ b/test/config_test/config_test.cc @@ -46,8 +46,11 @@ OptionsImpl asConfigYaml(const OptionsImpl& src, Api::Api& api) { } static std::vector unsuported_win32_configs = { +#if defined(WIN32) + "rbac_envoy.yaml", +#endif #if defined(WIN32) && !defined(SO_ORIGINAL_DST) - "configs_original-dst-cluster_proxy_config.yaml", "rbac_envoy.yaml" + "configs_original-dst-cluster_proxy_config.yaml" #endif }; diff --git a/test/integration/admin_html/BUILD b/test/integration/admin_html/BUILD index 1215673070f8..50ccaabc8054 100644 --- a/test/integration/admin_html/BUILD +++ b/test/integration/admin_html/BUILD @@ -32,6 +32,7 @@ envoy_sh_test( size = "large", srcs = envoy_select_admin_html(["test_server_test.sh"]), cc_binary = [":test_server"], + coverage = False, data = [ ":test_server_files", "//source/server/admin/html:admin_web_files", From 2a961ae82eba40856357fc7bd5bc74cc383763f1 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 4 Jan 2024 07:27:24 +0000 Subject: [PATCH 31/39] patches Signed-off-by: Kuat Yessenov --- test/integration/admin_html/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/admin_html/BUILD b/test/integration/admin_html/BUILD index 50ccaabc8054..64cf554421f3 100644 --- a/test/integration/admin_html/BUILD +++ b/test/integration/admin_html/BUILD @@ -32,12 +32,12 @@ envoy_sh_test( size = "large", srcs = envoy_select_admin_html(["test_server_test.sh"]), cc_binary = [":test_server"], - coverage = False, data = [ ":test_server_files", "//source/server/admin/html:admin_web_files", "//test/integration:test_utility.sh", ], + tags = ["nocoverage"], # This test fails on windows trying to poll the server for the admin # address. Failure is: From 37c6620b60239209303dfbb074bb9f0b738c6c96 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Thu, 4 Jan 2024 21:36:04 +0000 Subject: [PATCH 32/39] final fix Signed-off-by: Kuat Yessenov --- test/integration/admin_html/BUILD | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/integration/admin_html/BUILD b/test/integration/admin_html/BUILD index 64cf554421f3..89891acf214f 100644 --- a/test/integration/admin_html/BUILD +++ b/test/integration/admin_html/BUILD @@ -37,7 +37,6 @@ envoy_sh_test( "//source/server/admin/html:admin_web_files", "//test/integration:test_utility.sh", ], - tags = ["nocoverage"], # This test fails on windows trying to poll the server for the admin # address. Failure is: @@ -46,7 +45,10 @@ envoy_sh_test( # curl: (3) URL using bad/illegal format or missing URL # # This seems fixable, if someone is so inclined. - tags = ["skip_on_windows"], + tags = [ + "nocoverage", + "skip_on_windows", + ], ) filegroup( From 07c69d00f0c3f72f568d59db58490c09d7e7c64a Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Fri, 5 Jan 2024 03:36:38 +0000 Subject: [PATCH 33/39] skip coverage Signed-off-by: Kuat Yessenov --- test/per_file_coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/per_file_coverage.sh b/test/per_file_coverage.sh index ae83388bef9e..632a496b31ff 100755 --- a/test/per_file_coverage.sh +++ b/test/per_file_coverage.sh @@ -22,7 +22,7 @@ declare -a KNOWN_LOW_COVERAGE=( "source/common/tcp:94.5" "source/common/thread:0.0" # Death tests don't report LCOV "source/common/watchdog:58.6" # Death tests don't report LCOV -"source/exe:91.4" +"source/exe:78.8" # Binary with extensions fails to link due to the size, and main() lacks coverage. "source/extensions/access_loggers/wasm:93.5" "source/extensions/clusters/common:91.5" # This can be increased again once `#24903` lands "source/extensions/common:93.0" #flaky: be careful adjusting From 83de24c7233e7107792cb61ebd16679bceec4b9b Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Fri, 5 Jan 2024 03:41:19 +0000 Subject: [PATCH 34/39] revert Signed-off-by: Kuat Yessenov --- test/integration/BUILD | 1 - test/integration/admin_html/BUILD | 5 +---- test/per_file_coverage.sh | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/test/integration/BUILD b/test/integration/BUILD index 49a7f2f97577..39f09bce4476 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -417,7 +417,6 @@ envoy_sh_test( size = "large", srcs = ["run_envoy_test.sh"], cc_binary = [":hotrestart_main"], - coverage = False, data = [ "test_utility.sh", "//test/config/integration:server_config_files", diff --git a/test/integration/admin_html/BUILD b/test/integration/admin_html/BUILD index 89891acf214f..1215673070f8 100644 --- a/test/integration/admin_html/BUILD +++ b/test/integration/admin_html/BUILD @@ -45,10 +45,7 @@ envoy_sh_test( # curl: (3) URL using bad/illegal format or missing URL # # This seems fixable, if someone is so inclined. - tags = [ - "nocoverage", - "skip_on_windows", - ], + tags = ["skip_on_windows"], ) filegroup( diff --git a/test/per_file_coverage.sh b/test/per_file_coverage.sh index d32a44494808..65de2f4fab36 100755 --- a/test/per_file_coverage.sh +++ b/test/per_file_coverage.sh @@ -21,8 +21,7 @@ declare -a KNOWN_LOW_COVERAGE=( "source/common/tcp:94.6" "source/common/thread:0.0" # Death tests don't report LCOV "source/common/watchdog:58.6" # Death tests don't report LCOV -"source/exe:78.8" # Binary with extensions fails to link due to the size, and main() lacks coverage. -"source/extensions/access_loggers/wasm:93.5" +"source/exe:91.5" "source/extensions/clusters/common:91.5" # This can be increased again once `#24903` lands "source/extensions/common:93.0" #flaky: be careful adjusting "source/extensions/common/tap:94.5" From a3618f6dd16a094cbfab16f447b121acaa722ab3 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Fri, 5 Jan 2024 04:16:43 +0000 Subject: [PATCH 35/39] Revert "revert" This reverts commit 83de24c7233e7107792cb61ebd16679bceec4b9b. Signed-off-by: Kuat Yessenov --- test/integration/BUILD | 1 + test/integration/admin_html/BUILD | 5 ++++- test/per_file_coverage.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/integration/BUILD b/test/integration/BUILD index 39f09bce4476..49a7f2f97577 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -417,6 +417,7 @@ envoy_sh_test( size = "large", srcs = ["run_envoy_test.sh"], cc_binary = [":hotrestart_main"], + coverage = False, data = [ "test_utility.sh", "//test/config/integration:server_config_files", diff --git a/test/integration/admin_html/BUILD b/test/integration/admin_html/BUILD index 1215673070f8..89891acf214f 100644 --- a/test/integration/admin_html/BUILD +++ b/test/integration/admin_html/BUILD @@ -45,7 +45,10 @@ envoy_sh_test( # curl: (3) URL using bad/illegal format or missing URL # # This seems fixable, if someone is so inclined. - tags = ["skip_on_windows"], + tags = [ + "nocoverage", + "skip_on_windows", + ], ) filegroup( diff --git a/test/per_file_coverage.sh b/test/per_file_coverage.sh index 65de2f4fab36..aafb46e706f9 100755 --- a/test/per_file_coverage.sh +++ b/test/per_file_coverage.sh @@ -21,7 +21,7 @@ declare -a KNOWN_LOW_COVERAGE=( "source/common/tcp:94.6" "source/common/thread:0.0" # Death tests don't report LCOV "source/common/watchdog:58.6" # Death tests don't report LCOV -"source/exe:91.5" +"source/exe:78.8" # Binary with extensions fails to link due to the size, and main() lacks coverage. "source/extensions/clusters/common:91.5" # This can be increased again once `#24903` lands "source/extensions/common:93.0" #flaky: be careful adjusting "source/extensions/common/tap:94.5" From a6aa389edc8055049f8a922061b636a70403d49d Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Mon, 8 Jan 2024 18:55:57 +0000 Subject: [PATCH 36/39] restore Signed-off-by: Kuat Yessenov --- test/per_file_coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/per_file_coverage.sh b/test/per_file_coverage.sh index aafb46e706f9..cd83f0369173 100755 --- a/test/per_file_coverage.sh +++ b/test/per_file_coverage.sh @@ -21,7 +21,7 @@ declare -a KNOWN_LOW_COVERAGE=( "source/common/tcp:94.6" "source/common/thread:0.0" # Death tests don't report LCOV "source/common/watchdog:58.6" # Death tests don't report LCOV -"source/exe:78.8" # Binary with extensions fails to link due to the size, and main() lacks coverage. +"source/exe:91.5" # Binary with extensions fails to link due to the size, and main() lacks coverage. "source/extensions/clusters/common:91.5" # This can be increased again once `#24903` lands "source/extensions/common:93.0" #flaky: be careful adjusting "source/extensions/common/tap:94.5" From 2a4f40b97deac4fec1f4506579697b9aaf16f616 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Mon, 8 Jan 2024 19:22:20 +0000 Subject: [PATCH 37/39] add back coverage Signed-off-by: Kuat Yessenov --- test/integration/BUILD | 19 ++++++++++++++++--- test/integration/run_envoy_test.sh | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/test/integration/BUILD b/test/integration/BUILD index 49a7f2f97577..74c60f43e4f8 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -359,6 +359,20 @@ envoy_cc_test_binary( ], ) +envoy_cc_test_binary( + name = "hotrestart_small_main", + srcs = ["hotrestart_main.cc"], + external_deps = [ + "abseil_symbolize", + ], + deps = [ + "//source/exe:main_common_lib", + "//source/exe:platform_impl_lib", + "//source/exe:process_wide_lib", + "//source/exe:stripped_main_base_lib", + ], +) + envoy_py_test( name = "hotrestart_handoff_test", size = "medium", @@ -413,11 +427,10 @@ envoy_sh_test( ) envoy_sh_test( - name = "run_envoy_test", + name = "run_envoy_small_test", size = "large", srcs = ["run_envoy_test.sh"], - cc_binary = [":hotrestart_main"], - coverage = False, + cc_binary = [":hotrestart_small_main"], data = [ "test_utility.sh", "//test/config/integration:server_config_files", diff --git a/test/integration/run_envoy_test.sh b/test/integration/run_envoy_test.sh index 1b24f51fc1b9..98a2c72e5e5b 100755 --- a/test/integration/run_envoy_test.sh +++ b/test/integration/run_envoy_test.sh @@ -1,6 +1,6 @@ #!/bin/bash -export ENVOY_BIN="${TEST_SRCDIR}/envoy/test/integration/hotrestart_main" +export ENVOY_BIN="${TEST_SRCDIR}/envoy/test/integration/hotrestart_small_main" # shellcheck source=test/integration/test_utility.sh source "${TEST_SRCDIR}/envoy/test/integration/test_utility.sh" From 0bfe83252736827389bc0c3efb14e070b094998e Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Mon, 8 Jan 2024 22:16:56 +0000 Subject: [PATCH 38/39] add back coverage Signed-off-by: Kuat Yessenov --- test/config/integration/BUILD | 1 + test/config/integration/empty.yaml | 1 + test/integration/BUILD | 1 + test/integration/run_envoy_test.sh | 15 +++++++++++++++ test/per_file_coverage.sh | 2 +- 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 test/config/integration/empty.yaml diff --git a/test/config/integration/BUILD b/test/config/integration/BUILD index 0d7fbf3b4a36..d2d219f5f39a 100644 --- a/test/config/integration/BUILD +++ b/test/config/integration/BUILD @@ -36,6 +36,7 @@ filegroup( filegroup( name = "server_config_files", srcs = [ + "empty.yaml", "server.yaml", "server_multiple_addresses.yaml", "server_unix_listener.yaml", diff --git a/test/config/integration/empty.yaml b/test/config/integration/empty.yaml new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/test/config/integration/empty.yaml @@ -0,0 +1 @@ +{} diff --git a/test/integration/BUILD b/test/integration/BUILD index 74c60f43e4f8..60b58b3d0e97 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -370,6 +370,7 @@ envoy_cc_test_binary( "//source/exe:platform_impl_lib", "//source/exe:process_wide_lib", "//source/exe:stripped_main_base_lib", + "//source/extensions/listener_managers/validation_listener_manager:validation_listener_manager_lib", ], ) diff --git a/test/integration/run_envoy_test.sh b/test/integration/run_envoy_test.sh index 98a2c72e5e5b..5d0e63cfaf62 100755 --- a/test/integration/run_envoy_test.sh +++ b/test/integration/run_envoy_test.sh @@ -18,6 +18,12 @@ function expect_fail_with_error() { check grep "$expected_error" "$log" } +function expect_ok() { + ${ENVOY_BIN} --use-dynamic-base-id "$@" + EXIT_CODE=$? + check [ $EXIT_CODE -eq 0 ] +} + start_test "Launching envoy with a bogus command line flag." expect_fail_with_error "PARSE ERROR: Argument: --bogus-flag" --bogus-flag @@ -40,3 +46,12 @@ expect_fail_with_error "error: invalid log level specified" --component-log-leve start_test "Launching envoy with invalid component." expect_fail_with_error "error: invalid component specified" --component-log-level foo:debug + +start_test "Launching envoy with empty config and validate." +expect_ok -c "${TEST_SRCDIR}/envoy/test/config/integration/empty.yaml" --mode validate + +start_test "Launching envoy with empty config." +run_in_background_saving_pid "${ENVOY_BIN}" -c "${TEST_SRCDIR}/envoy/test/config/integration/empty.yaml" +sleep 3 +kill "${BACKGROUND_PID}" +wait "${BACKGROUND_PID}" diff --git a/test/per_file_coverage.sh b/test/per_file_coverage.sh index a3861a44984a..adaa7cc4c598 100755 --- a/test/per_file_coverage.sh +++ b/test/per_file_coverage.sh @@ -20,7 +20,7 @@ declare -a KNOWN_LOW_COVERAGE=( "source/common/signal:87.2" # Death tests don't report LCOV "source/common/thread:0.0" # Death tests don't report LCOV "source/common/watchdog:58.6" # Death tests don't report LCOV -"source/exe:91.5" # Binary with extensions fails to link due to the size, and main() lacks coverage. +"source/exe:91.5" "source/extensions/clusters/common:91.5" # This can be increased again once `#24903` lands "source/extensions/common:93.0" #flaky: be careful adjusting "source/extensions/common/tap:94.5" From 86c68873c16c53ca3b8bc92ec93bbf83c6dc6e35 Mon Sep 17 00:00:00 2001 From: Kuat Yessenov Date: Mon, 8 Jan 2024 22:48:08 +0000 Subject: [PATCH 39/39] disable it on windows Signed-off-by: Kuat Yessenov --- test/integration/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/BUILD b/test/integration/BUILD index 60b58b3d0e97..51937089c341 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -436,6 +436,7 @@ envoy_sh_test( "test_utility.sh", "//test/config/integration:server_config_files", ], + tags = ["skip_on_windows"], ) envoy_cc_test(