aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorauzhegov <auzhegov@yandex-team.com>2023-06-08 15:11:23 +0300
committerauzhegov <auzhegov@yandex-team.com>2023-06-08 15:11:23 +0300
commit51b3066edda71a1c65129e7e5f85aac77a4138b2 (patch)
tree14a4de3ede17bec76ae047936ba18e080005f673
parenta2cacd6516597be1cb46d9965500435db5ffad64 (diff)
downloadydb-51b3066edda71a1c65129e7e5f85aac77a4138b2.tar.gz
added extra parameters for KikimrConfigGenerator
-rw-r--r--ydb/public/tools/lib/cmds/__init__.py4
-rw-r--r--ydb/public/tools/local_ydb/__main__.py16
-rw-r--r--ydb/tests/library/harness/kikimr_config.py24
3 files changed, 38 insertions, 6 deletions
diff --git a/ydb/public/tools/lib/cmds/__init__.py b/ydb/public/tools/lib/cmds/__init__.py
index 0e26472ffeb..123e5c64433 100644
--- a/ydb/public/tools/lib/cmds/__init__.py
+++ b/ydb/public/tools/lib/cmds/__init__.py
@@ -31,6 +31,8 @@ class EmptyArguments(object):
self.fixed_ports = False
self.public_http_config_path = None
self.dont_use_log_files = False
+ self.enabled_feature_flags = []
+ self.enabled_grpc_services = []
def ensure_path_exists(path):
@@ -317,6 +319,8 @@ def deploy(arguments):
auth_config_path=arguments.auth_config_path,
use_log_files=not arguments.dont_use_log_files,
default_users=default_users(),
+ extra_feature_flags=arguments.enabled_feature_flags,
+ extra_grpc_services=arguments.enabled_grpc_services,
**optionals
)
diff --git a/ydb/public/tools/local_ydb/__main__.py b/ydb/public/tools/local_ydb/__main__.py
index 5179a519290..73aa285f703 100644
--- a/ydb/public/tools/local_ydb/__main__.py
+++ b/ydb/public/tools/local_ydb/__main__.py
@@ -97,6 +97,22 @@ To update cluster (stop + start):
help='The path to Federated Query config'
)
sub_parser.add_argument(
+ '--enable-feature-flag',
+ default=[],
+ action='append',
+ type=str,
+ dest="enabled_feature_flags",
+ help='Enable feature flag'
+ )
+ sub_parser.add_argument(
+ '--enable-grpc-service',
+ default=[],
+ action='append',
+ type=str,
+ dest="enabled_grpc_services",
+ help='Enables GRPC service'
+ )
+ sub_parser.add_argument(
'--suppress-version-check', default=False, action='store_true',
help='Should suppress version check',
)
diff --git a/ydb/tests/library/harness/kikimr_config.py b/ydb/tests/library/harness/kikimr_config.py
index 303657459ed..93ee05a74e6 100644
--- a/ydb/tests/library/harness/kikimr_config.py
+++ b/ydb/tests/library/harness/kikimr_config.py
@@ -1,20 +1,21 @@
# -*- coding: utf-8 -*-
-import sys
+import copy
import itertools
import os
-import tempfile
import socket
+import sys
+import tempfile
+
import six
import yaml
-import copy
+from google.protobuf.text_format import Parse
from pkg_resources import resource_string
-from google.protobuf.text_format import Parse
-from ydb.core.protos import config_pb2
import ydb.tests.library.common.yatest_common as yatest_common
+from ydb.core.protos import config_pb2
+from ydb.tests.library.common.types import Erasure
from . import tls_tools
-from ydb.tests.library.common.types import Erasure
from .kikimr_port_allocator import KikimrPortManagerPortAllocator
from .param_constants import kikimr_driver_path
from .util import LogLevels
@@ -144,7 +145,14 @@ class KikimrConfigGenerator(object):
disable_iterator_lookups=False,
overrided_actor_system_config=None,
default_users=None, # dict[user]=password
+ extra_feature_flags=None, # list[str]
+ extra_grpc_services=None, # list[str]
):
+ if extra_feature_flags is None:
+ extra_feature_flags = []
+ if extra_grpc_services is None:
+ extra_grpc_services = []
+
self._version = version
self.use_log_files = use_log_files
self.suppress_version_check = suppress_version_check
@@ -231,6 +239,8 @@ class KikimrConfigGenerator(object):
self.yaml_config["feature_flags"]["enable_public_api_external_blobs"] = enable_public_api_external_blobs
self.yaml_config["feature_flags"]["enable_mvcc"] = "VALUE_FALSE" if disable_mvcc else "VALUE_TRUE"
+ for extra_feature_flag in extra_feature_flags:
+ self.yaml_config["feature_flags"][extra_feature_flag] = True
if enable_alter_database_create_hive_first:
self.yaml_config["feature_flags"]["enable_alter_database_create_hive_first"] = enable_alter_database_create_hive_first
self.yaml_config['pqconfig']['enabled'] = enable_pq
@@ -251,6 +261,8 @@ class KikimrConfigGenerator(object):
for service_type in pq_client_service_types:
self.yaml_config['pqconfig']['client_service_type'].append({'name': service_type})
+ self.yaml_config['grpc_config']['services'].extend(extra_grpc_services)
+
# NOTE(shmel1k@): change to 'true' after migration to YDS scheme
self.yaml_config['sqs_config']['enable_sqs'] = enable_sqs
self.yaml_config['pqcluster_discovery_config']['enabled'] = enable_pqcd