Closed belforte closed 4 months ago
problem is here https://github.com/dmwm/CRABServer/blob/b959b782d96fd7d0ca4e163475633c0492ce7c05/src/python/CRABInterface/RESTUserWorkflow.py#L364-L365
iin this case inputDataFromRucio
is not defined
Validation of the proper combination, correct LFN's etc. will have to be done in TaskWorker. REST's RX-based validation does nto allow to do better than accept any string for userInputFiles
now submittion with userInputFiles
only fails because modified code tries to validate inputDataset
The server answered with an error.
Server answered with: Invalid input parameter
Reason is: Incorrect 'Data.inputDataset' parameter <class 'str'>
The reasong is that optional=True
does not work for inputdata
in e.g.
https://github.com/dmwm/CRABServer/blob/19b179e7708b84731c11df9948039211852de1a1/src/python/CRABInterface/RESTUserWorkflow.py#L375
because the in cases like this (or fpr privateMC) the client puts in the URL "nothing" &inputdata=&
but the REST codes sees a empty string ''
as value, not None
or no keywork, so the optional
in the validation does not do anything https://github.com/dmwm/WMCore/blob/e4628ce9ab25f5015b71197a42eb09d630286318/src/python/WMCore/REST/Validation.py#L79
def _validate_one(argname, param, safe, checker, optional, *args):
val = param.kwargs.get(argname, None)
if optional and val == None:
safe.kwargs[argname] = None
else:
safe.kwargs[argname] = checker(argname, val, *args)
del param.kwargs[argname]
I am fixing the REST now. But I think the Client should simply omit the inputdata
parame in the URL instead of specifyiin w/o a value. But I suspect that there are palces in the code where that ''
is used :-( Maybe there was a conscious decision to have an empty string in Oracle instead of NULL
I could try to replace ''
with None
in this line https://github.com/dmwm/CRABClient/blob/d4b4151f668ba23cb069569e9613c83776630f6b/src/python/CRABClient/ClientMapping.py#L24
'inputdata' : {'default': '', 'config': ['Data.inputDataset'], 'type': 'StringType', 'required': False},
closed via #8399
needed for #8371 and https://github.com/dmwm/CRABClient/issues/5308
currently when bypassing the client check I get a server error