Remove jsonschema as a dependency

Bug #1462937 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance_store
Confirmed
Wishlist
Unassigned

Bug Description

The filesystem store uses jsonschema to parse the metadata files. While jsonschema does the validation job very well, I believe it's an unnecessary dependency for such a small validation to do and for such a small use-case.

I'd rather have this specific check done directly when accessing these values in python than having an extra dependency.

Tags: lite-spec
Changed in glance-store:
assignee: nobody → Flavio Percoco (flaper87)
Revision history for this message
Louis Taylor (kragniz) wrote :

I don't have much of a preference on this. On the one hand, utilizing it rather than reinventing the wheel for checking the json format is probably better, and it's not a large overhead since a lot of openstack also has it as a dependency. As you say, though, we're basically using it to check two values in one place in the code, which seems like overkill:
    https://github.com/openstack/glance_store/blob/cb4c615e8495590983330b01c0cdaa272abf1181/glance_store/_drivers/filesystem.py#L72-82

Changed in glance-store:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Ian Cordasco (icordasc) wrote :

Yeah, I agree with everything Louis said. The block where it's actually used could definitely use a lot of re-factoring though.

Changed in glance-store:
assignee: Flavio Percoco (flaper87) → nobody
tags: added: lite-spec
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.