Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- '*'
- "*"

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand Down
33 changes: 10 additions & 23 deletions docs/how_to_release.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@

# This is an instruction of how to release a new version on Qdrant JS SDK


## Pre-requisites


- Install Node.js 18 or higher
- Insall `pnpm` 9. With never versions, it won't work! Download the binary directly from here: https://github.com/pnpm/pnpm/releases/tag/v9.15.9

- Install Node.js 18 or higher
- Insall `pnpm` 9. With never versions, it won't work! Download the binary directly from here: https://github.com/pnpm/pnpm/releases/tag/v9.15.9

Install dependencies using `pnpm`:

```bash
pnpm install
```


## Generate gRPC client


Go to grpc client directory, and run the following command:

```bash
Expand All @@ -32,10 +26,8 @@ and uses the `dev` branch of the Qdrant repository.

> Warn: If there are new `*.proto` files are added, we need to make decision if we want to include them or not.


## Generate REST client


The source of the OpenAPI schema itself is defined in `packages/js-client-rest/package.json`

```json
Expand All @@ -47,7 +39,6 @@ The source of the OpenAPI schema itself is defined in `packages/js-client-rest/p
By default, it is pointing to the `dev` branch of the Qdrant repository.
Change it, if you want to point to the `master` or some other branch.


To generate the REST client, run the following command:

```bash
Expand All @@ -66,17 +57,15 @@ src/openapi/genetated_api_client.ts

> Pro tip: if there are some problems with the generated code, our custom script `scripts/generate_client_construction.ts` might require some changes


### Modify `packages/js-client-rest/src/qdrant-client.ts` according to generated changes

- Inspect what changed in `src/openapi/generated_schema.ts` and modify `qdrant-client.ts` according to the changes:

- Inspect what changed in `src/openapi/generated_schema.ts` and modify `qdrant-client.ts` according to the changes:
- [ ] Make sure to add new API methods to `qdrant-client.ts`, if they are added in `src/openapi/generated_schema.ts`. This can be easily checked for by looking at the `operations` interface in `generated_schema.ts`.
If there is a new API function defined, we also need to create a corresponding API function inside `qdrant-client.ts`!
- [ ] Make sure that top-level arguments in `qdrant-client.ts` are aligned with the `src/openapi/generated_schema.ts`. This is similar to the previous step, but here you need to adjust the existing API-functions' parameters inside `qdrant-client.ts`.

- [ ] Make sure to add new API methods to `qdrant-client.ts`, if they are added in `src/openapi/generated_schema.ts`. This can be easily checked for by looking at the `operations` interface in `generated_schema.ts`.
If there is a new API function defined, we also need to create a corresponding API function inside `qdrant-client.ts`!
- [ ] Make sure that top-level arguments in `qdrant-client.ts` are aligned with the `src/openapi/generated_schema.ts`. This is similar to the previous step, but here you need to adjust the existing API-functions' parameters inside `qdrant-client.ts`.

- [ ] If needed, create tests for the new API methods
- [ ] If needed, create tests for the new API methods

To run the tests:

Expand All @@ -89,8 +78,6 @@ cd packages/js-client-rest
pnpm test:integration
```



## Update version

We need to update all the Qrant versions. We can easily list them by running the `grep` command below.
Expand All @@ -105,8 +92,8 @@ If you're confident with using vim or nano for that, you can easily run the comm
for i in $(grep -rn --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git '1\.15\.0' | cut -d ':' -f1 | uniq); do vi $i;done
```


The output of the `grep` should look like this:

```
packages/js-client-grpc/package.json:3: "version": "1.15.0" -- YES
packages/js-client-grpc/src/client-version.ts:1:export const PACKAGE_VERSION = '1.15.0'; -- YES
Expand All @@ -131,18 +118,17 @@ package.json "@qdrant/js-client-rest": "workspace:1.15.0",
package.json "@qdrant/js-client-grpc": "workspace:1.15.0" -- YES
```


### Update dependencies

We need to also update the dependencies (`.lock` file), when releasing. This can be done by running `pnpm install` from the git root.


## Final step: Committing changes

If something goes wrong, pre-commit hook might complain.

To debug this, you can run the commands below manually inside the `js-client-rest` folder, to find where it fails. These are the commands
invoked by the pre-commit hook.

```
pnpm tsc:check
pnpm tsc:deadcode
Expand All @@ -151,6 +137,7 @@ pnpm test run
```

The linter includes a format checker. To run it, use this command inside the `js-client-rest` directory:

```
pnpm prettier -w .
```
Expand Down
2 changes: 1 addition & 1 deletion examples/node-js-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"author": "Qdrant Team",
"license": "Apache-2.0",
"dependencies": {
"@qdrant/qdrant-js": "^1.15.0"
"@qdrant/qdrant-js": "^1.15.1"
}
}
6 changes: 6 additions & 0 deletions packages/js-client-grpc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @qdrant/js-client-grpc

## 1.15.1

### Minor Changes

- no changes

## 1.15.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/js-client-grpc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qdrant/js-client-grpc",
"version": "1.15.0",
"version": "1.15.1",
"engines": {
"node": ">=18.0.0",
"pnpm": ">=8"
Expand Down
4 changes: 3 additions & 1 deletion packages/js-client-grpc/proto/collections.proto
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ message OptimizersConfigDiff {
*/
optional uint64 default_segment_number = 3;
/*
Deprecated:

Do not create segments larger this size (in kilobytes).
Large segments might require disproportionately long indexation times,
therefore it makes sense to limit the size of segments.
Expand Down Expand Up @@ -398,7 +400,7 @@ message CreateCollection {
optional VectorsConfig vectors_config = 10; // Configuration for vectors
optional uint32 replication_factor = 11; // Number of replicas of each shard that network tries to maintain, default = 1
optional uint32 write_consistency_factor = 12; // How many replicas should apply the operation for us to consider it successful, default = 1
optional string init_from_collection = 13; // Specify name of the other collection to copy data from
optional string init_from_collection = 13; // Deprecated: specify name of the other collection to copy data from
optional QuantizationConfig quantization_config = 14; // Quantization configuration of vector
optional ShardingMethod sharding_method = 15; // Sharding method
optional SparseVectorConfig sparse_vectors_config = 16; // Configuration for sparse vectors
Expand Down
2 changes: 1 addition & 1 deletion packages/js-client-grpc/src/client-version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const PACKAGE_VERSION = '1.15.0';
export const PACKAGE_VERSION = '1.15.1';

interface Version {
major: number;
Expand Down
4 changes: 3 additions & 1 deletion packages/js-client-grpc/src/proto/collections_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,8 @@ export class OptimizersConfigDiff extends Message<OptimizersConfigDiff> {
defaultSegmentNumber?: bigint;

/**
*
* Deprecated:
*
* Do not create segments larger this size (in kilobytes).
* Large segments might require disproportionately long indexation times,
Expand Down Expand Up @@ -2467,7 +2469,7 @@ export class CreateCollection extends Message<CreateCollection> {
writeConsistencyFactor?: number;

/**
* Specify name of the other collection to copy data from
* Deprecated: specify name of the other collection to copy data from
*
* @generated from field: optional string init_from_collection = 13;
*/
Expand Down
6 changes: 6 additions & 0 deletions packages/js-client-rest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @qdrant/js-client-rest

## 1.15.1

### Minor Changes

- Implement missing `updateCollectionCluster` API

## 1.15.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/js-client-rest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qdrant/js-client-rest",
"version": "1.15.0",
"version": "1.15.1",
"engines": {
"node": ">=18.17.0",
"pnpm": ">=8"
Expand Down
2 changes: 1 addition & 1 deletion packages/js-client-rest/src/client-version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const PACKAGE_VERSION = '1.15.0';
export const PACKAGE_VERSION = '1.15.1';

interface Version {
major: number;
Expand Down
2 changes: 2 additions & 0 deletions packages/js-client-rest/src/openapi/generated_api_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function createClientApi(client: Client) : ClientApi {

/**
* Get lock options
* @deprecated
* @description Get lock options. If write is locked, all write operations and collection creation are forbidden
*/
getLocks:
Expand All @@ -65,6 +66,7 @@ export function createClientApi(client: Client) : ClientApi {

/**
* Set lock options
* @deprecated
* @description Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options
*/
postLocks:
Expand Down
2 changes: 2 additions & 0 deletions packages/js-client-rest/src/openapi/generated_client_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export type ClientApi = {

/**
* Get lock options
* @deprecated
* @description Get lock options. If write is locked, all write operations and collection creation are forbidden
*/
getLocks: TypedFetch<{
Expand Down Expand Up @@ -183,6 +184,7 @@ export type ClientApi = {

/**
* Set lock options
* @deprecated
* @description Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options
*/
postLocks: TypedFetch<{
Expand Down
39 changes: 26 additions & 13 deletions packages/js-client-rest/src/openapi/generated_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ export interface paths {
"/locks": {
/**
* Get lock options
* @deprecated
* @description Get lock options. If write is locked, all write operations and collection creation are forbidden
*/
get: operations["get_locks"];
/**
* Set lock options
* @deprecated
* @description Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options
*/
post: operations["post_locks"];
Expand Down Expand Up @@ -809,6 +811,7 @@ export interface components {
max_segment_size?: number | null;
/**
* Format: uint
* @deprecated
* @description Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmapped file.
*
* Memmap storage is disabled by default, to enable it, set this threshold to a reasonable value.
Expand Down Expand Up @@ -1051,7 +1054,7 @@ export interface components {
* @description Languages supported by snowball stemmer.
* @enum {string}
*/
SnowballLanguage: "Arabic" | "Armenian" | "Danish" | "Dutch" | "English" | "Finnish" | "French" | "German" | "Greek" | "Hungarian" | "Italian" | "Norwegian" | "Portuguese" | "Romanian" | "Russian" | "Spanish" | "Swedish" | "Tamil" | "Turkish";
SnowballLanguage: "arabic" | "armenian" | "danish" | "dutch" | "english" | "finnish" | "french" | "german" | "greek" | "hungarian" | "italian" | "norwegian" | "portuguese" | "romanian" | "russian" | "spanish" | "swedish" | "tamil" | "turkish";
BoolIndexParams: {
type: components["schemas"]["BoolIndexType"];
/** @description If true, store the index on disk. Default: false. */
Expand Down Expand Up @@ -1680,7 +1683,10 @@ export interface components {
/** @description Custom params for Optimizers. If none - values from service configuration file are used. */
optimizers_config?: components["schemas"]["OptimizersConfigDiff"] | (Record<string, unknown> | null);
/**
* @description Specify other collection to copy data from.
* @deprecated
* @description Specify other collection to copy data from.
*
* Deprecated since Qdrant 1.15.0.
* @default null
*/
init_from?: components["schemas"]["InitFrom"] | (Record<string, unknown> | null);
Expand Down Expand Up @@ -1735,13 +1741,16 @@ export interface components {
max_segment_size?: number | null;
/**
* Format: uint
* @deprecated
* @description Maximum size (in kilobytes) of vectors to store in-memory per segment. Segments larger than this threshold will be stored as read-only memmapped file.
*
* Memmap storage is disabled by default, to enable it, set this threshold to a reasonable value.
*
* To disable memmap storage, set this to `0`.
*
* Note: 1Kb = 1 vector of size 256
*
* Deprecated since Qdrant 1.15.0
*/
memmap_threshold?: number | null;
/**
Expand Down Expand Up @@ -2332,52 +2341,54 @@ export interface components {
*/
all?: boolean;
/**
* @description Whether to skip usage of RocksDB in immutable payload indices.
* @description Skip usage of RocksDB in new immutable payload indices.
*
* First implemented in Qdrant 1.13.5. Enabled by default in Qdrant 1.14.1
* @default true
*/
payload_index_skip_rocksdb?: boolean;
/**
* @description Whether to skip usage of RocksDB in mutable payload indices.
* @description Skip usage of RocksDB in new mutable payload indices.
* @default false
*/
payload_index_skip_mutable_rocksdb?: boolean;
/**
* @description Whether to skip usage of RocksDB for new payload storages.
* @description Skip usage of RocksDB in new payload storages.
*
* New on-disk payload storages were already using Gridstore. In-memory payload storages still choose RocksDB when this flag is not set.
* On-disk payload storages never use Gridstore.
*
* First implemented in Qdrant 1.15.0.
* @default false
*/
payload_storage_skip_rocksdb?: boolean;
/**
* @description Whether to use incremental HNSW building.
* @description Use incremental HNSW building.
*
* Enabled by default in Qdrant 1.14.1.
* @default true
*/
incremental_hnsw_building?: boolean;
/**
* @description Whether to actively migrate RocksDB based ID trackers into a new format.
* @default false
* @description Migrate RocksDB based ID trackers into file based ID tracker on start.
*
* Enabled by default in Qdrant 1.15.0.
* @default true
*/
migrate_rocksdb_id_tracker?: boolean;
/**
* @description Whether to actively migrate RocksDB based vector storages into a new format.
* @description Migrate RocksDB based vector storages into new format on start.
* @default false
*/
migrate_rocksdb_vector_storage?: boolean;
/**
* @description Whether to actively migrate RocksDB based payload storages into a new format.
* @description Migrate RocksDB based payload storages into new format on start.
* @default false
*/
migrate_rocksdb_payload_storage?: boolean;
/**
* @description Migrate away from RocksDB based payload indices.
* @description Migrate RocksDB based payload indices into new format on start.
*
* Triggers a payload index rebuild if RocksDB is used.
* Rebuilds a new payload index from scratch.
* @default false
*/
migrate_rocksdb_payload_indices?: boolean;
Expand Down Expand Up @@ -3845,6 +3856,7 @@ export interface operations {
};
/**
* Get lock options
* @deprecated
* @description Get lock options. If write is locked, all write operations and collection creation are forbidden
*/
get_locks: {
Expand Down Expand Up @@ -3883,6 +3895,7 @@ export interface operations {
};
/**
* Set lock options
* @deprecated
* @description Set lock options. If write is locked, all write operations and collection creation are forbidden. Returns previous lock options
*/
post_locks: {
Expand Down
Loading