Skip to content

feat: add event subcommands for bucket notifications#55

Merged
overtrue merged 2 commits intomainfrom
fix/issue-54-event-command
Mar 10, 2026
Merged

feat: add event subcommands for bucket notifications#55
overtrue merged 2 commits intomainfrom
fix/issue-54-event-command

Conversation

@overtrue
Copy link
Contributor

Summary

  • add rc event add/list/remove commands for bucket notification configuration
  • add core notification models and ObjectStore APIs for get/set bucket notifications
  • implement S3 adapter mapping for queue/topic/lambda notification rules
  • add RustFS compatibility fallback: when PutBucketNotificationConfiguration returns SDK service error but config is applied, verify via read-back and treat as success
  • document service-account policy file usage and new event commands in README

Issue

Validation

  • cargo fmt --all
  • cargo clippy --workspace -- -D warnings
  • cargo test --workspace
  • Docker verification against rustfs/rustfs:latest:
    • rc event list local/issue54-notify (empty rules)
    • rc event add local/issue54-notify arn:aws:sns:us-east-1:123456789012:topic --event 's3:ObjectCreated:*'
    • rc --json event list local/issue54-notify (rule present)
    • rc event remove local/issue54-notify arn:aws:sns:us-east-1:123456789012:topic
    • rc event list local/issue54-notify (empty rules)

Notes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class CLI support for managing per-bucket S3 event notification rules, backed by new core models/APIs and an S3 adapter implementation (including a RustFS compatibility read-back fallback).

Changes:

  • Introduces rc event add/list/remove CLI subcommands for bucket notification configuration.
  • Adds BucketNotification / NotificationTarget models and extends ObjectStore with get/set notification APIs.
  • Implements S3 notification get/set mapping (queue/topic/lambda) plus RustFS “service error but applied” read-back verification fallback.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
crates/s3/src/client.rs Implements notification get/set and RustFS read-back fallback; enables notifications capability.
crates/core/src/traits.rs Adds notification data models and extends ObjectStore trait with notification APIs.
crates/core/src/lib.rs Re-exports new notification types from rc_core.
crates/cli/src/commands/mod.rs Wires the new event command into the CLI command enum/dispatcher.
crates/cli/src/commands/event.rs Adds the event subcommand implementation plus unit tests for parsing/helpers.
README.md Documents service-account policy file usage and the new event commands.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overtrue overtrue merged commit 4034a3d into main Mar 10, 2026
15 checks passed
@overtrue overtrue deleted the fix/issue-54-event-command branch March 10, 2026 23:02
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.

Add event subcommand (rc event add/list/remove) for bucket notification configuration

2 participants