<div dir="ltr">How about I sync updated_at and created_at in my patch, and leave the finish to the other BP, by this way, I can use updated_at for the timestamp filter I added and it don't need to change again once the finish BP is complete.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 28, 2016 at 8:28 PM, Andrew Laski <span dir="ltr"><<a href="mailto:andrew@lascii.com" target="_blank">andrew@lascii.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>




<div><span class=""><div> </div>
<div> </div>
<div> </div>
<div>On Tue, Jun 28, 2016, at 03:26 AM, Zhenyu Zheng wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div>Hi all,<br></div>
<div> </div>
<div>I'm working on add pagination and timestamp filter for os-instance-actions API:<br></div>
<div><a href="https://review.openstack.org/#/c/326326/" target="_blank">https://review.openstack.org/#/c/326326/</a><br></div>
<div>As Alex_xu pointed out that it will be better to filter by `updated_at` for timestamp filter which is reasonable, but when I tried to modify the patch I found out that:<br></div>
<div> </div>
<div>1. The current APIs only called _record_action_start (objects.InstanceAction.action_start) and never call action_finish, so <br></div>
<div>the field of `finish_time` is always empty in instance_actions table;<br></div>
</div>
</blockquote><div> </div>
</span><div>There was a spec proposed to address this, though I don't believe it was approved for Newton. So for now you have to assume this will continue to be empty.</div><span class="">
<div> </div>
<blockquote type="cite"><div dir="ltr"><div> </div>
<div>2. The updated_at field is also empty, should we sync the updated_at time to the created_at time when we create the action and also update it whenever the action status changed, e.g finished.<br></div>
</div>
</blockquote><div> </div>
</span><div>When a finish_time is recorded that should definitely also update updated_at. I would be in favor of having updated_at set when the instance action is created. I've never fully understood why Nova doesn't do that generally.</div>
<div> </div>
<blockquote type="cite"><div dir="ltr"><div> </div>
<div>Thanks,<br></div>
<div>Kevin Zheng<br></div>
</div>
<div><u>__________________________________________________________________________</u><br></div>
<div>OpenStack Development Mailing List (not for usage questions)<br></div>
<div>Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br></div>
<div><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br></div>
</blockquote><div> </div>
</div>

<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>