weaviate / weaviate/weaviate-python-client

Fix flaky tenant input validations in different Python versions

Open
#1,355 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
Python
Stars
227
Forks
151
Avg merge
3d 14h
Merged PRs (30d)
11

Description

In Python3.12, it is certain that the logic used when validating the inputs for tenant CRUD methods can flake perhaps due to how Python performs these typing validations under-the-hood. This may be indicative of a bug in Python but we should fix it by avoiding this flaky behaviour:

"""
weaviate.exceptions.WeaviateInvalidInputError: Invalid input provided: Argument 'tenants' must be one of:
[
  <class 'weaviate.collections.classes.tenants.Tenant'>,
  <class 'weaviate.collections.classes.tenants.TenantUpdate'>,
  typing.Sequence[
      typing.Union[weaviate.collections.classes.tenants.Tenant,
      weaviate.collections.classes.tenants.TenantUpdate]
    ]
], but got <class 'list'>.
"""

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the tenant CRUD methods and the input-validation logic that accepts Tenant, TenantUpdate, or sequences of them. Reproduce the validation behavior across the relevant Python versions, then confirm that valid tenant inputs are accepted consistently and that coverage captures the previously flaky case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.