Conversation
INCLUDE_VECTOR is Union[bool, str, List[str]], and the validator accepts bool, str and Sequence, so passing one named vector as a string is a valid call. _MetadataQuery.from_public handled only bool and list, so a str matched neither branch: MetadataRequest asked for no vector at all and the caller got none back, with no error. _QueryOptions meanwhile recorded include_vector=True, so the response parser was told to expect one. Normalises str to [str] at the top of from_public.
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
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.
No open issue covers this.
INCLUDE_VECTORisUnion[bool, str, List[str]], and the validator acceptsbool,strandSequence, so one named vector passed as a string is a valid call._MetadataQuery.from_publicatgrpc.py:147handles onlyboolandlist, so astrmatches neither branch andMetadataRequestasks for nothing:The caller gets no vector and no error, while
_QueryOptionsrecordsTrue, so the response parser is told to expect one. The fix normalisesstrto[str]at the top offrom_public.Baseline on
eb5546ais591 passed, 1 skipped, so the delta is the three new cases. Revertinggrpc.pyand keeping them gives2 failed, 592 passed.The one existing test for this argument,
test_queries.py:100, assertsinclude_vector=42raises. Thestrpath was untested.I did not confirm this against a running Weaviate: no Docker here, so
integration/andjourney_tests/did not run. The proof is on the request-construction side, which needs no server, because a request that asks for no vector cannot return one.ruffis not installed in this venv, so I did not lint.@dirkkul you and @g-despot merge most of the client changes here, and
CODEOWNERScovers only.github/andci/. Worth astroverload on the type alias instead, or is normalising enough?