summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInnokentii Mokin <[email protected]>2026-07-17 16:12:22 +0400
committerGitHub <[email protected]>2026-07-17 12:12:22 +0000
commitbf1d8a6217bf977f172d5def68f8308819be5d09 (patch)
treedb8dc78c3725d43dd7d836933faa37543ba6b1a1
parent74bd09e4c556f531a48a9ad53df5f56e920aca09 (diff)
ut_transform: redact source line numbers in golden error results (#46796)
-rw-r--r--ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_/bridge-mirror-3dc-3-nodes.yaml.result.json2
-rw-r--r--ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_ds_init_/nvme.yaml.result.json2
-rw-r--r--ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-missing-all.yaml.result.json2
-rw-r--r--ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-unmatched-types.yaml.result.json2
-rw-r--r--ydb/library/yaml_config/ut_transform/test_transform.py3
5 files changed, 7 insertions, 4 deletions
diff --git a/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_/bridge-mirror-3dc-3-nodes.yaml.result.json b/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_/bridge-mirror-3dc-3-nodes.yaml.result.json
index 03c0eff44ab..5535856d7a0 100644
--- a/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_/bridge-mirror-3dc-3-nodes.yaml.result.json
+++ b/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_/bridge-mirror-3dc-3-nodes.yaml.result.json
@@ -1 +1 @@
-{"error": true, "stderr": "Terminating due to uncaught exception REDACTED what() -> \"ydb/library/yaml_config/deprecated/yaml_config_parser.cpp:524: Condition violated: `json.Has(\"domains_config\")'\"\n of type TWithBackTrace<yexception>\n"} \ No newline at end of file
+{"error": true, "stderr": "Terminating due to uncaught exception REDACTED what() -> \"ydb/library/yaml_config/deprecated/yaml_config_parser.cpp:LINE: Condition violated: `json.Has(\"domains_config\")'\"\n of type TWithBackTrace<yexception>\n"} \ No newline at end of file
diff --git a/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_ds_init_/nvme.yaml.result.json b/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_ds_init_/nvme.yaml.result.json
index 3258d0240f3..e6a38f5c612 100644
--- a/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_ds_init_/nvme.yaml.result.json
+++ b/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_basic_args1-dump_ds_init_/nvme.yaml.result.json
@@ -1 +1 @@
-{"error": true, "stderr": "Terminating due to uncaught exception REDACTED what() -> \"ydb/library/yaml_config/deprecated/yaml_config_parser.cpp:855: Specify host_configs to use blobstorage init command\"\n of type TWithBackTrace<yexception>\n"} \ No newline at end of file
+{"error": true, "stderr": "Terminating due to uncaught exception REDACTED what() -> \"ydb/library/yaml_config/deprecated/yaml_config_parser.cpp:LINE: Specify host_configs to use blobstorage init command\"\n of type TWithBackTrace<yexception>\n"} \ No newline at end of file
diff --git a/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-missing-all.yaml.result.json b/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-missing-all.yaml.result.json
index 05e8c719426..fde319c6f3c 100644
--- a/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-missing-all.yaml.result.json
+++ b/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-missing-all.yaml.result.json
@@ -1 +1 @@
-{"error": true, "stderr": "Terminating due to uncaught exception REDACTED what() -> \"ydb/library/yaml_config/yaml_config_parser.cpp:929: Erasure species is not specified for storage pool type, id 0\"\n of type TWithBackTrace<yexception>\n"} \ No newline at end of file
+{"error": true, "stderr": "Terminating due to uncaught exception REDACTED what() -> \"ydb/library/yaml_config/yaml_config_parser.cpp:LINE: Erasure species is not specified for storage pool type, id 0\"\n of type TWithBackTrace<yexception>\n"} \ No newline at end of file
diff --git a/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-unmatched-types.yaml.result.json b/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-unmatched-types.yaml.result.json
index 22db056e8af..5654c9d8a66 100644
--- a/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-unmatched-types.yaml.result.json
+++ b/ydb/library/yaml_config/ut_transform/canondata/test_transform.TestYamlConfigTransformations.test_domains_config_dump_/multinode-unmatched-types.yaml.result.json
@@ -1 +1 @@
-{"error": true, "stderr": "Terminating due to uncaught exception REDACTED what() -> \"ydb/library/yaml_config/yaml_config_parser.cpp:933: Disk type is not specified for storage pool type, id 0\"\n of type TWithBackTrace<yexception>\n"} \ No newline at end of file
+{"error": true, "stderr": "Terminating due to uncaught exception REDACTED what() -> \"ydb/library/yaml_config/yaml_config_parser.cpp:LINE: Disk type is not specified for storage pool type, id 0\"\n of type TWithBackTrace<yexception>\n"} \ No newline at end of file
diff --git a/ydb/library/yaml_config/ut_transform/test_transform.py b/ydb/library/yaml_config/ut_transform/test_transform.py
index 4a404a6c20a..98444bafee5 100644
--- a/ydb/library/yaml_config/ut_transform/test_transform.py
+++ b/ydb/library/yaml_config/ut_transform/test_transform.py
@@ -54,6 +54,9 @@ class TestYamlConfigTransformations(object):
def cleanup_errors(self, errors):
errors = re.sub(r'address -> 0x[a-zA-Z0-9]+', 'address -> REDACTED', errors)
errors = re.sub(r'uncaught exception 0x[a-fA-F0-9]+', 'uncaught exception REDACTED', errors)
+ # Redact source line numbers so the golden results don't break on every
+ # unrelated edit that shifts lines in the referenced source file.
+ errors = re.sub(r'(\.(?:cpp|cc|cxx|h|hpp)):\d+', r'\1:LINE', errors)
return errors
def execute_test(self, data, binary, args=[]):