Skip to content

Displaying old object versions doesn't reflect specific object lock retain date/timestamp #3225

@paraenggu

Description

@paraenggu

NOTE

The MinIO console (RELEASE.2024-01-11T07-46-16Z) doesn't reflect the actual object lock retain date of a specific version of an object. Instead, it always shows the one of the current (latest) version, which is confusing while looking at older versions and trying to understand why a specific version can or can't be deleted.

This might be related to the complete Metadata information and not only X-Amz-Object-Lock-Retain-Until-Date.

Expected Behavior

The "Metadata box" on the right side should display the X-Amz-Object-Lock-Retain-Until-Date of the selected version, after one clicks on a specific object version. The behaviour is expected to be the same as the "Object Info" box, which get's updated and reflects the data of the selected version.

Current Behavior

The "Metadata box" show the X-Amz-Object-Lock-Retain-Until-Date` of the current (latest) version.

Displaying the current version (here ee2c8e15-ee34-40a0-baf6-114d47f25eaa)

mc stat --version-id=ee2c8e15-ee34-40a0-baf6-114d47f25eaa  local-01/locking-test/1.txt
Name      : 1.txt
Date      : 2024-02-05 09:51:08 CET 
Size      : 45 B   
ETag      : 0e3c1f215cbe2bedee5ccb4a0d047ccf 
VersionID : ee2c8e15-ee34-40a0-baf6-114d47f25eaa 
Type      : file 
Metadata  :
  X-Amz-Object-Lock-Retain-Until-Date: 2024-02-06T08:51:08.753Z 
  X-Amz-Object-Lock-Mode             : COMPLIANCE 
  Content-Type                       : text/plain 

image

Displaying an older version (here 79d1de7c-6e55-42ae-954e-919160cd64f1)

mc stat --version-id=79d1de7c-6e55-42ae-954e-919160cd64f1  local-01/locking-test/1.txt
Name      : 1.txt
Date      : 2024-02-01 18:54:36 CET 
Size      : 34 B   
ETag      : ee56fdf3ea9db3cbbdede22568626a89 
VersionID : 79d1de7c-6e55-42ae-954e-919160cd64f1 
Type      : file 
Metadata  :
  X-Amz-Object-Lock-Mode             : COMPLIANCE 
  Content-Type                       : text/plain 
  X-Amz-Object-Lock-Retain-Until-Date: 2024-02-02T17:54:36.161Z 

The X-Amz-Object-Lock-Retain-Until-Date should be 2024-02-02T17:54:36.161Z but is shown as 2024-02-06T08:51:08.753Z in the console.

image

Possible Solution

Fetch/refresh metadata of selected version.

Steps to Reproduce (for bugs)

  1. Create a bucket with locking enabled
  2. Specify a retention time
  3. Upload an object
  4. Upload new versions of the object
  5. Inspect the X-Amz-Object-Lock-Retain-Until-Date metadata value within the old object versions

Context

Run into this issue, while testing some object locking behaviour.

Your Environment

  • MinIO version used: RELEASE.2024-01-11T07-46-16Z
  • Operating System and version: Fedora Linux 38, 6.6.14-100.fc38.x86_64
  • Browser (to access the console): Firefox 122.0 and Chromium Version 121.0.6167.85

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions