aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprettyboy <prettyboy@yandex-team.com>2023-07-06 15:02:46 +0300
committerprettyboy <prettyboy@yandex-team.com>2023-07-06 15:02:46 +0300
commitbb30ab7a23c89a26e3663cbecc398decc46c7d93 (patch)
tree9713a8dfabdcb7ac5887f72aaf47299f737b701c
parentecee0af8aa2ae702aae742aacbb12fab5e3512d7 (diff)
downloadydb-bb30ab7a23c89a26e3663cbecc398decc46c7d93.tar.gz
[build/plugins/ytest] Verify tag prefixes
-rw-r--r--build/plugins/ytest.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py
index 796041b2cb..47886ff6a9 100644
--- a/build/plugins/ytest.py
+++ b/build/plugins/ytest.py
@@ -140,7 +140,18 @@ def validate_test(unit, kw):
invalid_requirements_for_distbuild = [
requirement for requirement in requirements.keys() if requirement not in ('ram', 'ram_disk', 'cpu', 'network')
]
- sb_tags = [tag for tag in tags if tag.startswith('sb:')]
+
+ sb_tags = []
+ # XXX Unfortunately, some users have already started using colons
+ # in their tag names. Use skip set to avoid treating their tag as system ones.
+ # Remove this check when all such user tags are removed.
+ skip_set = ('ynmt_benchmark', 'bert_models', 'zeliboba_map')
+ # Verify the prefixes of the system tags to avoid pointless use of the REQUIREMENTS macro parameters in the TAG macro.
+ for tag in tags:
+ if tag.startswith('sb:'):
+ sb_tags.append(tag)
+ elif ':' in tag and not tag.startswith('ya:') and tag.split(':')[0] not in skip_set:
+ errors.append("Only [[imp]]sb:[[rst]] and [[imp]]ya:[[rst]] prefixes are allowed in system tags: {}".format(tag))
if is_fat:
if size != consts.TestSize.Large: