feat: add bucket quota command and bucket-level tag support#15
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds bucket quota management commands and extends tag support to work with both buckets and objects (previously only objects). The implementation spans multiple layers of the architecture, from core traits to CLI commands, following established patterns throughout.
Changes:
- Added new
rc quotatop-level command withset,info, andclearsubcommands for managing bucket quotas via the Admin API - Extended
rc tagcommand to support both bucket paths (alias/bucket) and object paths (alias/bucket/key) - Added bucket tagging methods (
get_bucket_tags,set_bucket_tags,delete_bucket_tags) to the ObjectStore trait and S3Client implementation - Added quota management methods to the AdminApi trait and AdminClient implementation
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/TEST_MATRIX.md | Updated command list to include quota in optional commands |
| README.md | Updated command overview table to reflect bucket-level tag support and new quota command |
| crates/core/src/traits.rs | Extended ObjectStore trait with bucket-level tagging methods |
| crates/core/src/admin/types.rs | Added BucketQuota type with serialization test |
| crates/core/src/admin/mod.rs | Exported BucketQuota type and added quota operation methods to AdminApi trait |
| crates/s3/src/admin.rs | Implemented bucket quota Admin API methods (set/get/clear) |
| crates/s3/src/client.rs | Implemented bucket tagging methods, refactored tag building into shared function with proper error handling |
| crates/cli/src/commands/tag.rs | Refactored to support both bucket and object paths with TagTarget enum, improved code organization |
| crates/cli/src/commands/quota.rs | New command module implementing quota management with size parsing, human-readable formatting, and tests |
| crates/cli/src/commands/mod.rs | Integrated new quota command into CLI command routing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rc quotacommand withset/info/clearforalias/bucketrc tagto support both bucket paths (alias/bucket) and object paths (alias/bucket/key)Validation
Refs rustfs/rustfs#1925