designate imports private symbols from oslo.messaging

Bug #1412812 reported by Doug Hellmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
High
Endre Karlson
oslo.messaging
Fix Released
Critical
Doug Hellmann

Bug Description

The work we are doing in https://blueprints.launchpad.net/oslo-incubator/+spec/drop-namespace-packages is exposing places in several projects where private symbols are being imported and used directly.

running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
OS_DEBUG=${OS_DEBUG:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \
${PYTHON:-python} -m subunit.run discover -t ./ ./designate/tests --list
--- import errors ---
Failed to import test module: designate.tests
Traceback (most recent call last):
  File "/home/ubuntu/repos/openstack/designate/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 479, in _find_test_path
    package = self._get_module_from_name(name)
  File "/home/ubuntu/repos/openstack/designate/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 384, in _get_module_from_name
    __import__(name)
  File "designate/tests/__init__.py", line 28, in <module>
    from oslo.messaging.notify import _impl_test as test_notifier
ImportError: cannot import name _impl_test
Non-zero exit code (2) from test listing.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

This is blocking our release of oslo.messaging, so I am going to add the symbol to the library to try to let the tests pass. The designate tests should still be updated, because when we remove the oslo namespace package the symbol won't be there any more at all.

Changed in oslo.messaging:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Doug Hellmann (doug-hellmann)
milestone: none → next-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

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

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

Reviewed: https://review.openstack.org/148736
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=76808973c314268972e7e7775a4c867bfa1bf746
Submitter: Jenkins
Branch: master

commit 76808973c314268972e7e7775a4c867bfa1bf746
Author: Doug Hellmann <email address hidden>
Date: Tue Jan 20 22:22:14 2015 +0000

    Add more private symbols to the old namespace package

    This patch exposes some private symbols used by the tests in nova and
    heat.

    Change-Id: Ide40b293c9b9c76aae094950720cead4179ea883
    Partial-Bug: #1412812
    Partial-Bug: #1412841

Kiall Mac Innes (kiall)
Changed in designate:
milestone: none → kilo-2
milestone: kilo-2 → kilo-3
importance: Undecided → High
status: New → Triaged
Changed in oslo.messaging:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

A second pass at this in oslo.messaging: https://review.openstack.org/150159

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/150159
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=eb9251173c30013616ae109b5b945e87e5347e18
Submitter: Jenkins
Branch: master

commit eb9251173c30013616ae109b5b945e87e5347e18
Author: Doug Hellmann <email address hidden>
Date: Mon Jan 26 21:46:02 2015 +0000

    Expose _impl_test for designate

    The previous attempt to do this in
    Ide40b293c9b9c76aae094950720cead4179ea883 created a new module
    oslo/messaging/notify/_impl_test.py which imported the symbols from
    oslo_messaging/notify/_impl_test.py. That doesn't actually work, because
    the functions to reset the notifications modify the copy of the symbol
    in the oslo_messaging package, but the designate tests are still looking
    at the copy in oslo/messaging.

    This change imports a copy of the module from oslo_messaging in the
    oslo/messaging namespace to make certain that the same module object,
    and therefore the same global data structure, is used no matter which
    path the code is accessed.

    The designate team still needs to fix their fixture, but this will let
    us release oslo.messaging without breaking their tests in the mean time.

    Partial-Bug: #1412812

    Change-Id: I629ac57ae1e74bb07e5e98ee2fbc21f8421c3c24

Changed in oslo.messaging:
status: Fix Committed → Fix Released
Changed in designate:
assignee: nobody → Endre Karlson (endre-karlson)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

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

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

Reviewed: https://review.openstack.org/165514
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=0412ffa3a6e8cb09804115e6216608a21c307915
Submitter: Jenkins
Branch: master

commit 0412ffa3a6e8cb09804115e6216608a21c307915
Author: Endre Karlson <email address hidden>
Date: Wed Mar 18 18:10:31 2015 +0100

    Fix the use of private symbols from oslo.messaging

    Closes-Bug: #1412812

    Change-Id: Ic940fd32005c17a14a523e1535bf5ca32bfe7cd2

Changed in designate:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in designate:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in designate:
milestone: kilo-3 → 2015.1.0
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.