Skip to content

Update CI to test all supported Weaviate and Node vers #128

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

Merged
merged 15 commits into from
May 14, 2024
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
12 changes: 8 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
pull_request:

env:
NEW_WEAVIATE_VERSION: 1.24.10
WEAVIATE_124: 1.24.12
WEAVIATE_125: preview-merge-stable-v1-25-into-main-ec81815

jobs:
checks:
Expand Down Expand Up @@ -38,9 +39,12 @@ jobs:
fail-fast: false
matrix:
versions: [
{ node: "18.x", weaviate: $NEW_WEAVIATE_VERSION},
{ node: "20.x", weaviate: $NEW_WEAVIATE_VERSION},
{ node: "22.x", weaviate: $NEW_WEAVIATE_VERSION}
{ node: "18.x", weaviate: $WEAVIATE_124},
{ node: "20.x", weaviate: $WEAVIATE_124},
{ node: "22.x", weaviate: $WEAVIATE_124},
{ node: "18.x", weaviate: $WEAVIATE_125},
{ node: "20.x", weaviate: $WEAVIATE_125},
{ node: "22.x", weaviate: $WEAVIATE_125}
]
steps:
- uses: actions/checkout@v3
Expand Down
58 changes: 50 additions & 8 deletions ci/docker-compose-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@ services:
restart: on-failure:0
ports:
- "8087:8080"
- "50058:50051"
environment:
CONTEXTIONARY_URL: contextionary:9999
QUERY_DEFAULTS_LIMIT: 20
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: "./weaviate-node-1"
DEFAULT_VECTORIZER_MODULE: text2vec-contextionary
ENABLE_MODULES: text2vec-contextionary
CLUSTER_HOSTNAME: "node1"
CLUSTER_GOSSIP_BIND_PORT: "7110"
CLUSTER_DATA_BIND_PORT: "7111"
RAFT_PORT: '8300'
RAFT_INTERNAL_RPC_PORT: "8301"
RAFT_JOIN: "node1:8300,node2:8300,node3:8300"
RAFT_BOOTSTRAP_EXPECT: "3"
DISABLE_TELEMETRY: 'true'
CONTEXTIONARY_URL: contextionary:9999
DEFAULT_VECTORIZER_MODULE: text2vec-contextionary
ENABLE_MODULES: text2vec-contextionary

weaviate-node-2:
init: true
Expand All @@ -29,19 +35,55 @@ services:
image: semitechnologies/weaviate:${WEAVIATE_VERSION}
ports:
- 8088:8080
- 6061:6060
- "50059:50051"
restart: on-failure:0
environment:
CONTEXTIONARY_URL: contextionary:9999
LOG_LEVEL: 'debug'
QUERY_DEFAULTS_LIMIT: 20
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: './weaviate-node-2'
CLUSTER_HOSTNAME: 'node2'
CLUSTER_GOSSIP_BIND_PORT: '7110'
CLUSTER_DATA_BIND_PORT: '7111'
CLUSTER_JOIN: 'weaviate-node-1:7110'
RAFT_PORT: '8300'
RAFT_INTERNAL_RPC_PORT: "8301"
RAFT_JOIN: "node1:8300,node2:8300,node3:8300"
RAFT_BOOTSTRAP_EXPECT: "3"
DISABLE_TELEMETRY: 'true'
CONTEXTIONARY_URL: contextionary:9999
DEFAULT_VECTORIZER_MODULE: text2vec-contextionary
ENABLE_MODULES: text2vec-contextionary
CLUSTER_HOSTNAME: 'node2'
CLUSTER_GOSSIP_BIND_PORT: '7112'
CLUSTER_DATA_BIND_PORT: '7113'

