inconsistent ID types from projects in dbapi
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
craton |
Fix Released
|
Undecided
|
Thomas Maddox |
Bug Description
Essentially, we're getting str typed IDs on the Project object we get back from dbapi.projects_
Acceptance Criteria:
1. dbapi surface for Projects returns Project objects that use a UUID typed ID for the ID attribute.
IRC snippet:
10:00 thomasem: Hmmm... I think we might be getting back inconsistent data types for project ID from the db api.
10:00 thomasem: sometimes it's UUID type, other times it's str
10:01 sigmavirus: thomasem: oh?
10:01 sigmavirus: It should always be UUID type
10:01 thomasem: Okay, lemme confirm. Could be something I did wrong.
10:01 thomasem: Thanks for the clarification.
10:03 VW has joined (~vw@108.
10:05 thomasem: TEM create: <class 'str'>
10:05 thomasem: TEM by_id: <class 'uuid.UUID'>
10:05 thomasem: Yeah, on create it returns a Project object with an str ID attribute, and on get it returns a Project with a UUID type id.
10:06 jimbaker: right, we like to keep it in the abstract type to the extent possible
10:06 thomasem: sigmavirus: ^^
10:06 jimbaker: same with ip addresses, etc
10:06 jimbaker: or ints for that matter :)
10:06 thomasem: So.. you're saying that we want that behavior?
10:06 thomasem: Even though it's inconsistent Project objects from the dbapi
10:06 jimbaker: thomasem, we want consistent behavior
10:06 thomasem: Okay, so then this is a bug. :)
10:06 jimbaker: and we want to keep it in the closest possible type
10:07 jimbaker: so that gives you the acceptance criteria :)
10:07 jimbaker: fortunately, we are not writing this code in tcl
10:07 thomasem: Cool. Thanks. I'll write up the bug and work around it in the tests with notes.
Changed in craton: | |
assignee: | nobody → Thomas Maddox (thomas-maddox) |
summary: |
- inconsistent-id-types-from-projects-in-dbapi + inconsistent ID types from projects in dbapi |
Changed in craton: | |
status: | New → In Progress |
Reviewed: https:/ /review. openstack. org/427777 /git.openstack. org/cgit/ openstack/ craton/ commit/ ?id=603cef7a31f 89ee73259ed7cee b859cc7eef7811
Committed: https:/
Submitter: Jenkins
Branch: master
commit 603cef7a31f89ee 73259ed7ceeb859 cc7eef7811
Author: Ian Cordasco <email address hidden>
Date: Wed Feb 15 08:41:49 2017 -0600
Adds Variables support to Projects resource
Includes Variables support, which is already present
in several other Craton resources, in the Projects
resource as well.
Project variables will serve as a top-most scope
of variables for resources that belong to a specific
project.
Partial-Bug: 1648626
Closes-Bug: 1661670
Change-Id: I574e834ce409ef d8ceafb15fe30a8 6ae93df2a80