Project

General

Profile

Actions

Bug #14595

closed

[API] logs.event_at has wrong timestamp

Added by Tom Clegg over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
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 1 (0 open1 closed)

Task #14609: Review 14595-leave-modified-atResolvedPeter Amstutz12/13/2018Actions

Related issues

Related to Arvados - Bug #13168: [API] state/priority-change triggers should not change container request modified_by_user_uuid to rootResolvedLucas Di Pentima03/29/2018Actions
Actions #1

Updated by Tom Clegg over 5 years ago

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

Updated by Tom Morris over 5 years ago

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

Updated by Peter Amstutz over 5 years ago

  • Assigned To set to Peter Amstutz
Actions #4

Updated by Peter Amstutz over 5 years 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.

Actions #5

Updated by Peter Amstutz over 5 years 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
Actions #6

Updated by Lucas Di Pentima over 5 years 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.

Actions #7

Updated by Peter Amstutz over 5 years ago

  • Status changed from New to Resolved
Actions #8

Updated by Tom Morris about 5 years ago

  • Release set to 15
Actions

Also available in: Atom PDF