Skip to content

Adapt cassandra backend to validating model types

This is required to be able to activate type validation in the model (in swh.model.model).

It requires to replace the "distorded" usage that was done of model entities to build objects compatible with CqlRunner's object addition logic. Since we cannot create invalid model entities any more in this context, we add a new CassObject type (just a dict with getattr__=__getitem) and use it as object passed to the CqlRunner for entity types that need special care (namely Revision and Release).

This should still work with swh.model v0.0.62 (without type validation) as well as the (next) v0.0.63 which will come with type valdation.

Depends on !374 (closed).


Migrated from D2916 (view on Phabricator)

Merge request reports