Backwards incompatible exception changes

Bug #1322183 reported by Steven Hardy on 2014-05-22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Andrey Kurilin

Bug Description

The move to oslo exceptions in

has been done in a backwards incompatible way.

Heat is impacted by two issues in our tests, but I imagine many users may be surprised that the constructor ordering has changed.

- ClientException now inherits from Exception, and thus takes no constructor arguments, anywhere passing arguments will break.
- BadRequest constructor argument ordering has changes, so anywhere using positional arguments will break.

See: for what I had to do to make Heat tests work with trunk novaclient.

The main problem is that the gate is using the pypi version and that means we can't currently have tests which work with both the released and trunk version of novaclient. This is pretty inconvenient for devstack users running from trunk.

I'd also be interested to know if a proper analysis of the impact of this on novaclient itself has been performed, as it seems like there are at least a few areas where positional arguments are used, which may not work as expected now, e.g

Changed in python-novaclient:
assignee: nobody → Andrey Kurilin (akurilin)
Changed in python-novaclient:
status: New → In Progress

Submitter: Jenkins
Branch: master

commit 4e1ee661083bd672a884fd13fdb1ffaadea5252a
Author: Andrey Kurilin <email address hidden>
Date: Mon May 19 13:48:29 2014 +0300

    Set default http-based exception as `HttpError`

    Since exceptions from oslo is used, ClientException doesn't have any
    attributes related to HTTP, so `HttpError` should be set as default
    http-based exception.

    Also, attribute `code` is used in several project, so it should be
    returned and marked as deprecated.

    Partial-Bug: #1322183
    Change-Id: I3c71e2d25d6e36b5bac0f2b3add74d6747cf7c25

Michael Still (mikal) wrote :

Some of this was fixed in 1340596, and I believe this is now resolved.

Changed in python-novaclient:
importance: Undecided → Critical
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
no longer affects: python-novaclient/2.x.x
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers