diff --git a/ydb/apps/version/version_definition.cpp b/ydb/apps/version/version_definition.cpp new file mode 100644 index 000000000000..4cfb93b74f79 --- /dev/null +++ b/ydb/apps/version/version_definition.cpp @@ -0,0 +1,11 @@ +#include + +NKikimrConfig::TCurrentCompatibilityInfo NKikimr::TCompatibilityInfo::MakeCurrent() { + using TCurrentConstructor = NKikimr::TCompatibilityInfo::TProtoConstructor::TCurrentCompatibilityInfo; + // using TVersionConstructor = NKikimr::TCompatibilityInfo::TProtoConstructor::TVersion; + // using TCompatibilityRuleConstructor = NKikimr::TCompatibilityInfo::TProtoConstructor::TCompatibilityRule; + + return TCurrentConstructor{ + .Application = "ydb", + }.ToPB(); +} diff --git a/ydb/apps/version/ya.make b/ydb/apps/version/ya.make new file mode 100644 index 000000000000..d3b1eb34a7f1 --- /dev/null +++ b/ydb/apps/version/ya.make @@ -0,0 +1,11 @@ +LIBRARY(version_definition) + +SRCS( + version_definition.cpp +) + +PEERDIR( + ydb/core/driver_lib/version +) + +END() diff --git a/ydb/core/driver_lib/version/version.cpp b/ydb/core/driver_lib/version/version.cpp index 4781640d0339..adc22dfeeca6 100644 --- a/ydb/core/driver_lib/version/version.cpp +++ b/ydb/core/driver_lib/version/version.cpp @@ -17,18 +17,14 @@ using EComponentId = NKikimrConfig::TCompatibilityRule; using TComponentId = NKikimrConfig::TCompatibilityRule::EComponentId; TCompatibilityInfo::TCompatibilityInfo() { - using TCurrentConstructor = TCompatibilityInfo::TProtoConstructor::TCurrentCompatibilityInfo; using TStoredConstructor = TCompatibilityInfo::TProtoConstructor::TStoredCompatibilityInfo; - // using TCompatibilityRuleConstructor = TCompatibilityInfo::TProtoConstructor::TCompatibilityRule; using TVersionConstructor = TCompatibilityInfo::TProtoConstructor::TVersion; ///////////////////////////////////////////////////////// // Current CompatibilityInfo ///////////////////////////////////////////////////////// - auto current = TCurrentConstructor{ - .Application = "ydb" - }.ToPB(); + auto current = MakeCurrent(); // bool success = CompleteFromTag(current); // Y_ABORT_UNLESS(success); diff --git a/ydb/core/driver_lib/version/version.h b/ydb/core/driver_lib/version/version.h index 1ecf76cb9e28..a18b2ad0cb5b 100644 --- a/ydb/core/driver_lib/version/version.h +++ b/ydb/core/driver_lib/version/version.h @@ -141,6 +141,8 @@ class TCompatibilityInfo { bool CompleteFromTag(NKikimrConfig::TCurrentCompatibilityInfo& current); + static NKikimrConfig::TCurrentCompatibilityInfo MakeCurrent(); + NKikimrConfig::TStoredCompatibilityInfo MakeStored(TComponentId componentId) const; NKikimrConfig::TStoredCompatibilityInfo MakeStored(TComponentId componentId, const NKikimrConfig::TCurrentCompatibilityInfo* current) const; diff --git a/ydb/core/mind/bscontroller/ut_selfheal/ya.make b/ydb/core/mind/bscontroller/ut_selfheal/ya.make index c3b4ba285713..1189fc7e7025 100644 --- a/ydb/core/mind/bscontroller/ut_selfheal/ya.make +++ b/ydb/core/mind/bscontroller/ut_selfheal/ya.make @@ -16,6 +16,7 @@ SRCS( ) PEERDIR( + ydb/apps/version ydb/core/blobstorage/dsproxy/mock ydb/core/blobstorage/pdisk/mock ydb/core/mind/bscontroller