Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

GenericSetup and removed products

 

 

Zope cmf RSS feed   Index | Next | Previous | View Threaded


wichert at wiggy

Sep 6, 2007, 1:22 AM

Post #1 of 12 (1515 views)
Permalink
GenericSetup and removed products

We are seeing a common GenericSetup related bugreport for Plone 3:
people migrating to Plone 3 correctly remove products that are not
yet supported on Plone 3. However those products may have a registered
GS import or export step which is not removed. The result is that GS
tries to run import/export code from a product which no longer exists
and aborts with an ImportError. Since the only way to remove the
step registration is by manually tweaking internal data structure of
the setup tool this is somewhat painful.

To fix this I want to do two things:

* on GS trunk I want to implement zcml-based import and export step
registration (I have a partial implementation but need to finish
that)

* on the maintenance branch add a try/except to catch import errors and
either ignore those or remove the step if they occur.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


tseaver at palladion

Sep 6, 2007, 7:23 AM

Post #2 of 12 (1466 views)
Permalink
Re: GenericSetup and removed products [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wichert Akkerman wrote:
> We are seeing a common GenericSetup related bugreport for Plone 3:
> people migrating to Plone 3 correctly remove products that are not
> yet supported on Plone 3. However those products may have a registered
> GS import or export step which is not removed. The result is that GS
> tries to run import/export code from a product which no longer exists
> and aborts with an ImportError. Since the only way to remove the
> step registration is by manually tweaking internal data structure of
> the setup tool this is somewhat painful.
>
> To fix this I want to do two things:
>
> * on GS trunk I want to implement zcml-based import and export step
> registration (I have a partial implementation but need to finish
> that)

+1. In fact, I thought I had done that already (I see that was only
profile registration, and not step registration).

> * on the maintenance branch add a try/except to catch import errors and
> either ignore those or remove the step if they occur.

+1 for logging / ignoring them (for extra bonus points, indicate somehow
in the UI of the import tab that the step is known to be borked). My
rationale is that the product supplying the step might be temporarily
broken. Perhaps the UI which indicates the broken step could allow the
user to remove that step manually?

BTW, I'm assuming that this information is relevant to this issue:

http://www.zope.org/Collectors/CMF/497


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG4A1a+gerLs4ltQ4RAgBvAJ9nXQONZ7Aw3uin6P/1ugzICheN1wCfYibO
slKpUmX9q/mkllFSpF+tg9A=
=kPkM
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


wichert at wiggy

Sep 6, 2007, 7:27 AM

Post #3 of 12 (1464 views)
Permalink
Re: Re: GenericSetup and removed products [In reply to]

Previously Tres Seaver wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Wichert Akkerman wrote:
> > We are seeing a common GenericSetup related bugreport for Plone 3:
> > people migrating to Plone 3 correctly remove products that are not
> > yet supported on Plone 3. However those products may have a registered
> > GS import or export step which is not removed. The result is that GS
> > tries to run import/export code from a product which no longer exists
> > and aborts with an ImportError. Since the only way to remove the
> > step registration is by manually tweaking internal data structure of
> > the setup tool this is somewhat painful.
> >
> > To fix this I want to do two things:
> >
> > * on GS trunk I want to implement zcml-based import and export step
> > registration (I have a partial implementation but need to finish
> > that)
>
> +1. In fact, I thought I had done that already (I see that was only
> profile registration, and not step registration).
>
> > * on the maintenance branch add a try/except to catch import errors and
> > either ignore those or remove the step if they occur.
>
> +1 for logging / ignoring them (for extra bonus points, indicate somehow
> in the UI of the import tab that the step is known to be borked). My
> rationale is that the product supplying the step might be temporarily
> broken. Perhaps the UI which indicates the broken step could allow the
> user to remove that step manually?

It could, but I'ld rather spend more time on doing zcml-based
registration than doing a full UI which will no longer be needed once we
switch to the zcml-approach.

> BTW, I'm assuming that this information is relevant to this issue:
>
> http://www.zope.org/Collectors/CMF/497

Indeed it is.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


y.2007- at wcm-solutions

Sep 6, 2007, 11:06 AM

Post #4 of 12 (1464 views)
Permalink
Re: GenericSetup and removed products [In reply to]

Wichert Akkerman wrote:
> * on GS trunk I want to implement zcml-based import and export step
> registration (I have a partial implementation but need to finish
> that)

That means replacing the persistent local registries by a global
registry, right?

Cheers, Yuppie

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


tseaver at palladion

Sep 6, 2007, 1:36 PM

Post #5 of 12 (1463 views)
Permalink
Re: GenericSetup and removed products [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> Wichert Akkerman wrote:
>> * on GS trunk I want to implement zcml-based import and export step
>> registration (I have a partial implementation but need to finish
>> that)
>
> That means replacing the persistent local registries by a global
> registry, right?

I'm not in favor of that, at least not without more discussion. I *am*
in favor of replacing any import-time or 'initialize'-time registrations
which touch module globals with ZCML.

The persistent steps registered within a site's profiles *can't* be done
via startup-time setup: they reflect state which may be *important*,
even if a module doesn't import at a given startup.



Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG4GTq+gerLs4ltQ4RAl6XAKDVwWMeoluK+GWMJQemm02zgLfAhgCfegJw
OUaDh7KyGbrZlhrtRMiEsXQ=
=D9G6
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


tseaver at palladion

Sep 6, 2007, 1:36 PM

Post #6 of 12 (1468 views)
Permalink
Re: GenericSetup and removed products [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> Wichert Akkerman wrote:
>> * on GS trunk I want to implement zcml-based import and export step
>> registration (I have a partial implementation but need to finish
>> that)
>
> That means replacing the persistent local registries by a global
> registry, right?

I'm not in favor of that, at least not without more discussion. I *am*
in favor of replacing any import-time or 'initialize'-time registrations
which touch module globals with ZCML.

The persistent steps registered within a site's profiles *can't* be done
via startup-time setup: they reflect state which may be *important*,
even if a module doesn't import at a given startup.



Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG4GTq+gerLs4ltQ4RAl6XAKDVwWMeoluK+GWMJQemm02zgLfAhgCfegJw
OUaDh7KyGbrZlhrtRMiEsXQ=
=D9G6
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


wichert at wiggy

Sep 6, 2007, 3:56 PM

Post #7 of 12 (1464 views)
Permalink
Re: Re: GenericSetup and removed products [In reply to]

Previously Tres Seaver wrote:
> Wichert Akkerman wrote:
> > * on the maintenance branch add a try/except to catch import errors and
> > either ignore those or remove the step if they occur.
>
> +1 for logging / ignoring them (for extra bonus points, indicate somehow
> in the UI of the import tab that the step is known to be borked). My
> rationale is that the product supplying the step might be temporarily
> broken. Perhaps the UI which indicates the broken step could allow the
> user to remove that step manually?

Done. This ended up being a bit more complex to get the UI parts hooked
up correctly but it seems to be working now and passes all tests again.

I'll port to trunk tomorrow.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


wichert at wiggy

Sep 6, 2007, 3:56 PM

Post #8 of 12 (1462 views)
Permalink
Re: Re: GenericSetup and removed products [In reply to]

Previously Tres Seaver wrote:
> Wichert Akkerman wrote:
> > * on the maintenance branch add a try/except to catch import errors and
> > either ignore those or remove the step if they occur.
>
> +1 for logging / ignoring them (for extra bonus points, indicate somehow
> in the UI of the import tab that the step is known to be borked). My
> rationale is that the product supplying the step might be temporarily
> broken. Perhaps the UI which indicates the broken step could allow the
> user to remove that step manually?

Done. This ended up being a bit more complex to get the UI parts hooked
up correctly but it seems to be working now and passes all tests again.

I'll port to trunk tomorrow.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


wichert at wiggy

Sep 6, 2007, 3:56 PM

Post #9 of 12 (1465 views)
Permalink
Re: Re: GenericSetup and removed products [In reply to]

Previously yuppie wrote:
> Wichert Akkerman wrote:
> >* on GS trunk I want to implement zcml-based import and export step
> > registration (I have a partial implementation but need to finish
> > that)
>
> That means replacing the persistent local registries by a global
> registry, right?

It probably means having both a global and a local registry.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


wichert at wiggy

Sep 6, 2007, 3:56 PM

Post #10 of 12 (1466 views)
Permalink
Re: Re: GenericSetup and removed products [In reply to]

Previously yuppie wrote:
> Wichert Akkerman wrote:
> >* on GS trunk I want to implement zcml-based import and export step
> > registration (I have a partial implementation but need to finish
> > that)
>
> That means replacing the persistent local registries by a global
> registry, right?

It probably means having both a global and a local registry.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


y.2007- at wcm-solutions

Sep 6, 2007, 11:16 PM

Post #11 of 12 (1462 views)
Permalink
Re: GenericSetup and removed products [In reply to]

Hi!


Tres Seaver wrote:
> yuppie wrote:
>> Wichert Akkerman wrote:
>>> * on GS trunk I want to implement zcml-based import and export step
>>> registration (I have a partial implementation but need to finish
>>> that)
>> That means replacing the persistent local registries by a global
>> registry, right?
>
> I'm not in favor of that, at least not without more discussion. I *am*
> in favor of replacing any import-time or 'initialize'-time registrations
> which touch module globals with ZCML.

Well. Right now there are no global step registrations, so there is
nothing that can be simply replaced by ZCML.

> The persistent steps registered within a site's profiles *can't* be done
> via startup-time setup: they reflect state which may be *important*,
> even if a module doesn't import at a given startup.

In the initial version of CMFSetup import_steps.xml and export_steps.xml
did summarize the contents of the profile. Each step represented a part
of the profile.

That concept is broken since extension profiles were added. Extension
profiles re-use registrations made by other profiles, exports mix steps
from different profiles. The step registries just represent a set of
available handlers, not the configuration of the site.

So what's the important state information that might get lost if we
remove the persistent steps?


Cheers,

Yuppie

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


wichert at wiggy

Sep 7, 2007, 4:41 PM

Post #12 of 12 (1466 views)
Permalink
Re: Re: GenericSetup and removed products [In reply to]

Previously Tres Seaver wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> yuppie wrote:
> > Wichert Akkerman wrote:
> >> * on GS trunk I want to implement zcml-based import and export step
> >> registration (I have a partial implementation but need to finish
> >> that)
> >
> > That means replacing the persistent local registries by a global
> > registry, right?
>
> I'm not in favor of that, at least not without more discussion. I *am*
> in favor of replacing any import-time or 'initialize'-time registrations
> which touch module globals with ZCML.
>
> The persistent steps registered within a site's profiles *can't* be done
> via startup-time setup: they reflect state which may be *important*,
> even if a module doesn't import at a given startup.

Can you expand on that? I don't quite follow that reasoning.

At the moment the registration of profiles is a startup-time item.
Registration of steps can be done through API calls on the setup time
but is generally done through the properties tab in the ZMI. This
tab is very trigger-happy with registering steps and there is no way to
unregister a step once it has been registered. If the step registration
is an important part of the site state we have done an awful job
of managing that.

Since import steps are only run if their input/marker files are present
(I'm not aware of any exceptions to that rule - you have to have that
check with the current implementation) and export steps can only export
current state and not modify it I don't quite see why step registration
can not be a startup-time thing.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests

Zope cmf RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.