New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLIP: Get rid of portal_quickinstaller #1340
Comments
Working on this at the Alpine City Strategic Sprint 2016 in Innsbruck, Austria. |
+1 I think is clear, implemented with enough time in advance, documentation, deprecation warnings and so on; makes a lot of sense. @keul thoughts? in order to run Python code, are import steps in |
No, I'm -1 about this. Setuphandlers are powerful, I always use them, but aren't they related to an installation already running? On the other hand However I like the fact that magic uninstall operation done by quickinstaller will gone. |
@keul: You mean you sometimes need to run some code before applying the first import step? I have not needed that so far, but I can imagine it. Fair point. That could easily be handled by this GenericSetup pull request I created earlier: |
@mauritsvanrees yep! This can help (hoping to see this merged) |
@mauritsvanrees what about reinstalls? |
Reinstalls are not supported. Basically that is already true in the current add-ons control panel. But with the new setup a reinstall would really just be an uninstall and install, which is easy to do in an add-on if you need it. The old quick installer had a specific reinstall because this did not remove any portal objects that the install had added. |
Added plip config in coredev: |
And a jenkins job for it: http://jenkins.plone.org/view/PLIPs/job/plip-1340-QuickInstaller/ |
Ah, sweet, thanks. |
We can use get_installer in Plone 5.1 migrations. In earlier version we will keep using the portal_quickinstaller, because get_installer is not available. In a getToolByName call for portal_quickinstaller, we will pass a default of None, so an upgrade can still work if the portal tool has already been removed. In shared utility and base code, we will try to import get_installer, and fall back on the previous implementation. plone/Products.CMFPlone#1340
@mauritsvanrees, your PLIP has been approved by the Framework team, and @frapell is the one in charge of review your PR once it will be ready. |
Note to self. Todo: hidden products are no longer hidden:
|
@mauritsvanrees Do we have something analogue to the "isProductInstalled" we have in qi ? this is very helpful, and I remember having issues to know if a specific profile for a package was ran or not (for packages that include several profiles) |
With the new setup, we still have an This last check is done with a single line that does a call to portal_setup, but for ease of use I have added this as method |
We can use get_installer in Plone 5.1 migrations. In earlier version we will keep using the portal_quickinstaller, because get_installer is not available. In a getToolByName call for portal_quickinstaller, we will pass a default of None, so an upgrade can still work if the portal tool has already been removed. In shared utility and base code, we will try to import get_installer, and fall back on the previous implementation. plone/Products.CMFPlone#1340
Random idea out of scope for this plip. Situation:
If the author of product A is really sure, he may add a metadata.xml in his uninstall profile that depends on the uninstall profile of package B. Practically speaking: ATContentTypes depends on a profile from Archetypes, but when uninstalling ATContentTypes we are probably not going to run an uninstall profile for Archetypes. Well, in this case we might actually do it: if someone uninstalls ATCT there is no good reason to keep Archetypes installed. An idea may be to add a cleanup control panel. It may be a part of the add-ons control panel. Or it may be more general, where it can also be a third party add-on (maybe part of ftw.upgrade). For our use case here: add a form that lists all products that are:
Just a few half baked ideas, but if someone wants to take this on, it may be good. |
We can use get_installer in Plone 5.1 migrations. In earlier version we will keep using the portal_quickinstaller, because get_installer is not available. In a getToolByName call for portal_quickinstaller, we will pass a default of None, so an upgrade can still work if the portal tool has already been removed. In shared utility and base code, we will try to import get_installer, and fall back on the previous implementation. plone/Products.CMFPlone#1340
I have another idea/request: fire a couple of new events on add-on install and uninstall; if someone give us a hand, we can dedicate some resources to this. |
Note to self: plip config at https://github.com/plone/buildout.coredev/blob/5.0/plips/plip1340-get-rid-of-qi.cfg So we have those merges:
Also all GenericSetup changes were merged already. Do not forget to create an issue in the docs repository. |
@mauritsvanrees if you like to merge this yourself, I'am fine. You know better than I.... |
Yeah, I might as well merge it myself. Will do. |
As basis for the docs, I have copied the |
We can use get_installer in Plone 5.1 migrations. In earlier version we will keep using the portal_quickinstaller, because get_installer is not available. In a getToolByName call for portal_quickinstaller, we will pass a default of None, so an upgrade can still work if the portal tool has already been removed. In shared utility and base code, we will try to import get_installer, and fall back on the previous implementation. plone/Products.CMFPlone#1340
The PLIP job is happy, but I want to do a final check before merging. Two pull requests should be fine for Plone 5.0:
I test them in combination here: http://jenkins.plone.org/job/pull-request-5.0/1434/ For Plone 5.1 we have the same, plus two extra, for which the packages in 5.0 already use other branches:
I test them in combination here: http://jenkins.plone.org/job/pull-request-5.1/630/ |
We can use get_installer in Plone 5.1 migrations. In earlier version we will keep using the portal_quickinstaller, because get_installer is not available. In a getToolByName call for portal_quickinstaller, we will pass a default of None, so an upgrade can still work if the portal tool has already been removed. In shared utility and base code, we will try to import get_installer, and fall back on the previous implementation. plone/Products.CMFPlone#1340
The 5.1 job succeeded, the 5.0 one had a few failures that should be easy to fix. Doing that now. |
The 5.0 job passes too. But I should test plone/plone.app.upgrade#86 on Plone 4.3 as well: http://jenkins.plone.org/job/pull-request-4.3/406/ |
4.3 passes too. Merging all now. |
Branch: refs/heads/master Date: 2016-09-21T00:57:38+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.upgrade@45823b9 Support sites without portal_quickinstaller. We can use get_installer in Plone 5.1 migrations. In earlier version we will keep using the portal_quickinstaller, because get_installer is not available. In a getToolByName call for portal_quickinstaller, we will pass a default of None, so an upgrade can still work if the portal tool has already been removed. In shared utility and base code, we will try to import get_installer, and fall back on the previous implementation. plone/Products.CMFPlone#1340 Files changed: M CHANGES.rst M plone/app/upgrade/tests/base.py M plone/app/upgrade/utils.py M plone/app/upgrade/v30/tests.py M plone/app/upgrade/v31/betas.py M plone/app/upgrade/v40/alphas.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v42/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v43/final.py M plone/app/upgrade/v43/tests.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2016-09-21T11:53:41+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.upgrade@949b0f9 Merge pull request #86 from plone/get-rid-of-qi Support sites without portal_quickinstaller. Files changed: M CHANGES.rst M plone/app/upgrade/tests/base.py M plone/app/upgrade/utils.py M plone/app/upgrade/v30/tests.py M plone/app/upgrade/v31/betas.py M plone/app/upgrade/v40/alphas.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v42/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v43/final.py M plone/app/upgrade/v43/tests.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py
Branch: refs/heads/master Date: 2016-09-21T00:57:38+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.upgrade@45823b9 Support sites without portal_quickinstaller. We can use get_installer in Plone 5.1 migrations. In earlier version we will keep using the portal_quickinstaller, because get_installer is not available. In a getToolByName call for portal_quickinstaller, we will pass a default of None, so an upgrade can still work if the portal tool has already been removed. In shared utility and base code, we will try to import get_installer, and fall back on the previous implementation. plone/Products.CMFPlone#1340 Files changed: M CHANGES.rst M plone/app/upgrade/tests/base.py M plone/app/upgrade/utils.py M plone/app/upgrade/v30/tests.py M plone/app/upgrade/v31/betas.py M plone/app/upgrade/v40/alphas.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v42/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v43/final.py M plone/app/upgrade/v43/tests.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2016-09-21T11:53:41+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.upgrade@949b0f9 Merge pull request #86 from plone/get-rid-of-qi Support sites without portal_quickinstaller. Files changed: M CHANGES.rst M plone/app/upgrade/tests/base.py M plone/app/upgrade/utils.py M plone/app/upgrade/v30/tests.py M plone/app/upgrade/v31/betas.py M plone/app/upgrade/v40/alphas.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v42/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v43/final.py M plone/app/upgrade/v43/tests.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py
Branch: refs/heads/master Date: 2016-09-21T00:57:38+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.upgrade@45823b9 Support sites without portal_quickinstaller. We can use get_installer in Plone 5.1 migrations. In earlier version we will keep using the portal_quickinstaller, because get_installer is not available. In a getToolByName call for portal_quickinstaller, we will pass a default of None, so an upgrade can still work if the portal tool has already been removed. In shared utility and base code, we will try to import get_installer, and fall back on the previous implementation. plone/Products.CMFPlone#1340 Files changed: M CHANGES.rst M plone/app/upgrade/tests/base.py M plone/app/upgrade/utils.py M plone/app/upgrade/v30/tests.py M plone/app/upgrade/v31/betas.py M plone/app/upgrade/v40/alphas.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v42/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v43/final.py M plone/app/upgrade/v43/tests.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2016-09-21T11:53:41+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.upgrade@949b0f9 Merge pull request #86 from plone/get-rid-of-qi Support sites without portal_quickinstaller. Files changed: M CHANGES.rst M plone/app/upgrade/tests/base.py M plone/app/upgrade/utils.py M plone/app/upgrade/v30/tests.py M plone/app/upgrade/v31/betas.py M plone/app/upgrade/v40/alphas.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v42/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v43/final.py M plone/app/upgrade/v43/tests.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py
Branch: refs/heads/master Date: 2016-09-07T01:21:27+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.testing@8dbbe78 Added test that the upgrade step registry gets rolled back. Files changed: M plone/app/testing/helpers.rst Repository: plone.app.testing Branch: refs/heads/master Date: 2016-09-07T01:21:27+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.testing@63c5177 In PloneSandboxLayer make profile upgrade versions persistent. This way installed profile versions get reset in teardown. Initially I added push and pop support for the various GS registries, but somehow that is handled fine already. Files changed: M CHANGES.rst M plone/app/testing/helpers.py M plone/app/testing/helpers.rst Repository: plone.app.testing Branch: refs/heads/master Date: 2016-09-07T01:21:28+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.testing@773220f Use get_installer instead of portal_quickinstaller when available. This is needed for Plone 5.1 and higher, plip 1340: plone/Products.CMFPlone#1340 Files changed: A plone/app/testing/profile/metadata.xml M CHANGES.rst M plone/app/testing/helpers.py M plone/app/testing/helpers.rst Repository: plone.app.testing Branch: refs/heads/master Date: 2016-09-21T11:53:53+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.testing@f424bbe Merge pull request #29 from plone/get-rid-of-qi Use get_installer and make profile upgrade versions persistent Files changed: A plone/app/testing/profile/metadata.xml M CHANGES.rst M plone/app/testing/helpers.py M plone/app/testing/helpers.rst
Branch: refs/heads/master Date: 2016-09-07T01:21:27+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.testing@8dbbe78 Added test that the upgrade step registry gets rolled back. Files changed: M plone/app/testing/helpers.rst Repository: plone.app.testing Branch: refs/heads/master Date: 2016-09-07T01:21:27+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.testing@63c5177 In PloneSandboxLayer make profile upgrade versions persistent. This way installed profile versions get reset in teardown. Initially I added push and pop support for the various GS registries, but somehow that is handled fine already. Files changed: M CHANGES.rst M plone/app/testing/helpers.py M plone/app/testing/helpers.rst Repository: plone.app.testing Branch: refs/heads/master Date: 2016-09-07T01:21:28+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.testing@773220f Use get_installer instead of portal_quickinstaller when available. This is needed for Plone 5.1 and higher, plip 1340: plone/Products.CMFPlone#1340 Files changed: A plone/app/testing/profile/metadata.xml M CHANGES.rst M plone/app/testing/helpers.py M plone/app/testing/helpers.rst Repository: plone.app.testing Branch: refs/heads/master Date: 2016-09-21T11:53:53+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/plone.app.testing@f424bbe Merge pull request #29 from plone/get-rid-of-qi Use get_installer and make profile upgrade versions persistent Files changed: A plone/app/testing/profile/metadata.xml M CHANGES.rst M plone/app/testing/helpers.py M plone/app/testing/helpers.rst
Branch: refs/heads/master Date: 2016-09-07T01:19:47+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.ATContentTypes@4f6f926 No longer register the archetypes skin. Products.Archetypes does that itself. Files changed: M CHANGES.rst M Products/ATContentTypes/profiles/base/skins.xml Repository: Products.ATContentTypes Branch: refs/heads/master Date: 2016-09-07T01:19:47+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.ATContentTypes@f31dee9 Added uninstall profile. This only removes the stuff from the base profile, not the others. Note that rolemap.xml does not support the 'remove' keyword for permissions, so we keep them. Note that this needs several fixes in GenericSetup and CMFPlone, but they have been merged. Files changed: A Products/ATContentTypes/profiles/uninstall/componentregistry.xml A Products/ATContentTypes/profiles/uninstall/controlpanel.xml A Products/ATContentTypes/profiles/uninstall/diff_tool.xml A Products/ATContentTypes/profiles/uninstall/skins.xml A Products/ATContentTypes/profiles/uninstall/toolset.xml A Products/ATContentTypes/profiles/uninstall/types.xml M CHANGES.rst M Products/ATContentTypes/configure.zcml M Products/ATContentTypes/setuphandlers.py M Products/ATContentTypes/tests/test_base_profile.py M Products/ATContentTypes/tests/test_installation.py Repository: Products.ATContentTypes Branch: refs/heads/master Date: 2016-09-07T01:19:47+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.ATContentTypes@b1882f3 Differentiate between uninstall and fulluninstall. The 'uninstall' profile belongs to the 'base' profile, which is the one that gets applied when you install ATContentTypes. The 'fulluninstall' profile belongs to the 'default' profile, which can only be installed through portal_setup. Do not try to install p.a.imaging/widgets. Their default profiles are dummies in Plone 5. Files changed: A Products/ATContentTypes/profiles.zcml A Products/ATContentTypes/profiles/fulluninstall/diff_tool.xml A Products/ATContentTypes/profiles/fulluninstall/metadata.xml A Products/ATContentTypes/profiles/fulluninstall/types.xml A Products/ATContentTypes/profiles/uninstall/metadata.xml M CHANGES.rst M Products/ATContentTypes/configure.zcml M Products/ATContentTypes/profiles/default/metadata.xml M Products/ATContentTypes/tests/test_base_profile.py M Products/ATContentTypes/tests/test_installation.py D Products/ATContentTypes/profiles/uninstall/diff_tool.xml D Products/ATContentTypes/profiles/uninstall/types.xml Repository: Products.ATContentTypes Branch: refs/heads/master Date: 2016-09-07T01:19:47+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.ATContentTypes@0762473 Give up on portal_quickinstaller of Plone 5.0. We need Plone 5.1 with the get_installer function from plone/Products.CMFPlone#1340 With 5.0 and the old QI you run into problems like: when the uninstall profile gets applied, the QI event handlers actually mark the product as installed... Files changed: M Products/ATContentTypes/tests/test_base_profile.py M Products/ATContentTypes/tests/test_installation.py Repository: Products.ATContentTypes Branch: refs/heads/master Date: 2016-09-07T01:20:37+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.ATContentTypes@e88e5a2 changelog Files changed: M CHANGES.rst Repository: Products.ATContentTypes Branch: refs/heads/master Date: 2016-09-21T11:54:01+02:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.ATContentTypes@be42b2a Merge pull request #32 from plone/get-rid-of-qi Added uninstall profile. Files changed: A Products/ATContentTypes/profiles.zcml A Products/ATContentTypes/profiles/fulluninstall/diff_tool.xml A Products/ATContentTypes/profiles/fulluninstall/metadata.xml A Products/ATContentTypes/profiles/fulluninstall/types.xml A Products/ATContentTypes/profiles/uninstall/componentregistry.xml A Products/ATContentTypes/profiles/uninstall/controlpanel.xml A Products/ATContentTypes/profiles/uninstall/metadata.xml A Products/ATContentTypes/profiles/uninstall/skins.xml A Products/ATContentTypes/profiles/uninstall/toolset.xml M CHANGES.rst M Products/ATContentTypes/configure.zcml M Products/ATContentTypes/profiles/base/skins.xml M Products/ATContentTypes/profiles/default/metadata.xml M Products/ATContentTypes/setuphandlers.py M Products/ATContentTypes/tests/test_base_profile.py M Products/ATContentTypes/tests/test_installation.py
And it's a wrap! Handling the documentation here: plone/documentation#696 |
Proposer : Maurits van Rees
Seconder : @hvelarde
Abstract
No longer support installing via Extensions/install.py.
Motivation
There are two ways of installing products: GenericSetup and CMFQuickInstaller. Checking if a package is currently installed, means having to check portal_setup and portal_quickinstaller, or having code that makes sure those two are in sync. The syncing is mostly in place, with some recent changes, but supporting both remains tricky. Cleanup would make this code much easier to understand.
Assumptions
Some core packages need to actually get a GenericSetup profile instead of their current install.py (for example Products.Marshall). Some need to get an uninstall profile.
Proposal & Implementation
@@installer
for easier remembering.default
profile, instead of using the first profile found.Deliverables
Risks
Participants
Maurits van Rees
Note that CMFQuickInstaller is Plone specific, in spite of the CMF in the name. So compatibility with CMF is not an issue.
See http://sourceforge.net/p/plone/mailman/message/34390699/ for small initial discussion in August 2015.
The text was updated successfully, but these errors were encountered: