ERP5Type: fix regression in properties.dtml
In commit a17bb910 ("py2/py3: Make Products code compatible with both python2 and python3"), 2to3 changed `_.has_key(...)` to `... in _` whereas _ is not a dict. Traceback (innermost last): ... Module OFS.PropertyManager, line 309, in manage_editProperties manage_tabs_message=message) Module Shared.DC.Scripts.Bindings, line 322, in __call__ return self._bindAndExec(args, kw, None) Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec return self._exec(bound_data, args, kw) Module App.special_dtml, line 185, in _exec try: result = render_blocks(self._v_blocks, ns) Module DocumentTemplate.DT_In, line 707, in renderwob try: append(render(section, md)) Module DocumentTemplate.DT_Let, line 76, in render else: d[name]=expr(md) Module DocumentTemplate.DT_Util, line 210, in eval - __traceback_info__: _ return eval(code, d) Module <string>, line 1, in <module> TypeError: argument of type 'TemplateDict' is not iterable
-
Owner
I thought SlapOS.SlapRunner.ResilienceTest-Master.ERP5 was always failing :)
It seems to be fixed in DocumentTemplate 3.0 ( https://github.com/zopefoundation/DocumentTemplate/commit/bcb4f0cd05fc46f47a18b4fdc5c4db6d54c73b86 ). I'll see to add a test for this and keep the
something in _
syntax in the zope4 branch -
Owner
@xavier_thompson I'm curious to know why the webrunner test triggers to issue and not the theia one. Do you have any idea?
-
Owner
I thought SlapOS.SlapRunner.ResilienceTest-Master.ERP5 was always failing :)
It was, but not so early. Now we have again:
2022-05-16 17:42:30,918 SlaprunnerResiliencyTest: INFO Editing HAProxy configuration... 2022-05-16 17:42:31,637 runScalabilityTestSuite: ERROR Impossible to run resiliency test: Traceback (most recent call last): File ".../slapos/resiliencytest/__init__.py", line 123, in runTestSuite success = test_suite_module.runTestSuite(**parsed_arguments) File ".../slapos/resiliencytest/suites/erp5.py", line 269, in runTestSuite return ERP5TestSuite(*args, **kwargs).runTestSuite() File ".../slapos/resiliencytest/suites/resiliencytestsuite.py", line 254, in runTestSuite return self._testClone(1) File ".../slapos/resiliencytest/suites/resiliencytestsuite.py", line 205, in _testClone success = self.checkDataOnCloneInstance() File ".../slapos/resiliencytest/suites/erp5.py", line 253, in checkDataOnCloneInstance self._editHAProxyconfiguration() File ".../slapos/resiliencytest/suites/erp5.py", line 99, in _editHAProxyconfiguration if 'haproxy' in x['service_name'] ValueError: need more than 0 values to unpack
-
Owner
@xavier_thompson I'm curious to know why the webrunner test triggers to issue and not the theia one. Do you have any idea?
webrunner resilient test access ERP5 through ZMI https://lab.nexedi.com/nexedi/slapos.toolbox/blob/7a7f8178cc5ec4e52b33a54d0fed3426fdece748/slapos/resiliencytest/suites/erp5.py#L164