Skip to content

Conversation

@joshrotenberg
Copy link
Collaborator

Summary

Implements module management commands for Redis Enterprise (#153).

Changes

  • Add module list, get, upload, delete, and config-bdb commands
  • Fix Module struct to match actual API response:
    • Changed name field to module_name
    • Changed version from String to u32
    • Made all fields optional except uid
  • Remove upgrade-bdb command as endpoint doesn't exist in API
  • Update tests to match new field names
  • Document correct config-bdb format in CLAUDE.md

Testing

All commands tested against local Redis Enterprise instance:

  • module list - works correctly, lists all available modules
  • module get <uid> - works correctly, retrieves specific module details
  • module config-bdb - works with correct format: {"modules": [{"module_name": "search", "module_args": "PARTITIONS AUTO"}]}
  • module delete - works correctly with force flag
  • module upload - needs multipart/form-data implementation (tracked separately)

Notes

  • The upgrade-bdb endpoint is documented in the API but doesn't exist on actual instances
  • The upload command needs to be updated to use multipart/form-data instead of JSON

Closes #153

- Add module list, get, upload, delete, and config-bdb commands
- Fix Module struct to match actual API response (module_name instead of name, version as u32)
- Remove upgrade-bdb command as endpoint doesn't exist in API
- Update tests to match new field names
- Document correct config-bdb format in CLAUDE.md

Note: upload command needs multipart/form-data implementation

Implements #153
- Add multipart/form-data support to reqwest client
- Implement module upload using v2 endpoint with v1 fallback
- Add proper error handling for missing upload endpoints
- Update tests to handle v2/v1 fallback behavior
- Document v1 vs v2 API strategy in CLAUDE.md
- Note that module upload may not be available on all instances

The upload command now properly handles multipart uploads and gracefully
falls back from v2 to v1 when needed.
The doc test incorrectly referenced v1() and v2() methods that don't exist.
ModuleHandler methods are called directly, with upload() handling v2/v1 fallback internally.
@joshrotenberg joshrotenberg merged commit 4050023 into main Sep 10, 2025
12 checks passed
@joshrotenberg joshrotenberg deleted the feat/enterprise-module-commands branch September 10, 2025 19:19
@joshrotenberg joshrotenberg restored the feat/enterprise-module-commands branch September 15, 2025 22:39
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.

feat(enterprise): implement module management commands

2 participants