Project

General

Profile

Actions

Bug #17152

closed

Version snapshots have modified_at of when snapshot was created, not when content was last modified; also flag to preserve current version

Added by Peter Amstutz over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
-
Release relationship:
Auto

Description

When a collection snapshot is created (recording a version), it appears that modified_at gets set to that point in time. However, because created_at is when version 1 is created, and the same for every snapshot, we don't have a field that tells us when the content of that snapshot came into existence.

In other words, the modifed_at timestamp of a collection snapshot at version N is actually the point in time when version N+1 was created. This is not what we want.

Fix the API server so that snapshots get the modified_at of the collection at the moment the snapshot is taken.

Write a migration that adjust the existing modified_at fields when versioning is enabled. The modified_at of version N should take the modified_at of version N-1. The "modified_at" of version 1 should take the value of "created_at".

Related thing to fix: there's currently an option that delays making snapshots on updates. However, sometimes the client knows better and you want every change to create a new snapshot. The "preserve_version" flag seems like it should do that, but actually it doesn't (???) so either we need to adjust the behavior of that flag to have the expected behavior, or we need a new flag.

It would probably make sense for "preserve_version" flag to both ensure that the previous version is snapshotted, as well as indicating that the new version should be snapshotted when updated as well.


Subtasks 1 (0 open1 closed)

Task #17180: Review 17152-collection-preserve-version-changes (arvados repo) & 17152-always-preserve-collection-versions (wb2 repo)ResolvedPeter Amstutz12/03/2020Actions
Actions

Also available in: Atom PDF