Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid query for files REST API and listFiles client API #598

Closed
amaltaro opened this issue Mar 5, 2019 · 8 comments
Closed

Invalid query for files REST API and listFiles client API #598

amaltaro opened this issue Mar 5, 2019 · 8 comments

Comments

@amaltaro
Copy link
Contributor

amaltaro commented Mar 5, 2019

@yuyiguo Yuyi, I was going to investigate some possible duplicate lumi sections in a dataset and I can't make my query to work. I tried both REST and python client APIs and I hit the same issue regarding input parameters.

My use case is, provided a dataset and a lumi list, return the files that match those parameters. When I run it, DBSServer complains that I need to specify a run_num when using lumi_list. If I do so, like in this example:
https://cmsweb.cern.ch/dbs/prod/global/DBSReader/files?dataset=/TTJets_SingleLeptFromT_TuneCP5_13TeV-madgraphMLM-pythia8/RunIIAutumn18DRPremix-102X_upgrade2018_realistic_v15-v1/AODSIM&run_num=1&lumi_list=[252052,240646]

it returns:
{"exception": 400, "type": "HTTPError", "message": "Run_num=1 is not a valid input."}

Same problem with the python client API. I believe the problem is that when providing a lumi_list, I actually cannot use a dataset parameter, but I need to use either block or file, correct? If so, can you then please fix the error message?

@yuyiguo
Copy link
Member

yuyiguo commented Mar 5, 2019

Alan,

DBS no longer support run_num=1 search with block or dataset. If run_num=1, the query has to be limit to file level. Maybe the error message should be something like when use run_num=1, LFN is expected.

@amaltaro
Copy link
Contributor Author

amaltaro commented Mar 5, 2019

Do I understand correct that if lumi_list is provided, then run_num is required?
If so, then I think the error message can be something like
lumi_list and/or run_num=1 is not supported for dataset/block_name, a logical_file_name must be provided.

@vkuznet
Copy link
Contributor

vkuznet commented Mar 5, 2019 via email

@yuyiguo
Copy link
Member

yuyiguo commented Mar 5, 2019 via email

@amaltaro
Copy link
Contributor Author

amaltaro commented Mar 5, 2019

Anytime a lumi is present, a run num is required.

this part seems to be properly reported already.

The only thing here is the run_num=1 is not support when dataset/block is provided

this is not. The error message is wrong and misleading. I'm sure you can come up with an error message better than the ones I suggested above ;)

@amaltaro
Copy link
Contributor Author

@yuyiguo Hi Yuyi, if you agree with making the message more clear, could you please make these changes for the upcoming CMSWEB release?

@yuyiguo
Copy link
Member

yuyiguo commented Apr 22, 2020

@amaltaro
Alan, The may release deadline is past. I will make the change for June release.

@yuyiguo
Copy link
Member

yuyiguo commented May 1, 2020

@amaltaro

I fixed the error messages and am closing this issue. If there is more questions on error messages, please open a new one.

@yuyiguo yuyiguo closed this as completed May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants