Change Stack timestamps to save correct info
Stack.updated_time is currently being treated as modification time of the object in the database. Since it's not a very useful thing to have and the CFN API treats this value as "the last time an update call was issued", it makes sense to have the same behavior here as well. This changes the current real-time retrieval of created_time and updated_time in favor of the attributes already present in the stack and changes the information stored in these two fields to be the time the stack was created and the time the stack was last updated by the user, respectively. Co-Authored-By: Anderson Mesquita <andersonvom@gmail.com> Closes-Bug: #1193269 Change-Id: I1fd6586b827b3f2babb5af5c85f9de25da74fbb6
This commit is contained in:
committed by
Anderson Mesquita
parent
ac8ef2a6ba
commit
ce690963e7
@@ -119,6 +119,11 @@ class Stack(BASE, HeatBase, SoftDelete):
|
||||
stack_user_project_id = sqlalchemy.Column(sqlalchemy.String(64),
|
||||
nullable=True)
|
||||
|
||||
# Override timestamp column to store the correct value: it should be the
|
||||
# time the create/update call was issued, not the time the DB entry is
|
||||
# created/modified. (bug #1193269)
|
||||
updated_at = sqlalchemy.Column(sqlalchemy.DateTime)
|
||||
|
||||
|
||||
class StackLock(BASE, HeatBase):
|
||||
"""Store stack locks for deployments with multiple-engines."""
|
||||
|
||||
Reference in New Issue
Block a user