Use uuidutils instead of uuid.uuid4()

Bug #1792868 reported by Tao Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Opinion
Undecided
Tao Li

Bug Description

oslo_utils.uuidutils has a wrapper for generating uuids.
We should only use that function when generating
uuids for consistency like here:https://storyboard.openstack.org/#!/story/1082248.

Tao Li (eric-litao)
Changed in keystone:
assignee: nobody → Tao Li (eric-litao)
Tao Li (eric-litao)
Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

In line with my comment on the proposed change:

I am not a fan of wrapping basic functions in python with extra layers for the sake of extra layers.

I also do not think the is_uuid_like is strict enough for what we do in keystone. is_uuid_like would need to have a strict enforcement that no dashes are allowed for many of our storage cases if we were to lean on it.

---

With the way keystone is setup, if someone were to change the underlying id generator, it is possible that you could break all of keystone due to how we've structured our expectations of IDs when they are auto generated.

I'm going to hold with a firm -1. Bordering on a -2.

Unless there is a real drive to see some level of consistency specifically for a uuid generation and we (as keystone) have high levels of assurances that the function will never change (Even by accident), I don't foresee changing my stance on this.

This holds especially true with some of the upcoming changes where we are going to no longer generate explicitly uuids but utilize a combination hashing mechanism to provide better IDs (in the case of users). For now, this change is not consistent with the design of Keystone.

---

I am moving this to an opinion. It is not in line with the general direction of Keystone, but I can be convinced (longer term) to change my -1 depending on the overall direction of OpenStack projects (if there is a real drive for consistency on resource id generation).

Changed in keystone:
status: In Progress → Opinion
Revision history for this message
Adam Young (ayoung) wrote :

Heartily concur with Morgan's opinion here.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by "Gage Hugo <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/keystone/+/603542
Reason: Abandoning since there hasn't been any recent activity, if anyone wants to continue this work, please feel free to restore this or create a new change.

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.