typescript-client icon indicating copy to clipboard operation
typescript-client copied to clipboard

Warn when weaviate and/or client are outdated

Open dirkkul opened this issue 2 years ago • 6 comments
trafficstars

Some users use very old versions of weaviate and client. We should warn them if it the minor version is 3 or more versions behind the last release.

Eg currently the last Weaviate version is 1.18.3, so we would warn users of 1.15 or below. We could do the same for the client versions.

dirkkul avatar Apr 13 '23 08:04 dirkkul

Hi @dirkkul . Is this issue still open. If it is open, can i work on this issue ?

Abhijithchintu avatar Jul 10 '23 07:07 Abhijithchintu

Hi, yes this is still open!

Here are the python PRs that implemeted that functionality: https://github.com/weaviate/weaviate-python-client/pull/343 https://github.com/weaviate/weaviate-python-client/pull/299

dirkkul avatar Jul 10 '23 08:07 dirkkul

Please review
https://github.com/weaviate/typescript-client/pull/81

Abhijithchintu avatar Aug 05 '23 21:08 Abhijithchintu

@Abhijithchintu, thanks for the contribution! https://github.com/weaviate/typescript-client/pull/81 is now merged, which covers warning for outdated Weaviate. Warning for an outdated client is still open, would you like to open a PR for that also?

tsmith023 avatar Aug 08 '23 17:08 tsmith023

Yes , i will work on warning for an outdated client. I have few doubts in that.

  1. how to fetch typescript client version
  2. Should we show the warning for client version (if applicable ) at the same time as weaviate version warning.

Abhijithchintu avatar Aug 08 '23 18:08 Abhijithchintu

In the Python client, the version of the package is obtained here, this is then used here when instantiating a Connection object alongside the check for the Weaviate server version.

I would say we follow a similar logic for the TypeScript client so warn of outdated client in the same place as warning for outdated server. For retrieving the version, there are concerns in TypeScript around revealing the entire package.json file to the browser when this client is used in frontend apps. As such, the recommendation here should be followed.

This prebuild script will be used within other build, test, and package scripts to ensure the version is always up-to-date without compromising the security of the package.json file.

tsmith023 avatar Aug 10 '23 09:08 tsmith023