feat: add module workflow tools (validate, inspect, package) #513
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