Skip to content

Refactor Migration Tool #4167

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

Draft
wants to merge 2 commits into
base: rohnsha0-migration-subclassing
Choose a base branch
from

Conversation

ericof
Copy link
Member

@ericof ericof commented Apr 28, 2025

No description provided.

@ericof
Copy link
Member Author

ericof commented Apr 28, 2025

@rohnsha0 Take a look at what I did in here.

@mauritsvanrees, @davisagli: Opinions?

@ericof ericof marked this pull request as draft April 28, 2025 23:02
@ericof ericof requested a review from davisagli April 28, 2025 23:02
Copy link
Member

@rohnsha0 rohnsha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericof please see:-
on setup page:-

2025-04-29 10:56:26,592 ERROR   [Zope.SiteErrorLog:35][waitress-2] AttributeError: http://localhost:8080/@sites
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 390, in publish_module
  Module ZPublisher.WSGIPublisher, line 284, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module plone.rest.service, line 21, in __call__
  Module plone.distribution.services.sites.get, line 46, in render
  Module plone.distribution.services.sites.get, line 121, in reply
  Module plone.distribution.services.sites.get, line 81, in get_sites
  Module plone.distribution.services.sites.get, line 23, in _is_outdated
  Module Products.CMFPlone.MigrationTool, line 310, in needUpgrading
  Module Products.CMFPlone.MigrationTool, line 252, in getInstanceVersion
AttributeError: 'RequestContainer' object has no attribute 'setup'

on /@@overview-controlpanel

2025-04-29 10:57:57,313 ERROR   [Zope.SiteErrorLog:35][waitress-3] TypeError: http://localhost:8080/Plone/@@overview-controlpanel
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 390, in publish_module
  Module ZPublisher.WSGIPublisher, line 284, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module Products.CMFPlone.controlpanel.browser.overview, line 35, in __call__
  Module Products.Five.browser.pagetemplatefile, line 127, in __call__
  Module Products.Five.browser.pagetemplatefile, line 59, in __call__
  Module zope.pagetemplate.pagetemplate, line 134, in pt_render
  Module Products.PageTemplates.engine, line 368, in __call__
  Module z3c.pt.pagetemplate, line 198, in render
  Module chameleon.zpt.template, line 328, in render
  Module chameleon.template, line 229, in render
  Module chameleon.utils, line 20, in raise_with_traceback
  Module chameleon.template, line 200, in render
  Module 9853bf9687268a7b1899879f481dadac, line 1249, in render
  Module eff93f466a1c56c5c3659cf9646e3174, line 903, in render_master
  Module 802a2dde8c920121c249f7a13ad5c12d, line 919, in render_master
  Module eff93f466a1c56c5c3659cf9646e3174, line 878, in __fill_content
  Module 802a2dde8c920121c249f7a13ad5c12d, line 1567, in render_content
  Module eff93f466a1c56c5c3659cf9646e3174, line 864, in __fill_main
  Module 9853bf9687268a7b1899879f481dadac, line 473, in __fill_prefs_configlet_main
  Module zope.tales.expressions, line 324, in __call__
  Module Products.PageTemplates.Expressions, line 299, in evaluateBoolean
  Module zope.tales.tales, line 768, in evaluate
   - Expression: <PathExpr standard:'view/pil'>
   - Names:
      {'args': (),
       'container': <PloneSite at /Plone>,
       'context': <PloneSite at /Plone>,
       'default': <DEFAULT>,
       'here': <PloneSite at /Plone>,
       'loop': {'configlet': <Products.PageTemplates.engine.RepeatItem object at 0x7b47d17b2d90>,
                'group': <Products.PageTemplates.engine.RepeatItem object at 0x7b47d4484590>},
       'nothing': None,
       'options': {},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7b47d17f15d0>,
       'request': <WSGIRequest, URL=http://localhost:8080/Plone/@@overview-controlpanel>,
       'root': <Application at >,
       'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7b47d481b910>,
       'traverse_subpath': [],
       'user': <PropertiedUser 'admin'>,
       'view': <Products.Five.browser.metaconfigure.OverviewControlPanel object at 0x7b47d1bf42d0>,
       'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7b47d3d7d990>}
  Module zope.tales.expressions, line 248, in __call__
  Module Products.PageTemplates.Expressions, line 225, in _eval
  Module Products.PageTemplates.Expressions, line 155, in render
  Module Products.CMFPlone.controlpanel.browser.overview, line 50, in pil
  Module plone.memoize.instance, line 53, in memogetter
  Module Products.CMFPlone.controlpanel.browser.overview, line 47, in core_versions
  Module Products.CMFPlone.MigrationTool, line 329, in coreVersions
  Module Products.CMFPlone.MigrationTool, line 45, in _pil_version
TypeError: 'builtin_function_or_method' object does not support item assignment

@ericof
Copy link
Member Author

ericof commented Apr 29, 2025

@rohnsha0 Could you, please, try again?

@rohnsha0
Copy link
Member

rohnsha0 commented May 4, 2025

@rohnsha0 sorry for late response, was a bit busy with dev for recyclebin...

i tested your fix but
image
the above screen seem was stuck at loading eventually failing... and the logs the same exact error:-

2025-05-05 00:28:01,647 ERROR   [Zope.SiteErrorLog:35][waitress-2] AttributeError: http://localhost:8080/@sites
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 390, in publish_module
  Module ZPublisher.WSGIPublisher, line 284, in publish
  Module ZPublisher.mapply, line 98, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module plone.rest.service, line 21, in __call__
  Module plone.distribution.services.sites.get, line 46, in render
  Module plone.distribution.services.sites.get, line 121, in reply
  Module plone.distribution.services.sites.get, line 81, in get_sites
  Module plone.distribution.services.sites.get, line 23, in _is_outdated
  Module Products.CMFPlone.MigrationTool, line 311, in needUpgrading
  Module Products.CMFPlone.MigrationTool, line 253, in getInstanceVersion
AttributeError: 'RequestContainer' object has no attribute 'setup'

@rohnsha0
Copy link
Member

rohnsha0 commented May 4, 2025

maybe something wrong at my end?!

@ericof
Copy link
Member Author

ericof commented May 8, 2025

I will double check why this is failing for you.

@mauritsvanrees
Copy link
Member

I mostly see some code being reshuffled. It looks like it should continue to work, but I don't yet see why this would be better than before. It is hard to see if any accidental omissions or other mistakes have been made.

I see a few new versions reported, which is fine. And is the logging stream meant to give more feedback about what happens when running upgrades?

BTW, the reporting of the PIL version can probably be skipped, though best not in a bug fix release. It was useful years ago, but now it will always just be Pillow.

@ericof
Copy link
Member Author

ericof commented May 26, 2025 via email

@davisagli
Copy link
Member

@ericof Do you still have updates to make here before I review it?

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

Successfully merging this pull request may close these issues.

4 participants