Hi yuppie,

Op 11-09-15 om 09:00 schreef yuppie:
The Import tab wasn't built with extension profiles and upgrade steps in
mind. It is not exactly the UI you expect for installing add-ons.

One issue you want to fix is this:

Someone installs an add-on on a site that has outdated configuration.
Because nobody warns him, he messes up the configuration of his site.

Your answer is: Don't bother him with this detail, I'm sure he wanted to
upgrade his dependencies first. I'll do that for him silently.

My answer is: His site is in a bad state if he didn't run the upgrades.
He should fix that before he starts installing add-ons.

Someone has a site with profile hoopyfrood up to date. He has no idea what this does, it was just applied as a dependency of another add-on.

He adds an addon with profile towel to the buildout config. This requires a new version of the package that has profile hoopyfrood. Fine, he updates the version pins, runs buildout and restarts the site.

He installs the towel add-on.

Old answer: no matter what the state of the hoopyfrood profile, we apply it. This may be mostly harmless (I swear I did not plan this culture reference), but it does more than necessary and may be harmful in some cases.

My answer: apply the upgrade step of hoopyfrood.  Everybody happy.

Your answer: give an error, pointing to the Upgrades tab, telling him to run the upgrades of hoopyfrood first? Then nothing happens.

Your answer may be fine when applying a profile in the ZMI, but then again, I have updated the pull request to give the user more options in the ZMI so that may be fine already. So maybe you are happy with that already.

From the point of view of existing code in add-ons that call runAllImportStepsFromProfile and expect it to maybe do too much but at least work, your answer would be a regression: either nothing is done or you get an exception.

BTW, the add-ons control panel in Plone 5 lists the available upgrades first, and then the installable new add-ons. We could improve the ZMI similarly, like:
- add a warning at the top of the Imports tab if there are upgrades
- Show on the Upgrades tab which profiles actually have upgrades that need to be applied. Now I sometimes click through the entire list to check this.
Maybe something for another pull request.

But, for me, this is not about how it works in the ZMI. I am sure with some back and forth like this we can work something out. It is mostly about: what happens when in code you do runAllImportStepsFromProfile with the default settings.

BTW 2, Plone 5 is still also using CMFQuickInstaller, but that is going the way of the dodo. Slowly.

In other words: 'profile-' is the default prefix. All methods handle ids
without prefix the same way as ids with the default prefix. Correct?

Yes, exactly.

Thanks for the feedback,

Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl

Zope-CMF maillist  -  Zope-CMF@zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to