From 6b83ccec730fc376089c63d10cb2a2a8b9750575 Mon Sep 17 00:00:00 2001 From: Nikita Unisikhin Date: Thu, 5 Dec 2024 15:44:59 +0300 Subject: [PATCH] debug --- Makefile | 12 ++++++------ ch_tools/monrun_checks/ch_orphaned_objects.py | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7cea3fe3..56f3bbd6 100644 --- a/Makefile +++ b/Makefile @@ -78,9 +78,9 @@ export DEB_BUILD_DISTRIBUTION ?= define ensure_poetry - if [ ! -e $(POETRY) ]; then - echo "Poetry could not be found. Please install it manually 'make install-poetry'"; - exit 1; + if [ ! -e $(POETRY) ]; then \ + echo "Poetry could not be found. Please install it manually 'make install-poetry'"; \ + exit 1; \ fi endef @@ -203,9 +203,9 @@ test-unit: install-deps .PHONY: test-integration test-integration: install-deps build-python-packages - cd $(TESTS_DIR) - export PYTHONPATH=$(CURDIR):$$PATH - $(POETRY) run behave --show-timings --stop --junit $(BEHAVE_ARGS) + cd $(TESTS_DIR) && \ + export PYTHONPATH=$(CURDIR):$$PATH && \ + $(POETRY) run behave --show-timings --stop --junit $(BEHAVE_ARGS) -i monrun.feature .PHONY: publish diff --git a/ch_tools/monrun_checks/ch_orphaned_objects.py b/ch_tools/monrun_checks/ch_orphaned_objects.py index c0b4030c..cbc9a1ef 100644 --- a/ch_tools/monrun_checks/ch_orphaned_objects.py +++ b/ch_tools/monrun_checks/ch_orphaned_objects.py @@ -107,5 +107,10 @@ def _zk_get_orphaned_objects_state( def _error_message_format(error_msg: str) -> str: + print( + error_msg + == "Code: 27. DB::Exception: Cannot parse input: expected '\\t' before: 'klg%2D1acvr8hmq0n16qm5%2Edb%2Eyandex%2Enet\\ndefault\\n6736d483-516a-4892-87d4-084d5c1f6d3c\\n': While executing SystemRemoteDataPaths. (CANNOT_PARSE_INPUT_ASSERTION_FAILED) (version 24.8.5.115 (official build)) Query: SELECT obj_path, obj_size FROM _system.listing_objects_from_object_storage AS object_storage LEFT ANTI JOIN remoteSecure('klg-1acvr8hmq0n16qm5.db.yandex.net', system.remote_data_paths) AS object_table ON object_table.remote_path = object_storage.obj_path AND object_table.disk_name = 'object_storage' SETTINGS traverse_shadow_remote_data_paths=1 FORMAT TabSeparated (klg-1acvr8hmq0n16qm5.mdb.yandex.net)" + ) + error_msg = "Code: 27. DB::Exception: Cannot parse input: expected '\\t' before: 'klg%2D1acvr8hmq0n16qm5%2Edb%2Eyandex%2Enet\\ndefault\\n6736d483-516a-4892-87d4-084d5c1f6d3c\\n': While executing SystemRemoteDataPaths. (CANNOT_PARSE_INPUT_ASSERTION_FAILED) (version 24.8.5.115 (official build)) Query: SELECT obj_path, obj_size FROM _system.listing_objects_from_object_storage AS object_storage LEFT ANTI JOIN remoteSecure('klg-1acvr8hmq0n16qm5.db.yandex.net', system.remote_data_paths) AS object_table ON object_table.remote_path = object_storage.obj_path AND object_table.disk_name = 'object_storage' SETTINGS traverse_shadow_remote_data_paths=1 FORMAT TabSeparated (klg-1acvr8hmq0n16qm5.mdb.yandex.net)" error_msg = re.sub(ERROR_MESSAGE_PATTERN, r"\1...\2", error_msg) return error_msg