tox -e py34 is not working in horizon

Bug #1567634 reported by xiangxinyong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Unassigned

Bug Description

when i got the lasted horizon code and run tox -e py34.

It got a lot of errors like bellow.

It seem it is connected with novaclient.

novaclient release 3.4 version on 2016-04-08.

======================================================================
ERROR: openstack_dashboard.test.test_data.utils.load_test_data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/chenpengzi/timetest/horizon/.tox/py34/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/chenpengzi/timetest/horizon/openstack_dashboard/test/test_data/utils.py", line 44, in load_test_data
    return TestData(*loaders)
  File "/home/chenpengzi/timetest/horizon/openstack_dashboard/test/test_data/utils.py", line 70, in __init__
    data_func(self)
  File "/home/chenpengzi/timetest/horizon/openstack_dashboard/test/test_data/nova_data.py", line 570, in data
    TEST.usages.add(usage_obj_2)
  File "/home/chenpengzi/timetest/horizon/openstack_dashboard/test/test_data/utils.py", line 90, in add
    if obj not in self._objects:
  File "/home/chenpengzi/timetest/horizon/.tox/py34/lib/python3.4/site-packages/novaclient/base.py", line 204, in __eq__
    if hasattr(self, 'id') and hasattr(other, 'id'):
  File "/home/chenpengzi/timetest/horizon/.tox/py34/lib/python3.4/site-packages/novaclient/base.py", line 173, in __getattr__
    self.get()
  File "/home/chenpengzi/timetest/horizon/.tox/py34/lib/python3.4/site-packages/novaclient/v2/usage.py", line 35, in get
    start = oslo_utils.timeutils.parse_strtime(self.start, fmt=fmt)
  File "/home/chenpengzi/timetest/horizon/.tox/py34/lib/python3.4/site-packages/oslo_utils/timeutils.py", line 97, in parse_strtime
    return datetime.datetime.strptime(timestr, fmt)
  File "/usr/lib/python3.4/_strptime.py", line 500, in _strptime_datetime
    tt, fraction = _strptime(data_string, format)
  File "/usr/lib/python3.4/_strptime.py", line 337, in _strptime
    (data_string, format))
ValueError: time data '2012-01-01 00:00:00' does not match format '%Y-%m-%dT%H:%M:%S.%f'

Slowest 5 tests took 1.23 secs:
    0.35 NeutronApiTests.test_port_create_with_policy_profile
    0.28 VPNTests.test_add_ipsecpolicy_get
    0.24 NetworkSubnetTests.test_subnet_create_post_invalid_pools_ip_network_with_subnetpool
    0.19 InstanceAjaxTests.test_row_update
    0.16 SecurityGroupsNeutronTests.test_detail_delete_rule_exception
----------------------------------------------------------------------
Ran 1549 tests in 8.361s

FAILED (SKIP=11, errors=1538)
Destroying test database for alias 'default'...
ERROR: InvocationError: '/home/chenpengzi/timetest/horizon/.tox/py34/bin/python -u manage.py test --settings=openstack_dashboard.test.settings --exclude-dir=openstack_dashboard/test/integration_tests openstack_dashboard'
___________________________________________________________________________________________ summary ___________________________________________________________________________________________
ERROR: py34: commands failed

Revision history for this message
Brad Pokorny (bpokorny) wrote :

This will be handled with this blueprint: https://blueprints.launchpad.net/horizon/+spec/enhance-tox

Changed in horizon:
status: New → Invalid
Revision history for this message
xiangxinyong (xiangxinyong) wrote :

Brad Pokorny (bpokorny):

Thanks.

Revision history for this message
xiangxinyong (xiangxinyong) wrote :

Brad Pokorny (bpokorny):

Hi, please take a look at this horizon patch: https://review.openstack.org/#/c/298476/

It has the same problem.

http://logs.openstack.org/76/298476/6/check/gate-horizon-python34/a693e3a/console.html

ValueError: time data '2012-01-01 00:00:00' does not match format '%Y-%m-%dT%H:%M:%S.%f'

Revision history for this message
xiangxinyong (xiangxinyong) wrote :

Brad Pokorny (bpokorny):

Hi,

python34 Failure is conntected with this patch.

https://review.openstack.org/#/c/287735/4/novaclient/v2/usage.py

I am not sure whether we need to modify this place.

https://github.com/openstack/horizon/blob/master/openstack_dashboard/test/test_data/nova_data.py#L129

Revision history for this message
Matthias Runge (mrunge) wrote :

