From f9e2e11507930ffff5de854fb01e85b041d42725 Mon Sep 17 00:00:00 2001 From: Rahul Chauhan Date: Wed, 20 Mar 2024 10:29:25 +0100 Subject: [PATCH] Update datatier regex to match with WMCore and DBS expressions set name same as lfn length; 500 --- src/policy/CMSRucioPolicy/schema.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/policy/CMSRucioPolicy/schema.py b/src/policy/CMSRucioPolicy/schema.py index 0126823..524d301 100644 --- a/src/policy/CMSRucioPolicy/schema.py +++ b/src/policy/CMSRucioPolicy/schema.py @@ -54,20 +54,20 @@ "pattern": "\\w"} CMS_LFN_LENGTH = 500 -CMS_DATASET_CORE = r'/[a-zA-Z0-9\-_]{1,99}/[a-zA-Z0-9\.\-_]{1,199}/[A-Z0-9\-]{1,50}' +CMS_DATASET_CORE = r'/[a-zA-Z0-9\-_]{1,99}/[a-zA-Z0-9\.\-_]{1,199}/[A-Z0-9\-]{1,99}' CMS_BLOCK_PART = r'[a-zA-Z0-9\.\-_]{1,100}' CMS_DATASET = r'^%s$' % CMS_DATASET_CORE CMS_BLOCK = r'^%s#%s$' % (CMS_DATASET_CORE, CMS_BLOCK_PART) # Valid dataset name and block separated by # CMS_LFN = r'^\/store\/[A-Za-z0-9][A-Za-z0-9\.\-\_\/]{1,%s}$' % (CMS_LFN_LENGTH - len('/store/')) -CMS_BLOCK_LENGTH = 100 + 200 + 51 + 101 +CMS_BLOCK_LENGTH = 100 + 200 + 100 + 101 # dataset + # + block NAME = {"description": "Data Identifier name", "type": "string", "pattern": r"%s|%s|%s" % (CMS_DATASET, CMS_BLOCK, CMS_LFN)} -NAME_LENGTH = max(CMS_LFN_LENGTH, CMS_BLOCK_LENGTH) +NAME_LENGTH = CMS_LFN_LENGTH # read name R_NAME = NAME