From 75f89f458af453555c98f48ff3dade9f8b5bea77 Mon Sep 17 00:00:00 2001 From: Grigoriy Pisarenko Date: Fri, 16 Feb 2024 20:38:47 +0000 Subject: [PATCH] Fixed dependencies and unit test --- ydb/core/config/ut/main.cpp | 29 ++++++++++++++++++++++++++++ ydb/core/driver_lib/run/ya.make | 2 ++ ydb/core/kqp/federated_query/ya.make | 3 ++- ydb/core/testlib/ya.make | 2 ++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ydb/core/config/ut/main.cpp b/ydb/core/config/ut/main.cpp index 9edcba3f7665..892debf95a89 100644 --- a/ydb/core/config/ut/main.cpp +++ b/ydb/core/config/ut/main.cpp @@ -221,6 +221,17 @@ Y_UNIT_TEST_SUITE(ConfigProto) { "/AppConfig/FederatedQueryConfig/Gateways/Ydb/DefaultSettings/Name/Name", "/AppConfig/FederatedQueryConfig/Gateways/Pq/ClusterMapping/Settings/Name/Name", "/AppConfig/FederatedQueryConfig/Gateways/Pq/DefaultSettings/Name/Name", + "/AppConfig/QueryServiceConfig/Yt/ClusterMapping/Settings/Activation/ByHour/Hour/Hour", + "/AppConfig/QueryServiceConfig/Yt/ClusterMapping/Settings/Activation/ByHour/Percentage/Percentage", + "/AppConfig/QueryServiceConfig/Yt/ClusterMapping/Settings/Name/Name", + "/AppConfig/QueryServiceConfig/Yt/ClusterMapping/Settings/Value/Value", + "/AppConfig/QueryServiceConfig/Yt/DefaultSettings/Activation/ByHour/Hour/Hour", + "/AppConfig/QueryServiceConfig/Yt/DefaultSettings/Activation/ByHour/Percentage/Percentage", + "/AppConfig/QueryServiceConfig/Yt/DefaultSettings/Name/Name", + "/AppConfig/QueryServiceConfig/Yt/DefaultSettings/Value/Value", + "/AppConfig/QueryServiceConfig/Yt/RemoteFilePatterns/Pattern/Pattern", + "/AppConfig/QueryServiceConfig/Yt/RemoteFilePatterns/Cluster/Cluster", + "/AppConfig/QueryServiceConfig/Yt/RemoteFilePatterns/Path/Path", "/AppConfig/QueryServiceConfig/Generic/DefaultSettings/Value/Value", "/AppConfig/FederatedQueryConfig/Gateways/S3/ClusterMapping/Settings/Value/Value", "/AppConfig/QueryServiceConfig/S3/ClusterMapping/Settings/Value/Value", @@ -298,6 +309,17 @@ Y_UNIT_TEST_SUITE(ConfigProto) { {58, 9, 2, 102, 1, 1}, // /AppConfig/FederatedQueryConfig/Gateways/Dq/DefaultSettings/Name/Name {73, 6, 100, 2, 2}, // /AppConfig/QueryServiceConfig/S3/DefaultSettings/Value/Value {73, 11, 6, 2, 2}, // /AppConfig/QueryServiceConfig/Generic/DefaultSettings/Value/Value + {73, 15, 101, 100, 3, 2, 1, 1}, // /AppConfig/QueryServiceConfig/Yt/ClusterMapping/Settings/Activation/ByHour/Hour/Hour + {73, 15, 101, 100, 3, 2, 2, 2}, // /AppConfig/QueryServiceConfig/Yt/ClusterMapping/Settings/Activation/ByHour/Percentage/Percentage + {73, 15, 101, 100, 1, 1}, // /AppConfig/QueryServiceConfig/Yt/ClusterMapping/Settings/Name/Name + {73, 15, 101, 100, 2, 2}, // /AppConfig/QueryServiceConfig/Yt/ClusterMapping/Settings/Value/Value + {73, 15, 102, 3, 2, 1, 1}, // /AppConfig/QueryServiceConfig/Yt/DefaultSettings/Activation/ByHour/Hour/Hour + {73, 15, 102, 3, 2, 2, 2}, // /AppConfig/QueryServiceConfig/Yt/DefaultSettings/Activation/ByHour/Percentage/Percentage + {73, 15, 102, 1, 1}, // /AppConfig/QueryServiceConfig/Yt/DefaultSettings/Name/Name + {73, 15, 102, 2, 2}, // /AppConfig/QueryServiceConfig/Yt/DefaultSettings/Value/Value + {73, 15, 100, 1, 1}, // /AppConfig/QueryServiceConfig/Yt/RemoteFilePatterns/Pattern/Pattern + {73, 15, 100, 2, 2}, // /AppConfig/QueryServiceConfig/Yt/RemoteFilePatterns/Cluster/Cluster + {73, 15, 100, 3, 3}, // /AppConfig/QueryServiceConfig/Yt/RemoteFilePatterns/Path/Path {58, 9, 6, 1, 100, 2, 2}, // /AppConfig/FederatedQueryConfig/Gateways/Solomon/ClusterMapping/Settings/Value/Value {58, 9, 5, 1, 100, 2, 2}, // /AppConfig/FederatedQueryConfig/Gateways/S3/ClusterMapping/Settings/Value/Value {58, 9, 6, 2, 2, 2}, // /AppConfig/FederatedQueryConfig/Gateways/Solomon/DefaultSettings/Value/Value @@ -329,6 +351,13 @@ Y_UNIT_TEST_SUITE(ConfigProto) { for (const auto& [field, paths] : fieldToPaths) { for (const auto& path : paths) { UNIT_ASSERT_C(allowedPaths.contains(path.FieldPath), Sprintf("Adding new required fields in config is not allowed: %s", path.FieldPath.c_str())); + if (!allowedNumberPaths.contains(path.FieldNumberPath)) { + Cerr << "Unknown path:\n"; + for (auto el : path.FieldNumberPath) { + Cerr << el << " "; + } + Cerr << "\n"; + } UNIT_ASSERT_C(allowedNumberPaths.contains(path.FieldNumberPath), Sprintf("Adding new required fields in config is not allowed: %s", path.FieldPath.c_str())); } } diff --git a/ydb/core/driver_lib/run/ya.make b/ydb/core/driver_lib/run/ya.make index 62714d224329..b808fcbc9b57 100644 --- a/ydb/core/driver_lib/run/ya.make +++ b/ydb/core/driver_lib/run/ya.make @@ -135,6 +135,8 @@ PEERDIR( ydb/library/pdisk_io ydb/library/security ydb/library/yql/minikql/comp_nodes/llvm14 + ydb/library/yql/providers/yt/codec/codegen + ydb/library/yql/providers/yt/comp_nodes/llvm14 ydb/library/yql/providers/pq/cm_client ydb/library/yql/public/udf/service/exception_policy ydb/public/lib/base diff --git a/ydb/core/kqp/federated_query/ya.make b/ydb/core/kqp/federated_query/ya.make index 189b24f8f3d0..d2b9bff59074 100644 --- a/ydb/core/kqp/federated_query/ya.make +++ b/ydb/core/kqp/federated_query/ya.make @@ -12,7 +12,8 @@ PEERDIR( ydb/library/db_pool/protos ydb/library/yql/providers/common/http_gateway ydb/library/yql/providers/generic/connector/libcpp - ydb/library/yql/yt/native + ydb/library/yql/providers/yt/gateway/native + ydb/library/yql/providers/yt/lib/yt_download ) YQL_LAST_ABI_VERSION() diff --git a/ydb/core/testlib/ya.make b/ydb/core/testlib/ya.make index e7a93b69ae78..373d50f65c56 100644 --- a/ydb/core/testlib/ya.make +++ b/ydb/core/testlib/ya.make @@ -82,6 +82,8 @@ PEERDIR( ydb/library/persqueue/topic_parser ydb/library/security ydb/library/yql/minikql/comp_nodes/llvm14 + contrib/ydb/library/yql/providers/yt/codec/codegen + contrib/ydb/library/yql/providers/yt/comp_nodes/llvm14 ydb/library/yql/public/udf/service/exception_policy ydb/public/lib/base ydb/public/lib/deprecated/kicli