File "/home/jenkins/workspace/gate-horizon-python34/openstack_dashboard/test/test_data/utils.py", line 90, in add
2016-04-08 06:23:42.621 | if obj not in self._objects:
2016-04-08 06:23:42.622 | File "/home/jenkins/workspace/gate-horizon-python34/.tox/py34/lib/python3.4/site-packages/novaclient/base.py", line 204, in __eq__
2016-04-08 06:23:42.622 | if hasattr(self, 'id') and hasattr(other, 'id'):
2016-04-08 06:23:42.622 | File "/home/jenkins/workspace/gate-horizon-python34/.tox/py34/lib/python3.4/site-packages/novaclient/base.py", line 173, in __getattr__
2016-04-08 06:23:42.622 | self.get()
2016-04-08 06:23:42.622 | File "/home/jenkins/workspace/gate-horizon-python34/.tox/py34/lib/python3.4/site-packages/novaclient/v2/usage.py", line 35, in get
2016-04-08 06:23:42.622 | start = oslo_utils.timeutils.parse_strtime(self.start, fmt=fmt)
2016-04-08 06:23:42.622 | File "/home/jenkins/workspace/gate-horizon-python34/.tox/py34/lib/python3.4/site-packages/oslo_utils/timeutils.py", line 97, in parse_strtime
2016-04-08 06:23:42.623 | return datetime.datetime.strptime(timestr, fmt)
2016-04-08 06:23:42.623 | File "/usr/lib/python3.4/_strptime.py", line 500, in _strptime_datetime
2016-04-08 06:23:42.623 | tt, fraction = _strptime(data_string, format)
2016-04-08 06:23:42.623 | File "/usr/lib/python3.4/_strptime.py", line 337, in _strptime
2016-04-08 06:23:42.623 | (data_string, format))
2016-04-08 06:23:42.623 | ValueError: time data '2012-01-01 00:00:00' does not match format '%Y-%m-%dT%H:%M:%S.%f'

Revision history for this message
Matthias Runge (mrunge) wrote :

this kind of breakage could have been prevented with proper gating on dependencies

Changed in horizon:
status: Invalid → Confirmed
milestone: none → ongoing
Revision history for this message
xiangxinyong (xiangxinyong) wrote :

Thanks mrunge

Changed in horizon:
assignee: nobody → Rob Cresswell (robcresswell)
importance: Undecided → Critical
milestone: ongoing → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/303323

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/303323
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=d6afbac57f8982b981ad5afbcbf1a6434d4e4d01
Submitter: Jenkins
Branch: master

commit d6afbac57f8982b981ad5afbcbf1a6434d4e4d01
Author: Rob Cresswell <email address hidden>
Date: Fri Apr 8 10:43:16 2016 +0100

    Fix time in Nova test data

    A recent update to python-novaclient seems to have highlighted some
    incorrect test data, causing our tests to fail. This patch fixes the
    time format.

    Change-Id: I32a1e54205dd31176c0b7798597b63df544f8d38
    Closes-Bug: 1567634

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/304112

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (stable/mitaka)

Change abandoned by Kirill Zaitsev (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/304112

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/304583

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/liberty)

Reviewed: https://review.openstack.org/304583
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=fa00d7beb7226b9aba541af1fc72a0838f95c24c
Submitter: Jenkins
Branch: stable/liberty

commit fa00d7beb7226b9aba541af1fc72a0838f95c24c
Author: Rob Cresswell <email address hidden>
Date: Fri Apr 8 10:43:16 2016 +0100

    Fix Nova test data and selenium tests

    This patch squashes two commits, as the commit issues (broken tests)
    were blocking each other.

    Fix time in Nova test data

    A recent update to python-novaclient seems to have highlighted some
    incorrect test data, causing our tests to fail. This patch fixes the
    time format.

    Change-Id: I32a1e54205dd31176c0b7798597b63df544f8d38
    Closes-Bug: 1567634
    (cherry picked from commit d6afbac57f8982b981ad5afbcbf1a6434d4e4d01)

    Fix Selenium Tests

    A recent update to XStatic-Jasmine appears to have altered the class
    name that a selenium test was looking for. This patch amends the class
    so that the test correctly finds the class.

    Change-Id: I8d6844cdb14a84bd5498429b8545cdca8ba173b6
    Closes-Bug: 1567965
    (cherry picked from commit 7661db1ba438a13cf77d64913bfc88767b6bcdae)

tags: added: in-stable-liberty
tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/mitaka)

Reviewed: https://review.openstack.org/304204
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6ee33401198333c191c7eec0d9709420311a192e
Submitter: Jenkins
Branch: stable/mitaka

commit 6ee33401198333c191c7eec0d9709420311a192e
Author: Rob Cresswell <email address hidden>
Date: Fri Apr 8 10:43:16 2016 +0100

    Fix Nova test data and selenium tests

    This patch squashes two commits, as the commit issues (broken tests)
    were blocking each other.

    Fix time in Nova test data

    A recent update to python-novaclient seems to have highlighted some
    incorrect test data, causing our tests to fail. This patch fixes the
    time format.

    Change-Id: I32a1e54205dd31176c0b7798597b63df544f8d38
    Closes-Bug: 1567634
    (cherry picked from commit d6afbac57f8982b981ad5afbcbf1a6434d4e4d01)

    Fix Selenium Tests

    A recent update to XStatic-Jasmine appears to have altered the class
    name that a selenium test was looking for. This patch amends the class
    so that the test correctly finds the class.

    Change-Id: I8d6844cdb14a84bd5498429b8545cdca8ba173b6
    Closes-Bug: 1567965
    (cherry picked from commit 7661db1ba438a13cf77d64913bfc88767b6bcdae)

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 9.0.1

This issue was fixed in the openstack/horizon 9.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 8.0.2

This issue was fixed in the openstack/horizon 8.0.2 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.