[Cubicweb] [CubicWeb] migration of relations used in datafeed sources

David Douard david.douard at logilab.fr
Thu Nov 6 18:50:37 CET 2014


I've been playing recently with apycot for which I've implemented some ideas we discussed a while ago 
with Nicolas and others (more about that soon). 

As I wanted to try the migration script I a writing on real cases, I tested it with from backups of our forge 
applications which do use some datafeed sources from other forge instances (cubicweb.org uses logilab.org as a datafeed 
source) and I've hit a problem I'm not sure there is a "good method" to solve.

The schema modifications I've made in apycot concern relations that are involved in datafeed mappings. So for now,
the migration fails when I drop such a relation definition, since there is no "automatic" support for migration in these 
mapping entities. Which raises some questions.

1/ do we want to be able to upgrade one side of the datafeed relation (between to cw applications) without
   being obliged to upgrade the other application at the same time? If so, we need to be able to know which version of
   the schema is exposed by a datafeed source, and have a migration system alongside with the datafeed mapping system... 
   Which might be a bit complex to implement.

2/ should the migration functions (drop_relation_definition and so) take care of migrating the mapping configuration 
   entries (even if both the applications have their schemas upgraded at the same time)?  But I'm not sure this is even 
   possible to express. 

For now, the only short-term solution I see is to propose a patch for CW so it does not crash when one drop a
relation used as a datafeed mapping entry and warn the user that these entries must be updated by hand.




Directeur du département Outils & Systèmes

+33 1 45 32 03 12	 david.douard at logilab.fr
+33 1 83 64 25 26	 http://www.logilab.fr/id/david.douard

Formations - http://www.logilab.fr/formations
Développements - http://www.logilab.fr/services
Gestion de connaissances - http://www.cubicweb.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: david_douard.vcf
Type: text/x-vcard
Size: 302 bytes
Desc: not available
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20141106/eaf66585/attachment-0272.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20141106/eaf66585/attachment-0272.sig>

More information about the Cubicweb mailing list