From 0611958dd5c7ddc1a718994370342be577a712b4 Mon Sep 17 00:00:00 2001 From: alonre24 Date: Wed, 1 May 2024 23:11:43 +0300 Subject: [PATCH 1/5] add redis compatible version field --- RAMP/module_metadata.py | 1 + 1 file changed, 1 insertion(+) diff --git a/RAMP/module_metadata.py b/RAMP/module_metadata.py index 90d8f5b..fac349d 100644 --- a/RAMP/module_metadata.py +++ b/RAMP/module_metadata.py @@ -55,6 +55,7 @@ "license", "min_redis_pack_version", "min_redis_version", + "compatible_redis_version" "module_file", "module_name", "os", From ecfcd5923cedb1b29d8e26afe61fbb50e908baf2 Mon Sep 17 00:00:00 2001 From: alonre24 Date: Wed, 1 May 2024 23:26:35 +0300 Subject: [PATCH 2/5] add the new field in more required places --- RAMP/module_metadata.py | 2 ++ RAMP/ramp.py | 1 + 2 files changed, 3 insertions(+) diff --git a/RAMP/module_metadata.py b/RAMP/module_metadata.py index fac349d..958e1cc 100644 --- a/RAMP/module_metadata.py +++ b/RAMP/module_metadata.py @@ -28,6 +28,7 @@ RUN_COMMAND_LINE_ARGS = None MIN_REDIS_VERSION = "4.0" MIN_REDIS_PACK_VERSION = "5.2" +COMPATIBLE_REDIS_VERSION = "7.6" RAMP_FORMAT_VERSION = 1 CONFIG_COMMAND = "" OVERIDE_COMMAND = [] # type: List[Dict[str, str]] @@ -121,6 +122,7 @@ def create_default_metadata(module_path): "optional-dependencies": MODULE_OPTIONAL_DEPENDENCIES, "min_redis_version": MIN_REDIS_VERSION, "min_redis_pack_version": MIN_REDIS_PACK_VERSION, + "compatible_redis_version": COMPATIBLE_REDIS_VERSION, "sha256": sha256_checksum(module_path), "commands": MODULE_COMMANDS, "ramp_format_version": RAMP_FORMAT_VERSION, diff --git a/RAMP/ramp.py b/RAMP/ramp.py index 0c0b09d..847f194 100755 --- a/RAMP/ramp.py +++ b/RAMP/ramp.py @@ -98,6 +98,7 @@ def unpack(bundle): @click.option('--runcmdargs', 'run_command_line_args', default=None, help='if set, use those args when running the redis server') @click.option('--redis-min-version', '-r', 'min_redis_version', default=None, help='redis minimum version') @click.option('--redis-pack-min-version', '-R', 'min_redis_pack_version', default=None, help='redis pack minimum version') +@click.option('--compatible_redis_version', '-R', 'compatible_redis_version', default=None, help='redis compatible version') @click.option('--config-command', '-cc', default=None, help='command used to configure module args at runtime') @click.option('--os', '-O', default=None, help='build target OS (Darwin/Linux)') @click.option('--capabilities', '-C', callback=comma_seperated_to_list, help='comma separated list of module capabilities') From af9f9c40bb782a05e8f92ab6bb3d60e401c416d5 Mon Sep 17 00:00:00 2001 From: alonre24 Date: Wed, 1 May 2024 23:31:03 +0300 Subject: [PATCH 3/5] add comma --- RAMP/module_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RAMP/module_metadata.py b/RAMP/module_metadata.py index 958e1cc..d5adbe8 100644 --- a/RAMP/module_metadata.py +++ b/RAMP/module_metadata.py @@ -56,7 +56,7 @@ "license", "min_redis_pack_version", "min_redis_version", - "compatible_redis_version" + "compatible_redis_version", "module_file", "module_name", "os", From a212ce16cb6421105b3f2a3625f12c7aeae4afca Mon Sep 17 00:00:00 2001 From: alonre24 Date: Thu, 2 May 2024 13:24:19 +0300 Subject: [PATCH 4/5] fix command line argument + test --- RAMP/module_metadata.py | 2 +- RAMP/ramp.py | 2 +- test.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RAMP/module_metadata.py b/RAMP/module_metadata.py index d5adbe8..6623366 100644 --- a/RAMP/module_metadata.py +++ b/RAMP/module_metadata.py @@ -28,7 +28,7 @@ RUN_COMMAND_LINE_ARGS = None MIN_REDIS_VERSION = "4.0" MIN_REDIS_PACK_VERSION = "5.2" -COMPATIBLE_REDIS_VERSION = "7.6" +COMPATIBLE_REDIS_VERSION = "7.4" RAMP_FORMAT_VERSION = 1 CONFIG_COMMAND = "" OVERIDE_COMMAND = [] # type: List[Dict[str, str]] diff --git a/RAMP/ramp.py b/RAMP/ramp.py index 847f194..eca1c70 100755 --- a/RAMP/ramp.py +++ b/RAMP/ramp.py @@ -98,7 +98,7 @@ def unpack(bundle): @click.option('--runcmdargs', 'run_command_line_args', default=None, help='if set, use those args when running the redis server') @click.option('--redis-min-version', '-r', 'min_redis_version', default=None, help='redis minimum version') @click.option('--redis-pack-min-version', '-R', 'min_redis_pack_version', default=None, help='redis pack minimum version') -@click.option('--compatible_redis_version', '-R', 'compatible_redis_version', default=None, help='redis compatible version') +@click.option('--compatible_redis_version', '-cr', 'compatible_redis_version', default=None, help='redis compatible version') @click.option('--config-command', '-cc', default=None, help='command used to configure module args at runtime') @click.option('--os', '-O', default=None, help='build target OS (Darwin/Linux)') @click.option('--capabilities', '-C', callback=comma_seperated_to_list, help='comma separated list of module capabilities') diff --git a/test.py b/test.py index 9e0f24f..f8190f5 100644 --- a/test.py +++ b/test.py @@ -114,6 +114,7 @@ def test_bundle_from_cmd(): command_line_args = "\\\"-output f --level debug\\\"" min_redis_version = "4.6" min_redis_pack_version = "5.0" + compatible_redis_version = "7.2" display_name = "test_module" capability_name = "Test & Module" module_name = "module_test" @@ -121,7 +122,7 @@ def test_bundle_from_cmd(): argv = [MODULE_FILE_PATH, '-a', author, '-e', email, '-D', description, '-d', display_name, '-b', capability_name, '-n', module_name, '-h', homepage, '-l', _license, '-c', command_line_args, - '-r', min_redis_version, '-R', min_redis_pack_version, + '-r', min_redis_version, '-R', min_redis_pack_version, '-cr', compatible_redis_version, '-C', ','.join([cap['name'] for cap in MODULE_CAPABILITIES]), '-o', BUNDLE_ZIP_FILE, '-cc', CONFIG_COMMAND, '-E', 'graph.bulk', '-E', 'graph.BULK', @@ -150,6 +151,7 @@ def test_bundle_from_cmd(): assert metadata["command_line_args"] == command_line_args assert metadata["min_redis_version"] == min_redis_version assert metadata["min_redis_pack_version"] == min_redis_pack_version + assert metadata["compatible_redis_version"] == compatible_redis_version assert metadata["config_command"] == CONFIG_COMMAND assert metadata["sha256"] == sha256_checksum(MODULE_FILE_PATH) assert len(metadata["capabilities"]) == len(MODULE_CAPABILITIES) From 4b45a84dbd144e6bf381ac2c27e52e3a41d3dab3 Mon Sep 17 00:00:00 2001 From: alonre24 Date: Thu, 2 May 2024 15:44:03 +0300 Subject: [PATCH 5/5] update command line arg Co-authored-by: Omer Shadmi <76992134+oshadmi@users.noreply.github.com> --- RAMP/ramp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RAMP/ramp.py b/RAMP/ramp.py index eca1c70..0de8514 100755 --- a/RAMP/ramp.py +++ b/RAMP/ramp.py @@ -98,7 +98,7 @@ def unpack(bundle): @click.option('--runcmdargs', 'run_command_line_args', default=None, help='if set, use those args when running the redis server') @click.option('--redis-min-version', '-r', 'min_redis_version', default=None, help='redis minimum version') @click.option('--redis-pack-min-version', '-R', 'min_redis_pack_version', default=None, help='redis pack minimum version') -@click.option('--compatible_redis_version', '-cr', 'compatible_redis_version', default=None, help='redis compatible version') +@click.option('--redis-compatible-version', '-cr', 'compatible_redis_version', default=None, help='redis compatible version') @click.option('--config-command', '-cc', default=None, help='command used to configure module args at runtime') @click.option('--os', '-O', default=None, help='build target OS (Darwin/Linux)') @click.option('--capabilities', '-C', callback=comma_seperated_to_list, help='comma separated list of module capabilities')