Repository navigation
fix: exists() depends on exact FT.INFO error wording; an unrecognised "missing index" message makes create() never creat - #782
Open
nandanadileep wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Fixes #773.
Focused Python fix for: exists() depends on exact FT.INFO error wording; an unrecognised "missing index" message makes create() never create the index (regression from #672)
Changed implementation: redisvl/exceptions.py.
Regression tests: tests/unit/test_index_exists.py.
Verification (working directory
.):.venv/bin/python -m pytest -q -x -p no:cacheprovider -- /workspace/tests/unit/test_index_exists.py1188d0a987aa2dfb415707522fa7fe95d2143255.AI-assisted contribution: OpenCode using Autoloops wrote this patch. The automated harness independently ran the tests listed above. No human review is claimed.
Note
Low Risk
Narrow change to error-string matching for absent indexes; slightly broader substring match but covered by existing non-missing-index regression tests.
Overview
Extends missing-index detection for
FT.INFOfailures so Valkey Search (e.g. ElastiCache) is treated like Redis Search when an index does not exist.Adds the fragment
"not found in database"to_MISSING_INDEX_ERROR_FRAGMENTS, covering messages such asIndex with name '…' not found in database 0where the index name sits between “index” and “not found” and the old"index not found"substring did not match. A parametrized unit test documents that wording soexists()returnsFalseinstead of surfacing an unclassified error—which after #672 could blockcreate()from ever creating the index.Reviewed by Cursor Bugbot for commit 72a2487. Bugbot is set up for automated code reviews on this repo. Configure here.