Skip to content

Commit

Permalink
Fixed dependencies and unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Feb 16, 2024
1 parent f90fdd1 commit 75f89f4
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
29 changes: 29 additions & 0 deletions ydb/core/config/ut/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()));
}
}
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/driver_lib/run/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion ydb/core/kqp/federated_query/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/testlib/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75f89f4

Please sign in to comment.