Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add updatedAt for GetBucketLifecycleConfig #17271

Merged
merged 1 commit into from
May 25, 2023

Conversation

krisis
Copy link
Member

@krisis krisis commented May 24, 2023

Description

This will allow users to learn the most recent time when their bucket's ILM policy was updated.
The updatedAt timestamp is returned as part of GetBucketLifecycleConfig call as a response header like so,

X-Minio-Lifecycleconfig-Updatedat: 20230524T223706Z

Motivation and Context

Bucket ILM policies may be updated multiple times depending on an organization's evolving object lifecycle requirements. It can become difficult to reason with object lifecycle events like expiration, transition, etc without knowing when the ILM policy was last updated.

How to test this PR?

  1. Configure ILM policy for a bucket
  2. mc ilm ls --json ALIAS/bucket
    Requires Add updatedAt for ilm-rule-ls mc#4579 for testing
Sample output
{
 "status": "success",
 "target": "myminio/bucket",
 "config": {
  "Rules": [
   {
    "Expiration": {
     "Days": 200
    },
    "ID": "chn7t9lvvqdakbhfn73g",
    "Status": "Enabled"
   },
   {
    "ID": "chn934gd6vv3cmvlc5s0",
    "NoncurrentVersionExpiration": {
     "NoncurrentDays": 1
    },
    "Status": "Enabled"
   }
  ]
 },
 "updatedAt": "2023-05-24T22:37:06Z"
}

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

Copy link
Contributor

@shtripat shtripat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Verified the changes with mc PR#4579

@harshavardhana harshavardhana merged commit 62df731 into minio:master May 25, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants