Created at timestamps for Cue Database records does not change
Bug #1428896 reported by
Davide Agnello
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cue |
Fix Committed
|
High
|
Davide Agnello |
Bug Description
This issue is found in Cue's database models which make use of a custom defined TimeMixin class.
TimeMixin class sets the default timestamps to invalid time in the case timestamp column is not provided during record create. The time captured is when this class is first instantiated.
Correct resolution is to make use of Oslo Db TimeMixin class defined in:
oslo_db/
Changed in cue: | |
importance: | Undecided → High |
assignee: | nobody → Davide Agnello (dagnello) |
Changed in cue: | |
status: | New → In Progress |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/169128 /git.openstack. org/cgit/ stackforge/ cue/commit/ ?id=d5cb1c62760 1601456526ea9e0 e26897f417913f
Committed: https:/
Submitter: Jenkins
Branch: master
commit d5cb1c627601601 456526ea9e0e268 97f417913f
Author: dagnello <email address hidden>
Date: Wed Mar 25 14:59:10 2015 -0700
Updating database models to fix time stamp errors
* Updated DB models to use sqlalchemy models TimeStampMixIn from
our own version as our version had a bug in created_at timestamp
being the same for all created clusters.
* As part of sqlalchemy models TimeStampMixIn, updated_at is an
optional field, therefore changes to table definition was
required.
* Updated API to reflect optional fields (e.g. updated_at)
* Added test to verify created_at, updated_at and deleted_at times
are in correct order for corresponding changes (e.g. create,
update and delete).
closes-bug: 1428896 017d7f750da7979 67108da423c
Change-Id: I0047a197e48cbc