Skip to content
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

Tool.getSortedImportSteps should return a deterministic order #9

Open
tseaver opened this issue May 22, 2015 · 0 comments
Open

Tool.getSortedImportSteps should return a deterministic order #9

tseaver opened this issue May 22, 2015 · 0 comments

Comments

@tseaver
Copy link
Member

tseaver commented May 22, 2015

In https://bugs.launchpad.net/zope-cmf-buildout/+bug/1418881, Dieter Maurer reported:

Products.GenericSetup 1.7.3

"GenericSetup" supports the declaration of step dependencies and "getSortedImportSteps" returns a sequence of steps respecting those declarations. However, the step order is otherwise non-deterministic. This makes it extremely hard to detect missing step dependency declarations.

https://dev.plone.org/ticket/13815 shows an example where a missing step dependency was not recognized for a very long time.

I have spent the last few days to track down another similar problem: I start Zope and get the following (unworking) sort order:

2015-02-05T08:50:19 INFO bfd.theme_bp.utilities.tracing Return Products.GenericSetup.tool.getSortedImportSteps -> (u'plone-difftool', u'plone.app.caching', u'properties', u'Products.Ploneboard.uninstallVarious', u'rolemap', u'sharing', u'ploneopenid-various', u'collective.z3cform.datetimewidget_various', u'toolset', u'reference_catalog', u'various', u'typeinfo', u'cmfeditions_various', u'repositorytool', u'kupu-setup', u'workflow', u'update-workflow-rolemap', u'placeful_workflow', u'placeful_marker', u'catalog', u'content', u'cookie_authentication', u'caching_policy_mgr', u'various-calendar', u'plone.app.theming', u'uid_catalog', u'componentregistry', u'portlets', u'contentrules', u'atcttool', u'factorytool', u'actions', u'plonetheme.sunburst-various', u'controlpanel', u'memberdata-properties', u'plonepas', u'mailhost', u'action-icons', u'solr', u'browserlayer', u'content_type_registry', u'mimetypes-registry-various', u'kss_mimetype', u'difftool', u'tinymce_various', u'plone.app.registry', u'tinymce_settings', u'plone-final', u'plone-content', u'skins', u'jsregistry', u'bfd.gui.various', u'cssregistry', u'jquerytools-various', u'kssregistry', u'propertiestool', u'viewlets', u'archetypes-various', u'archetypetool', u'plone_outputfilters_various'

I restart Zope (without any modification) and get the following (working) sort order:

2015-02-05T08:55:18 INFO bfd.theme_bp.utilities.tracing Return Products.GenericSetup.tool.getSortedImportSteps -> (u'properties', u'rolemap', u'sharing', u'toolset', u'uid_catalog', u'various-calendar', u'plone.app.theming', u'various', u'componentregistry', u'plone_outputfilters_various', u'action-icons', u'memberdata-properties', u'skins', u'bfd.gui.various', u'kssregistry', u'cssregistry', u'jquerytools-various', u'jsregistry', u'tinymce_settings', u'tinymce_various', u'browserlayer', u'content_type_registry', u'mimetypes-registry-various', u'kss_mimetype', u'mailhost', u'propertiestool', u'actions', u'plonetheme.sunburst-various', u'controlpanel', u'plonepas', u'viewlets', u'difftool', u'plone.app.registry', u'solr', u'archetypes-various', u'archetypetool', u'catalog', u'atcttool', u'cookie_authentication', u'typeinfo', u'factorytool', u'kupu-setup', u'cmfeditions_various', u'repositorytool', u'reference_catalog', u'caching_policy_mgr', u'workflow', u'content', u'portlets', u'plone-final', u'plone-content', u'contentrules', u'placeful_workflow', u'placeful_marker', u'update-workflow-rolemap', u'ploneopenid-various', u'collective.z3cform.datetimewidget_various', u'Products.Ploneboard.uninstallVarious', u'plone-difftool', u'plone.app.caching', u'ploneboard-various')

Of course, the real problem are missing dependency declarations for the Plone "plone-final" import step (it depends on "skins"). However, the non deterministic behaviour of "getSortedImportSteps" hides this problem quite efficiently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant