Skip to content

Commit 1b58af3

Browse files
eivanov89Copilot
andauthored
Run YDBD in docker with in --tiny-mode (#27759) (#28571)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5494a1b commit 1b58af3

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

.github/docker/files/initialize_local_ydb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export GRPC_TLS_PORT=${GRPC_TLS_PORT:-2135}
88
export GRPC_PORT=${GRPC_PORT:-2136}
99
export YDB_GRPC_TLS_DATA_PATH="/ydb_certs"
1010
export YDB_KAFKA_PROXY_PORT=${YDB_KAFKA_PROXY_PORT:-9092}
11+
export YDB_TINY_MODE="true"
1112

1213
# Start local_ydb tool. Pass additional arguments for local_ydb
1314
/local_ydb deploy --ydb-working-dir /ydb_data --ydb-binary-path /ydbd --fixed-ports --dont-use-log-files "$@";

ydb/public/tools/lib/cmds/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ def enable_tls():
257257
return os.getenv('YDB_GRPC_ENABLE_TLS') == 'true'
258258

259259

260+
def is_tiny_mode():
261+
return os.getenv('YDB_TINY_MODE') == 'true'
262+
263+
260264
def report_monitoring_info():
261265
return os.getenv('YDB_REPORT_MONITORING_INFO') == 'true'
262266

@@ -362,6 +366,9 @@ def deploy(arguments):
362366
for service in services:
363367
enabled_grpc_services.append(service)
364368

369+
if is_tiny_mode():
370+
optionals['tiny_mode'] = True
371+
365372
configuration = KikimrConfigGenerator(
366373
erasure=parse_erasure(arguments),
367374
binary_paths=[arguments.ydb_binary_path] if arguments.ydb_binary_path else None,

ydb/tests/library/harness/kikimr_config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ def __init__(
187187
enable_static_auth=False,
188188
cms_config=None,
189189
explicit_statestorage_config=None,
190-
protected_mode=False
190+
protected_mode=False,
191+
tiny_mode=False,
191192
):
192193
if extra_feature_flags is None:
193194
extra_feature_flags = []
@@ -273,6 +274,8 @@ def __init__(
273274
self.yq_tenant = yq_tenant
274275
self.dc_mapping = dc_mapping
275276

277+
self.tiny_mode = tiny_mode
278+
276279
self.__bs_cache_file_path = bs_cache_file_path
277280

278281
self.yaml_config = _load_default_yaml(self.__node_ids, self.domain_name, self.static_erasure, self.__additional_log_configs)

ydb/tests/library/harness/kikimr_runner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ def __make_run_command(self):
262262
if self.__configurator.breakpad_minidumps_script:
263263
command.extend(["--breakpad-minidumps-script", self.__configurator.breakpad_minidumps_script])
264264

265+
if getattr(self.__configurator, "tiny_mode", False):
266+
command.append("--tiny-mode")
267+
265268
logger.info('CFG_DIR_PATH="%s"', self.__config_path)
266269
logger.info("Final command: %s", ' '.join(command).replace(self.__config_path, '$CFG_DIR_PATH'))
267270
return command

0 commit comments

Comments
 (0)