Skip to content

DOC-7013 Add a path-based override rule so RedisVL examples can be staged locally - #3897

Merged
andy-stark-redis merged 1 commit into
mainfrom
DOC-7013-redisvl-local-staging
Aug 28, 2026
Merged

DOC-7013 Add a path-based override rule so RedisVL examples can be staged locally#3897
andy-stark-redis merged 1 commit into
mainfrom
DOC-7013-redisvl-local-staging

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

DOC-7013

What

LANGUAGE_TO_CLIENT in build/local_examples.py has always carried a 'redisvl': 'RedisVL' entry, but nothing could ever reach it: .py files always resolve to the 'python' language, and get_client_name_from_language_and_path had a path-based override for ioredis (.js), the three Lettuce variants (.java), and Rust-Sync/Rust-Async (.rs) — but none for Python. Every RedisVL fix therefore had to round-trip through redis-vl-python upstream, with no way to ship a local override in the meantime.

Adds the same shape of override the other clients already have: a .py file whose path contains redisvl now resolves to the RedisVL client instead of falling through to Python.

Verification

  • Created a throwaway file at local_examples/query_vector/redisvl/query_vector.py (removed before this commit) and ran build/local_examples.py: the log line read Processing local example: query_vector (python) ... Processed RedisVL example for query_vector, and the resulting data/examples.json entry's source field pointed at the local file instead of the upstream redis-vl-python doctest.
  • Removed the throwaway file and confirmed the mechanism doesn't leave anything behind that would need cleanup — data/examples.json is gitignored, so nothing else changed.
  • Diffed the full before/after examples.json and confirmed no other Python-language entry (i.e. no plain Python client anywhere) was affected by adding this branch.

This only wires up the mechanism — no local_examples/*/redisvl/ directory exists yet. Writing an actual RedisVL local override (e.g. for query_vector's vector3/vector4, which DOC-6968 declared out of scope partly because this gap existed) is separate follow-on work.

🤖 Generated with Claude Code


Note

Low Risk
Build-time client labeling in local_examples.py only; no runtime or security-sensitive behavior.

Overview
Local example staging now treats Python files like other language-specific overrides: paths containing redisvl resolve to the RedisVL client in get_client_name_from_language_and_path, instead of always falling through to generic Python.

This closes the gap where LANGUAGE_TO_CLIENT already mapped redisvl → RedisVL but no .py path rule could select it, so RedisVL fixes could not be staged locally until upstream redis-vl-python updated. No new local_examples/*/redisvl/ content ships in this PR—only the routing hook.

Reviewed by Cursor Bugbot for commit e89b02b. Bugbot is set up for automated code reviews on this repo. Configure here.

…aged locally

`LANGUAGE_TO_CLIENT` has always carried a `'redisvl': 'RedisVL'` entry, but
nothing could ever reach it: `get_language_from_extension` maps `.py` to
`'python'` unconditionally, and `get_client_name_from_language_and_path` had
no path-based override for Python the way it already does for ioredis
(`.js`), the three Lettuce variants (`.java`), and Rust-Sync/Rust-Async
(`.rs`). Every RedisVL fix therefore had to round-trip through
redis-vl-python upstream, with no way to ship a local override in the
meantime — the same mechanism `query_vector`'s Node.js/RedisVL clients are
the only two examples in that set, so this gap was DOC-6968's reason for
declaring `query_vector` out of scope rather than fixing it locally.

Added the same shape of path check as the existing ioredis/Lettuce/Rust
overrides: `.py` files under a path containing 'redisvl' now resolve to the
RedisVL client instead of falling through to Python.

Verified with a throwaway file at local_examples/query_vector/redisvl/
(removed before this commit): before the fix, that file's client-name
resolution had no path to RedisVL at all; after, `process_local_examples()`
correctly overrode the upstream RedisVL entry for `query_vector`, then fell
back to the upstream `redis-vl-python` doctest source cleanly once the
throwaway file was deleted. Diffed the full before/after examples.json and
confirmed no other Python-language entry changed.

Learned: this specific unreachable-client gap was the exact reason DOC-6968 declared query_vector's vector3/vector4 out of scope rather than writing a local RedisVL fix — that decision can be revisited now, though the two panes are still CLI-only for the other, independent reasons DOC-6968 documented (no field to filter on, $SHARD_K_RATIO unverifiable outside a cluster)
Gaps: no local_examples/*/redisvl/ directory exists yet — this ticket only wires up the mechanism; writing an actual RedisVL local override is separate follow-on work
Ticket: DOC-7013
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

DOC-7013

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history (5 new this commit):

Memory updated at e89b02b

@andy-stark-redis
andy-stark-redis requested a review from a team August 28, 2026 11:45
@andy-stark-redis andy-stark-redis self-assigned this Aug 28, 2026
@andy-stark-redis andy-stark-redis added the clients Client library docs label Aug 28, 2026

@dwdougherty dwdougherty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@andy-stark-redis
andy-stark-redis merged commit 88a0028 into main Aug 28, 2026
93 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7013-redisvl-local-staging branch August 28, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants