Cue

Created at timestamps for Cue Database records does not change

Bug #1428896 reported by Davide Agnello
6
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/sqlalchemy/models.py

Changed in cue:
importance: Undecided → High
assignee: nobody → Davide Agnello (dagnello)
Changed in cue:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cue (master)

Reviewed: https://review.openstack.org/169128
Committed: https://git.openstack.org/cgit/stackforge/cue/commit/?id=d5cb1c627601601456526ea9e0e26897f417913f
Submitter: Jenkins
Branch: master

commit d5cb1c627601601456526ea9e0e26897f417913f
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
    Change-Id: I0047a197e48cbc017d7f750da797967108da423c

Changed in cue:
status: In Progress → Fix Committed
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.