Skip to content

Tool.getSortedImportSteps should return a deterministic order #9

@tseaver

Description

@tseaver

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions