← Back to team overview

yellow team mailing list archive

[Merge] lp:~gary/juju-gui/charmdivision into lp:juju-gui

 

The proposal to merge lp:~gary/juju-gui/charmdivision into lp:juju-gui has been updated.

Description changed to:

Separate environment and store charms

On discussion with Kapil, a significant problem from a previous refactoring of mine became clear.  Charm ids are only reliably unique within a given context, such as juju environment vs charm store.  Therefore, charms from the two sources need to be stored separately.

We discussed some approaches.  He suggested storing environment charms in the database and store charms in the browser, and I liked that idea.  He also requested that I factor out the charm model code into a separate file, even while keeping it in the juju.models package.  Finally, he suggested that charm ids should always include revisions in order to guarantee uniqueness, and to make it possible to consider whether charms from the different sources are identical.

I wrote a long explanation of this in the app/models/charms.js file, including additional considerations.

The charm store needed to send the revision itself, which Kapil changed it to do.

I ended up also factoring out a charm store object, with the ability to get the data from a search, organized as we like it; and to get the data for a specific charm.  A nice fall out from the tests of this code is that it exposed some pre-existing problems with sorting code, which I addressed.

The change is quite large because it touches so many of the files.  On the bright side, many of the test changes are mechanical, and much of the code is moved and only slightly refactored and changed from other sources, so deletions and moves account for much of the churn.  That said, it is still a large branch, for which I apologize.

Thanks,

Gary

https://codereview.appspot.com/6749046/


For more details, see:
https://code.launchpad.net/~gary/juju-gui/charmdivision/+merge/130464
-- 
https://code.launchpad.net/~gary/juju-gui/charmdivision/+merge/130464
Your team Juju GUI Hackers is requested to review the proposed merge of lp:~gary/juju-gui/charmdivision into lp:juju-gui.


References