added madmin, inventory, batch-catalog support#201
Draft
HJLebbink wants to merge 1 commit intominio:masterfrom
Draft
added madmin, inventory, batch-catalog support#201HJLebbink wants to merge 1 commit intominio:masterfrom
HJLebbink wants to merge 1 commit intominio:masterfrom
Conversation
Add batch and s3inventory features
- Added 3 updated batch operation builders (batch_job_status, cancel_batch_job, describe_batch_job)
- Added complete s3inventory module with 7 APIs
- Added s3inventory tests (10 test files)
- Added s3inventory examples (14 example files)
- Updated lib.rs to export s3inventory module
- Added InvalidInventoryJobId variant to ValidationErr
- Added serde_yaml dependency for inventory YAML support
- Updated Cargo.toml with inventory example configurations
Total: 57 files (55 new + 2 modified)
Add madmin inventory control operations
- Added madmin/builders/inventory/ (cancel, suspend, resume inventory jobs)
- Added madmin/client/batch/mod.rs (batch client implementations)
- Added madmin/client/inventory/ (inventory control client implementations)
- Added madmin/response/inventory/ (inventory control response types)
- Fixed JobId type conversions in batch client methods
Total: 12 files (11 new + 1 modified)
Fix code quality issues per CLAUDE.md standards
CRITICAL FIXES:
- Added copyright headers to 9 batch builder files
- Replaced 36 panicking From with TryFrom implementations (12 types)
* AccessKey, SecretKey, PolicyName, GroupName, KmsKeyId, KmsIdentity,
TierName, PoolName, NodeAddress, ConfigKey, IdpConfigName, Arn
* All now use TryFrom pattern matching JobId implementation
- Updated examples and tests to use new TryFrom pattern
MAJOR FIXES:
- Added struct documentation to 8 batch builders
- Added comprehensive module documentation to batch/mod.rs
* Includes architecture, operations list, and usage examples
MINOR FIXES:
- Removed 2 redundant comments from generate_batch_job.rs
All changes follow CLAUDE.md typed parameter pattern and eliminate
runtime panics in favor of proper Result-based error handling.
Verified:
- ✅ cargo check passes
- ✅ cargo clippy shows 0 warnings
- ✅ All tests pass
- ✅ Examples compile
Refactor madmin client methods to S3-style pattern
Changed 6 user management client methods to accept parameters with
generic TryInto bounds, matching the S3 client API pattern.
BEFORE (builder-only pattern):
client.add_user()
.access_key(AccessKey::new("user")?)
.secret_key(SecretKey::new("pass")?)
.send().await?
AFTER (S3-style pattern):
client.add_user("user", "pass")?.send().await?
Methods updated:
- add_user(access_key, secret_key)
- remove_user(access_key)
- set_user(access_key, secret_key)
- delete_service_account(access_key)
- info_access_key(access_key)
- info_service_account(access_key)
Benefits:
- Cleaner, more ergonomic API
- Consistent with S3 client pattern
- Accepts &str, String, or pre-validated types
- Type validation at call site with proper error handling
Updated:
- 6 client method signatures
- 6 builder type aliases
- 3 examples (user_management, policy_management, service_accounts)
- 1 test file
Verified:
- ✅ cargo check passes
- ✅ All examples compile
- ✅ All tests pass (471 tests)
f324b47 to
f0a623a
Compare
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.
No description provided.