dmwm / dbs2go

DBS server written in Go
MIT License
5 stars 4 forks source link

`output_module_label` Parameter not working in `/datasets` APIs #22

Closed d-ylee closed 2 years ago

d-ylee commented 2 years ago

Doing a GET request on /datasets with the output_module_label returns an error. This is reflected on cmsweb-testbed: https://cmsweb-testbed.cern.ch/dbs/int/global/DBSReader/datasets?detail=true&output_module_label=147

A reason for this was having extra commas in static/sql/datasets.sql https://github.com/dmwm/dbs2go/blob/50f05b9495b098adae976e52c91777996b99c6ac/static/sql/datasets.sql#L23-L28

Additionally, while reviewing the integration tests for datasets APIs, I discovered that the dbs/datasets.InsertDatasets does not actually use the OUTPUT_CONFIGS information as stated in the comment: https://github.com/dmwm/dbs2go/blob/50f05b9495b098adae976e52c91777996b99c6ac/dbs/datasets.go#L455

As a result, the DATASET_OUTPUT_MOD_CONFIGS table has no rows after tests.

What may need to be added to or modified in the datasets APIs:

vkuznet commented 2 years ago

@d-ylee , I think we can close this issue as you provided everything in #23, right?

d-ylee commented 2 years ago

@vkuznet Yup. I think we can close this.