Mitaka unit tests broken (CLI/OSC test dependencies)

Bug #1656871 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Unassigned
Mitaka
Fix Released
High
Emilien Macchi

Bug Description

The unit tests are currently failing for tripleoclient on stable/mitaka (see e.g. https://review.openstack.org/#/c/398234/ ).

Traceback (most recent call last):
  File "/home/jpichon/devel/python-tripleoclient/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/home/jpichon/devel/python-tripleoclient/.tox/py27/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "tripleoclient/tests/v1/overcloud_upgrade/test_overcloud_upgrade.py", line 18, in <module>
    from tripleoclient.tests.v1.overcloud_upgrade import fakes
  File "tripleoclient/tests/v1/overcloud_upgrade/fakes.py", line 17, in <module>
    from openstackclient.tests import utils
ImportError: cannot import name utils

It looks like the utils file is gone from 3.7.0 (released during Ocata), while our requirements.txt only references >= 2.1.0 as a requirement. This likely needs to be capped (e.g. upper-constraints for Mitaka references 2.3.0 - https://github.com/openstack/requirements/blob/stable/mitaka/upper-constraints.txt#L298 ).

Trying to backport the Upper Constraints work at https://review.openstack.org/#/c/409535/ (changing the ref to Mitaka) unfortunately results in a different error:

Could not satisfy constraints for 'os-cloud-config': installation from path or url cannot be constrained to a version

Looks like our final requirements.txt for Mitaka had 2 libraries requirements defined as URLs: https://github.com/openstack/python-tripleoclient/blob/stable/mitaka/requirements.txt

I'm not sure what's the best way to go forward. Mitaka is still supported at least for security patches so we need to be able to backport patches there.

This isn't a problem for Newton onwards because we migrated to osc_lib which removed the problematic import ( https://review.openstack.org/#/c/370517/ ).

Julie Pichon (jpichon)
description: updated
summary: - Mitaka unit tests broken
+ Mitaka unit tests broken (CLI/OSC test dependencies)
Julie Pichon (jpichon)
Changed in tripleo:
milestone: ocata-3 → pike-1
milestone: pike-1 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/mitaka)

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

Julie Pichon (jpichon)
Changed in tripleo:
importance: High → Undecided
status: Triaged → Invalid
Changed in tripleo:
milestone: none → ocata-rc1
importance: Undecided → High
status: Invalid → In Progress
status: In Progress → Fix Released
milestone: ocata-rc1 → ocata-3
Revision history for this message
Julie Pichon (jpichon) wrote :

Setting back to In Progress, there's an issue with the dependent patch so this isn't merged yet.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/mitaka)

Reviewed: https://review.openstack.org/421537
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=105df7b2a2a237445398dd86552f5d53a8f23b23
Submitter: Jenkins
Branch: stable/mitaka

commit 105df7b2a2a237445398dd86552f5d53a8f23b23
Author: Ben Nemec <email address hidden>
Date: Tue Jan 17 21:21:11 2017 +0000

    Fix mitaka unit tests

    There are a couple of issues here. First, we have an uncapped
    openstackclient dependency, which means we are now pulling in a
    too-new version of osc without the utils module. The solution to
    this is to start using upper-constraints, but that brings us to
    problem two.

    Problem two is that we had some requirements that pointed directly
    at git repos in mitaka, which is incompatible with upper-constraints.
    To fix this, we can now use the released versions of these deps.
    os-cloud-config is in global-requirements without a version
    specified, and tripleo-common is added as a dependency of this
    patch.

    Change-Id: I1c219a3547ca48e5c4a649441632eabc326081f9
    Closes-Bug: 1656871

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 2.2.0

This issue was fixed in the openstack/python-tripleoclient 2.2.0 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.