Commit b5b79483 authored by Łukasz Nowak's avatar Łukasz Nowak

slapos-sr-testing: Use slapos.core 1.4.15 for old slapos proxy

Since slapos.core 1.4.16+ slapos proxy is not able to consume or publish
non-strings, which makes tests not working.
parent 979171dd
...@@ -134,6 +134,9 @@ output = ${buildout:directory}/template.cfg ...@@ -134,6 +134,9 @@ output = ${buildout:directory}/template.cfg
mode = 640 mode = 640
[versions] [versions]
# Use slapos.core <= 1.4.16 for correctly working slapos proxy
slapos.core = 1.4.15
# clear the version of tested eggs, to make sure we installed the developped ones # clear the version of tested eggs, to make sure we installed the developped ones
erp5.util = erp5.util =
......
  • That's wrong. Care was taken to not break compatibility about this. It also required changes in xml_marshaller, so it was a mistake to upgrade slapos.core alone. Reverting is not a solution. I asked you to check it was better by upgrading xml_marshaller as well, but got no answer.

    It's impossible to get stuck with old versions of slapos.core. If there remain bugs, report them for @bminusl to fix it.

    That look similar to slapos.core!94 (merged) but again no link to a test result showing a failure.

  • When I wrote the above comment, I hadn't see the downgrade was only for this SR so somehow it's not so bad. However, the commit message does not explain where the problem is exactly.

  • Thanks for noting the possibilities to solve it.

    I will take care of it (upgrading xml_marshaller, etc) soon, as for development and testing I need recent slapos proxy, so this change is temporary (I will have to upgrade it to versions with python3 compatibility changes).

    Now I have reasonable test results, so I can have a branch to fix it.

  • I asked you to check it was better by upgrading xml_marshaller as well, but got no answer.

    I now had time to experiment a bit.

    With xml_marshaller == 1.0.1 I still have this problem while requesting with integers or publishing them. With tests like luke/slapos.core@49c9f629 I have TypeError: Argument must be bytes or unicode, got 'int'

  • Is there a test result with more output ?

  • Yes, sure:

    E
    ======================================================================
    ERROR: Verify that request int works in connection parameters
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/slapos/tests/test_slapproxy/__init__.py", line 638, in test_request_set_connection_parameters_with_int
        connection_dict={'foo': 1})
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/slapos/tests/test_slapproxy/__init__.py", line 347, in setConnectionDict
        'slave_reference': slave_reference})
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/werkzeug/test.py", line 840, in post
        return self.open(*args, **kw)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/testing.py", line 200, in open
        follow_redirects=follow_redirects
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/werkzeug/test.py", line 803, in open
        response = self.run_wsgi_app(environ, buffered=buffered)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/werkzeug/test.py", line 716, in run_wsgi_app
        rv = run_wsgi_app(self.application, environ, buffered=buffered)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/werkzeug/test.py", line 923, in run_wsgi_app
        app_rv = app(environ, start_response)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/app.py", line 2309, in __call__
        return self.wsgi_app(environ, start_response)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/app.py", line 2295, in wsgi_app
        response = self.handle_exception(e)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/app.py", line 1741, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
        response = self.full_dispatch_request()
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
        rv = self.handle_user_exception(e)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
        reraise(exc_type, exc_value, tb)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
        rv = self.dispatch_request()
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
        return self.view_functions[rule.endpoint](**req.view_args)
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/slapos/proxy/views.py", line 241, in setComputerPartitionConnectionXml
        connection_xml = dict2xml(loads(request.form['connection_xml'].encode('utf-8')))
      File "/srv/slapgrid/slappart15/srv/runner/project/slapos.core/slapos/proxy/views.py", line 74, in dict2xml
        attrib={'id': parameter_id}).text = parameter_value
      File "src/lxml/etree.pyx", line 1018, in lxml.etree._Element.text.__set__
      File "src/lxml/apihelpers.pxi", line 710, in lxml.etree._setNodeText
      File "src/lxml/apihelpers.pxi", line 698, in lxml.etree._createTextNode
      File "src/lxml/apihelpers.pxi", line 1489, in lxml.etree._utf8
    TypeError: Argument must be bytes or unicode, got 'int'
    
    ----------------------------------------------------------------------
    Ran 1 test in 0.078s
    
    FAILED (errors=1)
  • Thanks. @bminusl will start working on this next Monday.

  • It should be fixed with slapos.core@b8bd51d8

  • mentioned in commit luke/slapos.core@49c9f629

    Toggle commit list
  • mentioned in merge request slapos.core!99 (merged)

    Toggle commit list
  • Since new slapos.core = 1.4.20 is available in the stack/slapos.cfg I created !528 (merged), just awaiting for test results.

    Thank you for you work.

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment