feat: add module workflow tools (validate, inspect, package)#513
Merged
joshrotenberg merged 3 commits intomainfrom Dec 17, 2025
Merged
feat: add module workflow tools (validate, inspect, package)#513joshrotenberg merged 3 commits intomainfrom
joshrotenberg merged 3 commits intomainfrom
Conversation
Add three new commands for Redis Enterprise 8.x module development: module validate - Validate module.json against RE8 schema - Checks required fields (module_name) - Warns about recommended fields (version, semantic_version, min_redis_version) - Highlights missing compatible_redis_version (important for RE8 upgrade tests) - Strict mode (--strict) requires all recommended fields - JSON output format supported module inspect - Inspect packaged module zip files - Shows package contents with file sizes - Parses and displays module.json metadata - Validates RE8-compatible structure (flat zip, module.json + .so at root) - Full mode (--full) shows all command definitions - Detects common packaging errors (subdirectories, missing files) module package - Create RE8-compatible module zip - Packages module binary + module.json into flat zip structure - Optional validation before packaging (--validate) - Creates proper structure for user_defined_modules bootstrap These tools support the RE8 native module packaging format which replaced the older RAMP-based packaging. The new format is a simple zip with module.json and the .so file at the root level. Examples: redisctl enterprise module validate ./module.json redisctl enterprise module validate ./module.json --strict redisctl enterprise module inspect ./package.zip redisctl enterprise module inspect ./package.zip --full redisctl enterprise module package --module ./mod.so --metadata ./module.json --out ./pkg.zip
- Fix useless format! macro in module_impl.rs - Collapse nested if statement using let-chains - Add bzip2-1.0.6 license to allowed licenses (used by zip crate)
- Document --name flag for module get command - Document --module flag for database create command - Add Custom Module Development section for RE8+ - Document validate, inspect, and package commands - Add module.json format reference
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
This PR adds three new commands to support Redis Enterprise 8.x custom module development workflows:
1.
module validate- Validate module.jsonValidates module metadata against the RE8 schema before packaging or upload.
Features:
compatible_redis_version(required for RE8 upgrade tests)-o json)2.
module inspect- Inspect packaged modulesInspects a module zip package to verify structure and contents.
Features:
3.
module package- Create RE8-compatible zipPackages a module binary and metadata into an RE8-compatible zip file.
redisctl enterprise module package \ --module ./libredis_jmespath.so \ --metadata ./module.json \ --out ./dist/redis-jmespath.Linux-x86_64.0.3.0.zip # With validation before packaging redisctl enterprise module package \ --module ./module.so \ --metadata ./module.json \ --out ./package.zip \ --validateFeatures:
--validate)user_defined_modulesbootstrapWhy These Tools?
Redis Enterprise 8.x uses a new native module packaging format:
ramp-packer,manifest.ymlmodule.json+module.soat rootThese tools help catch errors early:
compatible_redis_version(causes RE8 upgrade test failures)Testing
Files Changed
crates/redisctl/src/commands/enterprise/module.rs- Added command definitionscrates/redisctl/src/commands/enterprise/module_impl.rs- Added implementationscrates/redisctl/Cargo.toml- Addedzipdependency