Bug #14595

[API] logs.event_at has wrong timestamp

Added by Tom Clegg 9 months ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
12/13/2018
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

Some updates generate rows in the logs table with event_at set to the time of a previous update, not the one being logged:
  • logs.event_at is populated from object_being_updated.modified_at (not db_current_time like you might guess)
  • object_being_updated.modified_at is not updated when the updates are saved inside a leave_modified_user_alone block
Either one of these should fix it:
  • Use db_current_time for the log entry
  • Revert the part of #13168 that avoids updating modified_at. (The original premise of #13168 was to stop changing modified_by_user_uuid. I don't see anything in the commit messages or on the ticket explaining why we stopped changing modified_at as well -- perhaps we didn't need to?)

Subtasks

Task #14609: Review 14595-leave-modified-atResolvedPeter Amstutz


Related issues

Related to Arvados - Bug #13168: [API] state/priority-change triggers should not change container request modified_by_user_uuid to rootResolved03/29/2018

Associated revisions

Revision 0a6b4ed3
Added by Peter Amstutz 9 months ago

Merge branch '14595-leave-modified-at' refs #14595

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

History

#1 Updated by Tom Clegg 9 months ago

  • Related to Bug #13168: [API] state/priority-change triggers should not change container request modified_by_user_uuid to root added

#2 Updated by Tom Morris 9 months ago

  • Target version changed from To Be Groomed to 2018-12-21 Sprint

#3 Updated by Peter Amstutz 9 months ago

  • Assigned To set to Peter Amstutz

#4 Updated by Peter Amstutz 9 months ago

On further research, this is a regression introduced in 647511030800d228feb6955dfab9cb0a26cbfcfb as part of collection versions.

The leave_modified_by_user_alone should be restored to its previous behavior and a new leave_modified_at_alone should be added to accommodate the collection versions use case.

#5 Updated by Peter Amstutz 9 months ago

14595-leave-modified-at @ 2aa58f31ac8fc696361214a05ab9ba75a5140b08

https://ci.curoverse.com/view/Developer/job/developer-run-tests/1010/

  • Add leave_modified_at_alone
  • leave_modified_by_user_alone does not affect modified_at

#6 Updated by Lucas Di Pentima 9 months ago

Just one small comment: On services/api/lib/arvados_model_updates.rb:L23 the comment refers to "modified_at_uuid" field. The rest LGTM.

#7 Updated by Peter Amstutz 9 months ago

  • Status changed from New to Resolved

#8 Updated by Tom Morris 7 months ago

  • Release set to 15

Also available in: Atom PDF