Client refactor broke all object entrypoints
Bug #1706841 reported by
Adam Harwell
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-barbicanclient |
Fix Released
|
High
|
Jeremy Liu |
Bug Description
This refactor commit broke everything:
https:/
One entrypoint to the objects was:
from barbicanclient import secrets
But, all of the objects were moved to the v1 namespace, so that is now invalid, and broke many consumers.
The new imports look like:
from barbicanclient.v1 import secrets
Castellan did things a little differently, in a way that MIGHT have prevented this breakage:
from barbicanclient import client as barbican_client
barbican_
But, the same commit also removed the imports of the objects from barbicanclient.
Changed in barbican: | |
assignee: | nobody → Jeremy Liu (liujiong) |
affects: | barbican → python-barbicanclient |
Changed in python-barbicanclient: | |
status: | New → In Progress |
Changed in python-barbicanclient: | |
importance: | Undecided → High |
Changed in python-barbicanclient: | |
status: | Fix Released → New |
To post a comment you must log in.
Adam, are there any patches up for review to fix this in the broken projects or links to the code that is broken by the recent python- barbicanclient relese? Can you post links to them?
The part in the report above about castellan being broken is not true, as was figured out in the comments on https:/ /review. openstack. org/#/c/ 487721/ 1 .
Also, as far as I'm aware, the python- barbicanclient documentation does not recommend importing objects directly: "from barbicanclient import secrets", it recommends using the object managers that are created as part of the client as castellan does. Yes, it was bad to break backwards- compatibility without warning, but we also weren't aware that projects were using python- barbicanclient in a way that was not documented. Apologies for the trouble.