Skip to content

Add bucket compression admin actions.#243

Merged
harshavardhana merged 1 commit into
minio:mainfrom
klauspost:bucket-compression
Jul 12, 2026
Merged

Add bucket compression admin actions.#243
harshavardhana merged 1 commit into
minio:mainfrom
klauspost:bucket-compression

Conversation

@klauspost

@klauspost klauspost commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added support for bucket compression admin actions, including setting and viewing compression settings.
    • These actions can now be used in policy statements with bucket-level access rules.
  • Bug Fixes
    • Expanded built-in admin policy permissions so bucket compression actions are recognized as valid and allowed where applicable.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ec9434c0-c400-4cbf-8842-3549a76ac13c

📥 Commits

Reviewing files that changed from the base of the PR and between d166243 and db206ad.

📒 Files selected for processing (3)
  • policy/admin-action.go
  • policy/constants.go
  • policy/policy_test.go

📝 Walkthrough

Walkthrough

Two new admin policy action constants, SetBucketCompressionAdminAction and GetBucketCompressionAdminAction, are introduced for bucket compression. They are registered in SupportedAdminActions and AdminActionsWithResource, added to the infraAdmin canned policy, and covered by an updated test asserting bucket-scoped resource behavior.

Changes

Bucket Compression Admin Actions

Layer / File(s) Summary
Define and register bucket compression admin actions
policy/admin-action.go, policy/constants.go
Adds SetBucketCompressionAdminAction and GetBucketCompressionAdminAction constants, registers them in SupportedAdminActions and AdminActionsWithResource, and grants both to the infraAdmin policy's action set.
Test coverage for resource scoping
policy/policy_test.go
Extends the bucketScoped list in TestAdminActionHasResource to verify both new actions report HasResource() == true.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

Two new keys jingle on the ring,
Compression actions take their wing,
Bucket-scoped and policy-blessed,
With tests to prove they pass the test,
Hop, hop, hooray — a tidy little thing! 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding new bucket compression admin actions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@harshavardhana
harshavardhana merged commit ec2fe86 into minio:main Jul 12, 2026
11 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.

2 participants