Skip to content

Redis Modules Identification missing for "searchlight" version of search module #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bsbodden opened this issue Oct 1, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@bsbodden
Copy link
Collaborator

bsbodden commented Oct 1, 2024

When we do a check for capabilities we should also check for the module named "searchlight" which is present instead of "search" in certain deployments
image

@bsbodden bsbodden added the bug Something isn't working label Oct 1, 2024
@bsbodden bsbodden self-assigned this Oct 1, 2024
@bsbodden
Copy link
Collaborator Author

bsbodden commented Oct 1, 2024

We already have the constant for it:

DEFAULT_REQUIRED_MODULES = [
    {"name": "search", "ver": 20600},
    {"name": "searchlight", "ver": 20600},
]

There are two call to validate_modules like:

validate_modules(installed_modules, [{"name": "search", "ver": 20810}])

My concern is the version number in the defaults being 20600 versus the 20810 being used in index.py

Potentially I simple fix would be to have a way to do an OR in, e.g. passing a flag (bool):

def validate_modules(
    installed_modules: Dict[str, Any],
    required_modules: Optional[List[Dict[str, Any]]] = None,
) -> None:

or, introduce an alias like:

DEFAULT_REQUIRED_MODULES = [
    {"name": "search", "alias": "searchlight", "ver": 20600},
]

assuming that it is safe to equate "search" and "searchlight"

@tylerhutcherson @justin-cechmanek @rbs333

@tylerhutcherson
Copy link
Collaborator

Following up on this thread -- the simple solution is to provide the additional searchlight module+version as another item in the list passed to validate_modules. That method does a check to see if either/or of the items in the provided list are present. Otherwise, an exception is raised.

tylerhutcherson added a commit that referenced this issue Oct 2, 2024
Fixes issue: #226 related
to the search module version checks. Also introduces a clean exception
module for adding RedisVL specific exceptions.
@tylerhutcherson
Copy link
Collaborator

Fixed here --> #227

@hassan-baig
Copy link

I'm seeing the following issue

It's Mac M1 Pro.
Redis is running on Docker, I also tried directly.

I'm on the latest package 0.3.4

ERROR - app.services.events.event_manager.EventManager: Unexpected error in __event_listener: Required Redis db module search >= 20600 OR searchlight >= 20600 not installed. See Redis Stack docs at https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants