#2690 Validate cg_import data format
Opened 3 years ago by tkopecek. Modified 3 years ago

We've a comment there to use jsonschema or something similar to run against json before the import. It should make errors more understandable than some later traceback on missing key, etc.


Metadata Update from @tkopecek:
- Custom field Size adjusted to None
- Issue untagged with: bug

3 years ago

OSBS uses jsonschema to validate task parameters that users submit to buildContainer. See PARAMS_SCHEMA.

I've created basic validation schema and it has about ~230 lines of json. Now I'm thinking about integration. I would like to have it in separate json file

1) Others can use it
2) it is quite ugly to put it into hub code.

So, it seems to me that best solution would be to provide it in basic rpm koji package as it is python version independent. We also need it in PyPi installation. Trouble is how the library would know where the file is in different installations (virtualenv, rpm installation, etc). I'm not sure what should be suitable option here.

@mikem @yzhu @ktdreyer

Can we contact the teams that maintain content generators and ask them how they would prefer to consume this? For example, how will the PNC team want to use this? Bundle it into kojiji or something else? Same re: OSBS, CoreOS, etc.

Sent e-mail to koji-devel.

Login to comment on this ticket.

Metadata