weaviate-node-3:
init: true
command:
- --host
- 0.0.0.0
- --port
- '8080'
- --scheme
- http
image: semitechnologies/weaviate:${WEAVIATE_VERSION}
ports:
- 8089:8080
- "50060:50051"
restart: on-failure:0
environment:
LOG_LEVEL: 'debug'
QUERY_DEFAULTS_LIMIT: 20
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: './weaviate-node-2'
CLUSTER_HOSTNAME: 'node3'
CLUSTER_GOSSIP_BIND_PORT: '7110'
CLUSTER_DATA_BIND_PORT: '7111'
CLUSTER_JOIN: 'weaviate-node-1:7110'
RAFT_PORT: '8300'
RAFT_INTERNAL_RPC_PORT: "8301"
RAFT_JOIN: "node1:8300,node2:8300,node3:8300"
RAFT_BOOTSTRAP_EXPECT: "3"
DISABLE_TELEMETRY: 'true'
CONTEXTIONARY_URL: contextionary:9999
DEFAULT_VECTORIZER_MODULE: text2vec-contextionary
ENABLE_MODULES: text2vec-contextionary
...
8 changes: 4 additions & 4 deletions src/collections/query/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ describe('Testing of the collection.query methods with a collection with a refer

it('should query with nearVector returning the referenced object', async () => {
const res = await collection.query.fetchObjectById(id2, { includeVector: true });
const ret = await collection.query.nearVector(res?.vectors.default!, {
const ret = await collection.query.nearVector(res?.vectors.vector!, {
returnProperties: ['testProp'],
returnReferences: [
{
Expand Down Expand Up @@ -898,10 +898,10 @@ describe('Testing of the collection.query methods with a multi-tenancy collectio
.query.fetchObjectById(id2, { includeVector: true }))!;
const obj1 = await collection
.withTenant(tenantOne)
.query.nearVector(vecs1.default, { targetVector: 'vector' });
.query.nearVector(vecs1.vector, { targetVector: 'vector' });
const obj2 = await collection
.withTenant(tenantTwo)
.query.nearVector(vecs2.default, { targetVector: 'vector' });
.query.nearVector(vecs2.vector, { targetVector: 'vector' });
expect(obj1.objects.length).toEqual(1);
expect(obj1.objects[0].properties.testProp).toEqual('one');
expect(obj1.objects[0].uuid).toEqual(id1);
Expand Down Expand Up @@ -1029,7 +1029,7 @@ maybe('Testing of collection.query using rerank functionality', () => {

it('should rerank the results in a nearObject query', async () => {
const obj = await collection.query.fetchObjectById(id1, { includeVector: true });
const ret = await collection.query.nearVector(obj?.vectors.default!, {
const ret = await collection.query.nearVector(obj?.vectors.vector!, {
rerank: {
property: 'text',
query: 'another',
Expand Down
100 changes: 100 additions & 0 deletions src/openapi/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ export interface paths {
/** Starts a process of restoring a backup for a set of classes */
post: operations['backups.restore'];
};
'/cluster/statistics': {
/** Returns Raft cluster statistics of Weaviate DB. */
get: operations['cluster.get.statistics'];
};
'/nodes': {
/** Returns status of Weaviate DB. */
get: operations['nodes.get'];
Expand Down Expand Up @@ -368,6 +372,8 @@ export interface definitions {
MultiTenancyConfig: {
/** @description Whether or not multi-tenancy is enabled for this class */
enabled?: boolean;
/** @description Nonexistent tenants should (not) be created implicitly */
autoTenantCreation?: boolean;
};
/** @description JSON object value. */
JsonObject: { [key: string]: unknown };
Expand Down Expand Up @@ -720,6 +726,8 @@ export interface definitions {
* @description The length of the vector indexing queue.
*/
vectorQueueLength?: number;
/** @description The load status of the shard. */
loaded?: boolean;
};
/** @description The definition of a backup node status response body */
NodeStatus: {
Expand All @@ -746,6 +754,57 @@ export interface definitions {
NodesStatusResponse: {
nodes?: definitions['NodeStatus'][];
};
/** @description The definition of Raft statistics. */
RaftStatistics: {
appliedIndex?: string;
commitIndex?: string;
fsmPending?: string;
lastContact?: string;
lastLogIndex?: string;
lastLogTerm?: string;
lastSnapshotIndex?: string;
lastSnapshotTerm?: string;
/** @description Weaviate Raft nodes. */
latestConfiguration?: { [key: string]: unknown };
latestConfigurationIndex?: string;
numPeers?: string;
protocolVersion?: string;
protocolVersionMax?: string;
protocolVersionMin?: string;
snapshotVersionMax?: string;
snapshotVersionMin?: string;
state?: string;
term?: string;
};
/** @description The definition of node statistics. */
Statistics: {
/** @description The name of the node. */
name?: string;
/**
* @description Node's status.
* @default HEALTHY
* @enum {string}
*/
status?: 'HEALTHY' | 'UNHEALTHY' | 'UNAVAILABLE' | 'TIMEOUT';
bootstrapped?: boolean;
dbLoaded?: boolean;
/** Format: uint64 */
initialLastAppliedIndex?: number;
lastAppliedIndex?: number;
isVoter?: boolean;
leaderId?: { [key: string]: unknown };
leaderAddress?: { [key: string]: unknown };
open?: boolean;
ready?: boolean;
candidates?: { [key: string]: unknown };
/** @description Weaviate Raft statistics. */
raft?: definitions['RaftStatistics'];
};
/** @description The cluster statistics of all of the Weaviate nodes */
ClusterStatisticsResponse: {
statistics?: definitions['Statistics'][];
synchronized?: boolean;
};
/** @description Either set beacon (direct reference) or set class and schema (concept reference) */
SingleRef: {
/**
Expand Down Expand Up @@ -2233,6 +2292,12 @@ export interface operations {
};
};
'schema.dump': {
parameters: {
header: {
/** If consistency is true, the request will be proxied to the leader to ensure strong schema consistency */
consistency?: boolean;
};
};
responses: {
/** Successfully dumped the database schema. */
200: {
Expand Down Expand Up @@ -2282,6 +2347,10 @@ export interface operations {
path: {
className: string;
};
header: {
/** If consistency is true, the request will be proxied to the leader to ensure strong schema consistency */
consistency?: boolean;
};
};
responses: {
/** Found the Class, returned as body */
Expand Down Expand Up @@ -2464,6 +2533,10 @@ export interface operations {
path: {
className: string;
};
header: {
/** If consistency is true, the request will be proxied to the leader to ensure strong schema consistency */
consistency?: boolean;
};
};
responses: {
/** tenants from specified class. */
Expand Down Expand Up @@ -2584,6 +2657,10 @@ export interface operations {
className: string;
tenantName: string;
};
header: {
/** If consistency is true, the request will be proxied to the leader to ensure strong schema consistency */
consistency?: boolean;
};
};
responses: {
/** The tenant exists in the specified class */
Expand Down Expand Up @@ -2742,6 +2819,29 @@ export interface operations {
};
};
};
/** Returns Raft cluster statistics of Weaviate DB. */
'cluster.get.statistics': {
responses: {
/** Cluster statistics successfully returned */
200: {
schema: definitions['ClusterStatisticsResponse'];
};
/** Unauthorized or invalid credentials. */
401: unknown;
/** Forbidden */
403: {
schema: definitions['ErrorResponse'];
};
/** Invalid backup restoration status attempt. */
422: {
schema: definitions['ErrorResponse'];
};
/** An error has occurred while trying to fulfill the request. Most likely the ErrorResponse will contain more information about the error. */
500: {
schema: definitions['ErrorResponse'];
};
};
};
/** Returns status of Weaviate DB. */
'nodes.get': {
parameters: {
Expand Down
Loading
Loading