Skip to content

feat: add BucketRetentionConfig to BucketDetails #576

@reivaj05

Description

@reivaj05

Summary

BucketDetails currently only exposes a boolean Locking flag. Callers that need to
display or act on the default retention configuration must issue a separate S3
GetObjectLockConfiguration request per bucket — O(N) requests for N locked buckets.

Proposed change

Add a BucketRetentionConfig struct and a RetentionConfig *BucketRetentionConfig
field to BucketDetails so the default retention rule (mode, days, years) is returned
in bulk alongside the rest of the bucket details via AccountInfo.

RetentionConfig is nil when the bucket has no default retention rule set.

Motivation

The MinIO AIStor console /buckets/object-locking screen lists all locked buckets with
their retention configuration. With the current API it fires one S3 request per locked
bucket on page load. With thousands of locked buckets this is a significant performance
problem.

PR

#575

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions