Skip to content
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

Tests embedded different versions #979

Open
saireddythfc opened this issue Mar 25, 2024 · 4 comments
Open

Tests embedded different versions #979

saireddythfc opened this issue Mar 25, 2024 · 4 comments

Comments

@saireddythfc
Copy link

Hi,

I attempted to setup the repository on my local machine to begin contributions. On following the guidelines on contributing.md, I see there are multiple tests failing in various modules (integration, mock_tests, test). I did try committing changes and pushing the code resulted in a separate error that I have linked in Issue #933.

Here's the stats at the end of running each test module:

  1. Integration: 155 failed, 589 passed, 29 skipped, 4 errors in 517.43s (0:08:37)
  2. Mock_tests: 52 passed, 1 skipped, 46 warnings in 29.22s
  3. tests: 2 failed, 309 passed, 1 skipped, 23 warnings in 901.25s (0:15:01)

Let me know if you need the entire stack trace. Here's the "tests" error trace for instance:
FAILED test/test_embedded.py::test_embedded_different_versions - OSError: [Errno 8] Exec format error: '/private/var/folders/3v/_jgc177x2ln06306pq8qlcqc0000gn/T/pytest-of-hurrikane/pytest-2/bin2/weav...
FAILED test/test_embedded.py::test_version - urllib.error.HTTPError: HTTP Error 404: Not Found

Upon further inspection, the version "1.18.2" in tests/test_embedded.py is hard-coded on line 237.
Is this something to be looked at potentially?

@saireddythfc saireddythfc changed the title Tests fail when following the contributions guidelines. Tests embedded different versions Mar 25, 2024
@tsmith023
Copy link
Contributor

Hi @saireddythfc, the concerning errors there are the integration tests, as 155 of them seem to have failed. Can you post a representative example of how it's failing? It could be that your docker compose environments are not spinning up correctly thereby invalidating the tests since they depend on the presence of a local Weaviate instance to run

As to the test, as you'll see on L242 of the same test, the hard-coding there is part of the test definition. It's a requirement that a passed in version of 1.18.2 should spin up an embedded Weaviate whose running version is also 1.18.2

Let me know about the other errors so I can assist you!

@saireddythfc
Copy link
Author

Hi @tsmith023, thanks for the response!

I looked into the warning for the test and mock_tests run, here it is:

test/test_client.py: 10 warnings
test/test_embedded.py: 13 warnings
/my_file_path/weaviate-python-client/weaviate/warnings.py:158: DeprecationWarning: Dep016: You are using the Weaviate v3 client, which is deprecated.
Consider upgrading to the new and improved v4 client instead!
See here for usage: https://weaviate.io/developers/weaviate/client-libraries/python

warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

====================================== short test summary info ====================================
FAILED test/test_embedded.py::test_embedded_different_versions - OSError: [Errno 8] Exec format error: '/private/var/folders/3v/_jgc177x2ln06306pq8qlcqc0000gn/T/pytest-of-hurrikane/pytest-3/bin2/weav...
FAILED test/test_embedded.py::test_version - urllib.error.HTTPError: HTTP Error 404: Not Found

That being said, when I run pip show:
pip show weaviate-client
Name: weaviate-client
Version: 4.5.5.dev9+g524710ac
Summary: A python native Weaviate client
Home-page: https://github.com/weaviate/weaviate-python-client
Author: Weaviate
Author-email: hello@weaviate.io,
License: BSD 3-clause
Location: /usr/local/lib/python3.11/site-packages
Editable project location: /my_file_path/weaviate-python-client
Requires: authlib, grpcio, grpcio-health-checking, grpcio-tools, httpx, pydantic, requests, validators
Required-by: distyll-info

which seems to be the latest version according to the documentation.

As requested, here's a snippet of the integration run:
weaviate/collections/base.py:59: in _create
response = self._connection.post(
config = {'class': 'Test_batch_add', 'properties': [{'dataType': [<DataType.TEXT: 'text'>], 'name': 'title'}, {'dataType': [<Da...IndexType': 'hnsw', 'vectorizer': {'text2vec-contextionary': {'properties': ['title'], 'vectorizeClassName': False}}}}}
self = <weaviate.collections.collections._Collections object at 0x1105263d0>
weaviate/connect/v4.py:480: in post
return self.__send(
error_msg = 'Collection may not have been created properly.'
params = None
path = '/schema'
self = <weaviate.connect.v4.ConnectionV4 object at 0x110527c10>
status_codes = _ExpectedStatusCodes(ok_in=200, error='Create collection', ok=[200])
weaviate_object = {'class': 'Test_batch_add', 'properties': [{'dataType': [<DataType.TEXT: 'text'>], 'name': 'title'}, {'dataType': [<Da...IndexType': 'hnsw', 'vectorizer': {'text2vec-contextionary': {'properties': ['title'], 'vectorizeClassName': False}}}}}
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \

I'm attaching all the files containing the entire stack trace for each test run in case you need more context.
integrations.docx
mock_tests.docx
test.docx

@dirkkul
Copy link
Collaborator

dirkkul commented Mar 30, 2024

HI, could you please upload to traces to github gist or something like that?

@saireddythfc
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants