Closed belforte closed 9 years ago
@mmascher does this apply to Crab3 as well ? Or do you have this check already ? In crab2 I had a check on the directory name, not on the file name (which may not even be in crab.cfg but only in the cmssw one).
Hi Stefano,
do you know which method of Lexicon DBS is using to validate the filename? That's the regexp we are using to validate the edmfiles: https://github.com/dmwm/CRABServer/blob/master/src/python/CRABInterface/Regexps.py#L35 , which contains a '.'... (In addition I am checking that it's less than 255 chars)
If there is a single regexp I can extract from Lexicon, like I did for the searchdataset
(https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/Lexicon.py#L78) I can import it and use it. Maybe it's https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/Lexicon.py#L31 ?
need to look it up, it is tricky because LFN for CRAB is more free then for WMA. It will be something like Lexicon.lfn(name) https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/Lexicon.py#L240 But there is also https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/Lexicon.py#L352
as usual it seemed all clear at the time I was using this for publication (last winter), then time passed ... :-(
I was fearing it was the lfn
method. I am not happy about calling it in the CRAB server, it does check 10 different regexps. I prefer to extract the single regexps we need and use them, as I did for the serachdataset.
Maybe @yuyiguo can suggest me where to look in DBS3 for the regexps it uses
https://github.com/dmwm/WMCore/blob/master/src/python/WMCore/Lexicon.py#L240 is what used in DBS. I don't know who is using the userlfn. There are morn than one type of lfns used in CMS and DBS has to check it in a single function call.
@mmascher that's also what Crab2 does. You should stay with that, or suggest a modifciation to the Lexicon, but not build your own version of it, less things diverge in long run.
Given that we never did this in Crab2, and only had one problem with one user once, and that Crab2 is end of life. And given that messing with the code that extracts output file names from config. is dangerous. Let's live with this until Crab3.
see https://hypernews.cern.ch/HyperNews/CMS/get/crabFeedback/7673/2/1/1/1.html