Skip to content

Commit

Permalink
YDB Import 711
Browse files Browse the repository at this point in the history
В текущем импорте YDB (из гитхаба) добавляется новая версия YDB C\+\+ SDK, а также частично или полностью переключаются несколько проектов на новый SDK, которые не переключить не получится (ydb, kikimr, rtmapreduce, logbroker, yql). Остальные изменения в основном касаются проблем со сборкой из-за inline неймспейса над старым и новым SDK.

[nodiff:caesar]
commit_hash:44753ffdf56c8ef3fa69a68c6ae9b469a29a9c71
  • Loading branch information
robot-ydb-importer committed Jan 24, 2025
1 parent 81200d8 commit a5f92cc
Show file tree
Hide file tree
Showing 30 changed files with 49 additions and 81 deletions.
2 changes: 1 addition & 1 deletion cmake/SetupYdbCppSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endif()

CPMAddPackage(
NAME ydb-cpp-sdk
GIT_TAG efddedf40b203e87fe295098c1b4e6eefb3168ed
GIT_TAG userver-main
GITHUB_REPOSITORY ydb-platform/ydb-cpp-sdk
OPTIONS
"Brotli_VERSION ${Brotli_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion ydb/include/userver/ydb/builder.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <ydb-cpp-sdk/client/params/params.h>
#include <ydb-cpp-sdk/v2/client/params/params.h>

#include <string>
#include <type_traits>
Expand Down
4 changes: 1 addition & 3 deletions ydb/include/userver/ydb/component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

#include <userver/ydb/fwd.hpp>

namespace NYdb {
class TDriver;
}
#include <ydb-cpp-sdk/v2/client/driver/fwd.h>

USERVER_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion ydb/include/userver/ydb/coordination.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <memory>
#include <string_view>

#include <ydb-cpp-sdk/client/coordination/coordination.h>
#include <ydb-cpp-sdk/v2/client/coordination/coordination.h>

USERVER_NAMESPACE_BEGIN

Expand Down
4 changes: 1 addition & 3 deletions ydb/include/userver/ydb/credentials.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#include <userver/components/component_base.hpp>
#include <userver/yaml_config/fwd.hpp>

namespace NYdb {
class ICredentialsProviderFactory;
} // namespace NYdb
#include <ydb-cpp-sdk/v2/client/types/fwd.h>

USERVER_NAMESPACE_BEGIN

Expand Down
6 changes: 1 addition & 5 deletions ydb/include/userver/ydb/exceptions.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
#pragma once

#include <ydb-cpp-sdk/client/types/status/status.h>
#include <ydb-cpp-sdk/v2/client/types/status/status.h>

#include <stdexcept>
#include <string>
#include <string_view>

namespace NYdb {
class TStatus;
} // namespace NYdb

USERVER_NAMESPACE_BEGIN

namespace ydb {
Expand Down
2 changes: 1 addition & 1 deletion ydb/include/userver/ydb/impl/string.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <ydb-cpp-sdk/client/types/credentials/credentials.h>
#include <ydb-cpp-sdk/v2/client/types/credentials/credentials.h>

USERVER_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion ydb/include/userver/ydb/io/list.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <ydb-cpp-sdk/client/value/value.h>
#include <ydb-cpp-sdk/v2/client/value/value.h>

#include <iterator>
#include <ranges>
Expand Down
4 changes: 2 additions & 2 deletions ydb/include/userver/ydb/io/structs.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <ydb-cpp-sdk/client/result/result.h>
#include <ydb-cpp-sdk/client/value/value.h>
#include <ydb-cpp-sdk/v2/client/result/result.h>
#include <ydb-cpp-sdk/v2/client/value/value.h>

#include <cstddef>
#include <memory>
Expand Down
14 changes: 3 additions & 11 deletions ydb/include/userver/ydb/io/traits.hpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
#pragma once

#include <ydb-cpp-sdk/v2/client/params/fwd.h>
#include <ydb-cpp-sdk/v2/client/value/fwd.h>

#include <string_view>
#include <type_traits>

namespace NYdb {
class TType;
class TValue;
class TValueParser;
class TValueBuilder;
class TParamValueBuilder;

template <typename Builder>
class TValueBuilderBase;
} // namespace NYdb

USERVER_NAMESPACE_BEGIN

namespace ydb {
Expand Down
20 changes: 3 additions & 17 deletions ydb/include/userver/ydb/response.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#pragma once

#include <ydb-cpp-sdk/client/result/result.h>
#include <ydb-cpp-sdk/client/table/table.h>
#include <ydb-cpp-sdk/v2/client/query/fwd.h>
#include <ydb-cpp-sdk/v2/client/result/result.h>
#include <ydb-cpp-sdk/v2/client/table/table.h>

#include <cstddef>
#include <iterator>
Expand All @@ -17,21 +18,6 @@
#include <userver/ydb/io/traits.hpp>
#include <userver/ydb/types.hpp>

namespace NYdb {
class TResultSetParser;
class TResultSet;
class TValueParser;

namespace NTable {
class TDataQueryResult;
class TTablePartIterator;
} // namespace NTable

namespace NQuery {
class TExecuteQueryResult;
} // namespace NQuery
} // namespace NYdb

USERVER_NAMESPACE_BEGIN

namespace ydb {
Expand Down
2 changes: 1 addition & 1 deletion ydb/include/userver/ydb/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <optional>
#include <string_view>

#include <ydb-cpp-sdk/client/table/query_stats/stats.h>
#include <ydb-cpp-sdk/v2/client/table/query_stats/stats.h>

#include <userver/yaml_config/fwd.hpp>

Expand Down
6 changes: 3 additions & 3 deletions ydb/include/userver/ydb/table.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <ydb-cpp-sdk/client/query/client.h>
#include <ydb-cpp-sdk/client/query/query.h>
#include <ydb-cpp-sdk/client/table/table.h>
#include <ydb-cpp-sdk/v2/client/query/client.h>
#include <ydb-cpp-sdk/v2/client/query/query.h>
#include <ydb-cpp-sdk/v2/client/table/table.h>

#include <userver/dynamic_config/source.hpp>
#include <userver/utils/statistics/fwd.hpp>
Expand Down
2 changes: 1 addition & 1 deletion ydb/include/userver/ydb/topic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <memory>
#include <string>

#include <ydb-cpp-sdk/client/topic/client.h>
#include <ydb-cpp-sdk/v2/client/topic/client.h>

USERVER_NAMESPACE_BEGIN

Expand Down
2 changes: 1 addition & 1 deletion ydb/src/ydb/exceptions.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <userver/ydb/exceptions.hpp>

#include <ydb-cpp-sdk/client/types/status/status.h>
#include <ydb-cpp-sdk/v2/client/types/status/status.h>

#include <fmt/format.h>

Expand Down
2 changes: 1 addition & 1 deletion ydb/src/ydb/impl/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <unordered_map>
#include <vector>

#include <ydb-cpp-sdk/client/types/credentials/credentials.h>
#include <ydb-cpp-sdk/v2/client/types/credentials/credentials.h>

#include <userver/dynamic_config/snapshot.hpp>
#include <userver/formats/json_fwd.hpp>
Expand Down
8 changes: 4 additions & 4 deletions ydb/src/ydb/impl/driver.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "driver.hpp"

#include <ydb-cpp-sdk/client/driver/driver.h>
#include <ydb-cpp-sdk/client/extensions/solomon_stats/pull_connector.h>
#include <ydb-cpp-sdk/client/iam/iam.h>
#include <ydb-cpp-sdk/client/types/credentials/credentials.h>
#include <ydb-cpp-sdk/v2/client/driver/driver.h>
#include <ydb-cpp-sdk/v2/client/extensions/solomon_stats/pull_connector.h>
#include <ydb-cpp-sdk/v2/client/iam/iam.h>
#include <ydb-cpp-sdk/v2/client/types/credentials/credentials.h>

#include <userver/utils/algo.hpp>
#include <userver/utils/text_light.hpp>
Expand Down
6 changes: 2 additions & 4 deletions ydb/src/ydb/impl/driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
#include <userver/utils/retry_budget.hpp>
#include <userver/utils/statistics/fwd.hpp>

#include <ydb-cpp-sdk/v2/client/driver/fwd.h>

namespace NMonitoring {
class TMetricRegistry;
} // namespace NMonitoring

namespace NYdb {
class TDriver;
}

USERVER_NAMESPACE_BEGIN

namespace ydb::impl {
Expand Down
4 changes: 2 additions & 2 deletions ydb/src/ydb/impl/future.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <library/cpp/threading/future/core/future.h>
#include <ydb-cpp-sdk/client/retry/retry.h>
#include <ydb-cpp-sdk/client/table/table.h>
#include <ydb-cpp-sdk/v2/client/retry/retry.h>
#include <ydb-cpp-sdk/v2/client/table/table.h>

#include <userver/drivers/subscribable_futures.hpp>
#include <userver/utils/not_null.hpp>
Expand Down
4 changes: 2 additions & 2 deletions ydb/src/ydb/impl/operation_settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include <chrono>

#include <ydb-cpp-sdk/client/retry/retry.h>
#include <ydb-cpp-sdk/client/types/request_settings.h>
#include <ydb-cpp-sdk/v2/client/retry/retry.h>
#include <ydb-cpp-sdk/v2/client/types/request_settings.h>

#include <userver/engine/deadline.hpp>
#include <userver/ydb/impl/cast.hpp>
Expand Down
2 changes: 1 addition & 1 deletion ydb/src/ydb/impl/request_context.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <ydb-cpp-sdk/client/retry/retry.h>
#include <ydb-cpp-sdk/v2/client/retry/retry.h>

#include <exception>

Expand Down
2 changes: 1 addition & 1 deletion ydb/src/ydb/impl/retry.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <ydb/impl/retry.hpp>

#include <ydb-cpp-sdk/library/issue/yql_issue.h>
#include <ydb-cpp-sdk/v2/library/issue/yql_issue.h>

#include <ydb/impl/operation_settings.hpp>

Expand Down
4 changes: 2 additions & 2 deletions ydb/src/ydb/impl/retry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <fmt/format.h>

#include <ydb-cpp-sdk/client/retry/retry.h>
#include <ydb-cpp-sdk/client/table/table.h>
#include <ydb-cpp-sdk/v2/client/retry/retry.h>
#include <ydb-cpp-sdk/v2/client/table/table.h>

#include <userver/utils/retry_budget.hpp>
#include <userver/ydb/exceptions.hpp>
Expand Down
2 changes: 1 addition & 1 deletion ydb/src/ydb/impl/type_category.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <ydb-cpp-sdk/client/value/value.h>
#include <ydb-cpp-sdk/v2/client/value/value.h>

#include <cstdint>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions ydb/src/ydb/io/insert_row.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <userver/ydb/io/insert_row.hpp>

#include <ydb-cpp-sdk/client/params/params.h>
#include <ydb-cpp-sdk/client/value/value.h>
#include <ydb-cpp-sdk/v2/client/params/params.h>
#include <ydb-cpp-sdk/v2/client/value/value.h>

#include <variant>

Expand Down
4 changes: 2 additions & 2 deletions ydb/src/ydb/io/primitives.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <userver/ydb/io/primitives.hpp>

#include <ydb-cpp-sdk/client/params/params.h>
#include <ydb-cpp-sdk/client/value/value.h>
#include <ydb-cpp-sdk/v2/client/params/params.h>
#include <ydb-cpp-sdk/v2/client/value/value.h>

#include <userver/compiler/demangle.hpp>
#include <userver/formats/json/serialize.hpp>
Expand Down
6 changes: 3 additions & 3 deletions ydb/src/ydb/response.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <userver/ydb/response.hpp>

#include <ydb-cpp-sdk/client/proto/accessor.h>
#include <ydb-cpp-sdk/client/result/result.h>
#include <ydb-cpp-sdk/client/table/table.h>
#include <ydb-cpp-sdk/v2/client/proto/accessor.h>
#include <ydb-cpp-sdk/v2/client/result/result.h>
#include <ydb-cpp-sdk/v2/client/table/table.h>

#include <userver/ydb/builder.hpp>
#include <userver/ydb/exceptions.hpp>
Expand Down
2 changes: 1 addition & 1 deletion ydb/tests/retry_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "test_utils.hpp"

#include <ydb-cpp-sdk/library/issue/yql_issue.h>
#include <ydb-cpp-sdk/v2/library/issue/yql_issue.h>

#include <ydb/impl/future.hpp>
#include <ydb/impl/retry.hpp>
Expand Down
2 changes: 1 addition & 1 deletion ydb/tests/schema_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <userver/utest/utest.hpp>

#include <ydb-cpp-sdk/client/types/status/status.h>
#include <ydb-cpp-sdk/v2/client/types/status/status.h>

#include <userver/ydb/exceptions.hpp>
#include <userver/ydb/impl/cast.hpp>
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/test_utils.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <ydb-cpp-sdk/client/table/table.h>
#include <ydb-cpp-sdk/client/topic/client.h>
#include <ydb-cpp-sdk/v2/client/table/table.h>
#include <ydb-cpp-sdk/v2/client/topic/client.h>

#include <userver/dynamic_config/test_helpers.hpp>
#include <userver/utest/utest.hpp>
Expand Down

0 comments on commit a5f92cc

Please sign in to comment.