[Zope-CMF] <genericsetup:upgradeRerunImportStep> (was Re: Multiple
GS profiles per product)
Rob Miller
ra at burningman.com
Mon May 19 20:32:36 EDT 2008
Tres Seaver wrote:
> Maurits van Rees wrote:
>> Note that for GS upgrade steps you do not really need "upgrade
>> profiles". That was just my understanding/expectation of how to do
>> upgrade steps at the time.
>
> Sees reasonable, although I should say that I don't use the "upgrade"
> machinery in GS at all.
it's maybe worth mentioning here that i _have_ recently started using GS's
upgrade machinery, and have been quite happy with it. the one thing that i've
missed, which i'd like to add to the GS core if there's no strong objection,
is the ability to easily register re-running a particular import step as a
part of an upgrade path.
i propose introducing <genericsetup:upgradeRerunImportStep>, which could be
used as a standalone tag or nested within the grouping defined by a
<genericsetup:upgradeSteps> tag. it would function similarly to a regular
upgrade step, except instead of running an arbitrary callable handler, it
would rerun a registered import step within the context of the profile with
which the step is registered.
it would also support an optional boolean purge attribute, which would be
passed in to the import step execution as the purge argument.
a sample usage might look like this:
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup">
<genericsetup:upgradeSteps
profile="PACKAGE_NAME:default"
source="1.0"
destination="1.1"
sortkey="10">
<genericsetup:upgradeRerunImportStep
stepid="typeinfo" />
<genericsetup:upgradeRerunImportStep
stepid="workflow"
purge="True" />
<genericsetup:upgradeStep
title="Do something special"
description="Does something special"
handler=".upgrades.do_something_special"
/>
</genericsetup:upgradeSteps>
</configure>
More information about the Zope-CMF
mailing list