Skip to content

Commit a473598

Browse files
committed
Merge branch '1.29/colbert-multivector-support' of https://github.com/weaviate/typescript-client into 1.29/map-include-vector-to-return-vector-generic
2 parents f7f525a + 2eef48b commit a473598

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4301
-763
lines changed

.github/workflows/main.yaml

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@ on:
88

99
env:
1010
WEAVIATE_124: 1.24.26
11-
WEAVIATE_125: 1.25.30
12-
WEAVIATE_126: 1.26.14
13-
WEAVIATE_127: 1.27.11
14-
WEAVIATE_128: 1.28.4
15-
WEAVIATE_129: 1.29.0-rc.1
11+
WEAVIATE_125: 1.25.34
12+
WEAVIATE_126: 1.26.17
13+
WEAVIATE_127: 1.27.15
14+
WEAVIATE_128: 1.28.11
15+
WEAVIATE_129: 1.29.1
16+
WEAVIATE_130: 1.30.0-rc.0-6b9a01c
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
1621

1722
jobs:
1823
checks:
@@ -29,7 +34,7 @@ jobs:
2934
npm run format:check
3035
npm run docs
3136
32-
tests:
37+
tests-without-auth:
3338
needs: checks
3439
runs-on: ubuntu-latest
3540
strategy:
@@ -41,9 +46,41 @@ jobs:
4146
{ node: "22.x", weaviate: $WEAVIATE_126},
4247
{ node: "22.x", weaviate: $WEAVIATE_127},
4348
{ node: "22.x", weaviate: $WEAVIATE_128},
44-
{ node: "18.x", weaviate: $WEAVIATE_129},
45-
{ node: "20.x", weaviate: $WEAVIATE_129},
46-
{ node: "22.x", weaviate: $WEAVIATE_129}
49+
{ node: "22.x", weaviate: $WEAVIATE_129},
50+
{ node: "18.x", weaviate: $WEAVIATE_130},
51+
{ node: "20.x", weaviate: $WEAVIATE_130},
52+
{ node: "22.x", weaviate: $WEAVIATE_130}
53+
]
54+
steps:
55+
- uses: actions/checkout@v3
56+
- uses: actions/setup-node@v3
57+
with:
58+
node-version: ${{ matrix.versions.node }}
59+
- name: Login to Docker Hub
60+
if: ${{ !github.event.pull_request.head.repo.fork && github.triggering_actor != 'dependabot[bot]' }}
61+
uses: docker/login-action@v3
62+
with:
63+
username: ${{secrets.DOCKER_USERNAME}}
64+
password: ${{secrets.DOCKER_PASSWORD}}
65+
- name: "Install dependencies"
66+
run: |
67+
npm ci
68+
ci/run_dependencies.sh ${{ matrix.versions.weaviate }}
69+
- name: "Run tests without authentication tests"
70+
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
71+
- name: "Transpile the package"
72+
run: npm run build
73+
- name: "Stop Weaviate"
74+
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }}
75+
76+
tests-with-auth:
77+
needs: checks
78+
runs-on: ubuntu-latest
79+
strategy:
80+
fail-fast: false
81+
matrix:
82+
versions: [
83+
{ node: "22.x", weaviate: $WEAVIATE_130}
4784
]
4885
steps:
4986
- uses: actions/checkout@v3
@@ -68,16 +105,11 @@ jobs:
68105
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
69106
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
70107
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
71-
- name: "Run tests without authentication tests (for forks)"
72-
if: ${{ github.event.pull_request.head.repo.fork }}
73-
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
74-
- name: "Transpile the package"
75-
run: npm run build
76108
- name: "Stop Weaviate"
77109
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }}
78110

79111
publish:
80-
needs: tests
112+
needs: [tests-with-auth, tests-without-auth]
81113
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
82114
runs-on: ubuntu-latest
83115
permissions:
@@ -107,4 +139,4 @@ jobs:
107139
uses: softprops/action-gh-release@v1
108140
with:
109141
generate_release_notes: true
110-
draft: true
142+
draft: true

ci/compose.sh

100644100755
File mode changed.

ci/docker-compose-rbac.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ services:
2828
AUTHORIZATION_RBAC_ENABLED: "true"
2929
AUTHORIZATION_ADMIN_USERS: "admin-user"
3030
AUTHORIZATION_VIEWER_USERS: "viewer-user"
31+
AUTHENTICATION_DB_USERS_ENABLED: "true"
32+
AUTHENTICATION_OIDC_ENABLED: "true"
33+
AUTHENTICATION_OIDC_CLIENT_ID: "wcs"
34+
AUTHENTICATION_OIDC_ISSUER: "https://auth.wcs.api.weaviate.io/auth/realms/SeMI"
35+
AUTHENTICATION_OIDC_USERNAME_CLAIM: "email"
36+
AUTHENTICATION_OIDC_GROUPS_CLAIM: "groups"
3137
...

ci/docker-compose-wcs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ services:
2323
AUTHENTICATION_OIDC_USERNAME_CLAIM: 'email'
2424
AUTHENTICATION_OIDC_GROUPS_CLAIM: 'groups'
2525
AUTHORIZATION_ADMINLIST_ENABLED: 'true'
26-
AUTHORIZATION_ADMINLIST_USERS: '[email protected]'
26+
AUTHORIZATION_ADMINLIST_USERS: '[email protected]'
2727
AUTHENTICATION_OIDC_SCOPES: 'openid,email'
2828
AUTHENTICATION_APIKEY_ENABLED: 'true'
2929
AUTHENTICATION_APIKEY_ALLOWED_KEYS: 'my-secret-key'
30-
AUTHENTICATION_APIKEY_USERS: '[email protected]'
30+
AUTHENTICATION_APIKEY_USERS: '[email protected]'
3131
DISABLE_TELEMETRY: 'true'
3232
...

package-lock.json

Lines changed: 19 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "weaviate-client",
3-
"version": "3.3.6",
3+
"version": "3.5.1",
44
"description": "JS/TS client for Weaviate",
55
"main": "dist/node/cjs/index.js",
66
"type": "module",
@@ -52,11 +52,11 @@
5252
"homepage": "https://github.com/weaviate/typescript-client#readme",
5353
"dependencies": {
5454
"abort-controller-x": "^0.4.3",
55-
"graphql": "^16.9.0",
55+
"graphql": "^16.10.0",
5656
"graphql-request": "^6.1.0",
57-
"long": "^5.2.3",
58-
"nice-grpc": "^2.1.10",
59-
"nice-grpc-client-middleware-retry": "^3.1.9",
57+
"long": "^5.2.4",
58+
"nice-grpc": "^2.1.11",
59+
"nice-grpc-client-middleware-retry": "^3.1.10",
6060
"nice-grpc-common": "^2.0.2",
6161
"uuid": "^9.0.1"
6262
},

src/collections/aggregate/integration.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('Testing of the collection.aggregate methods', () => {
3939

4040
beforeAll(async () => {
4141
client = await weaviate.connectToLocal();
42-
collection = client.collections.get(collectionName);
42+
collection = client.collections.use(collectionName);
4343
return client.collections
4444
.create({
4545
name: collectionName,
@@ -168,7 +168,7 @@ describe('Testing of the collection.aggregate methods', () => {
168168
});
169169

170170
it('should aggregate data without a search and one non-generic property metric', async () => {
171-
const result = await (await client).collections.get(collectionName).aggregate.overAll({
171+
const result = await (await client).collections.use(collectionName).aggregate.overAll({
172172
returnMetrics: collection.metrics
173173
.aggregate('text')
174174
.text(['count', 'topOccurrencesOccurs', 'topOccurrencesValue']),
@@ -307,7 +307,7 @@ describe('Testing of the collection.aggregate methods with named vectors', () =>
307307

308308
beforeAll(async () => {
309309
client = await weaviate.connectToLocal();
310-
collection = client.collections.get(collectionName);
310+
collection = client.collections.use(collectionName);
311311
const query = () =>
312312
client.collections.create<TestCollectionAggregateVectors>({
313313
name: collectionName,
@@ -355,7 +355,7 @@ describe('Testing of collection.aggregate.overAll with a multi-tenancy collectio
355355

356356
beforeAll(async () => {
357357
client = await weaviate.connectToLocal();
358-
collection = client.collections.get(collectionName);
358+
collection = client.collections.use(collectionName);
359359
return client.collections
360360
.create({
361361
name: collectionName,
@@ -407,7 +407,7 @@ describe('Testing of collection.aggregate search methods', () => {
407407

408408
beforeAll(async () => {
409409
client = await weaviate.connectToLocal();
410-
collection = client.collections.get(collectionName);
410+
collection = client.collections.use(collectionName);
411411
return client.collections
412412
.create({
413413
name: collectionName,

src/collections/backup/integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Integration testing of backups', () => {
1111
grpcPort: 50061,
1212
});
1313

14-
const getCollection = (client: WeaviateClient) => client.collections.get('TestBackupCollection');
14+
const getCollection = (client: WeaviateClient) => client.collections.use('TestBackupCollection');
1515

1616
beforeAll(() =>
1717
clientPromise.then((client) =>

src/collections/backup/unit.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ describe('Mock testing of backup cancellation', () => {
109109
let mock: CancelMock;
110110

111111
beforeAll(async () => {
112-
mock = await CancelMock.use('1.27.0', 8958, 8959);
113-
client = await weaviate.connectToLocal({ port: 8958, grpcPort: 8959 });
112+
mock = await CancelMock.use('1.27.0', 8912, 8913);
113+
client = await weaviate.connectToLocal({ port: 8912, grpcPort: 8913 });
114114
});
115115

116116
it('should throw while waiting for creation if backup is cancelled in the meantime', async () => {
@@ -133,7 +133,7 @@ describe('Mock testing of backup cancellation', () => {
133133
});
134134

135135
it('should return false if creation backup does not exist', async () => {
136-
const success = await client.backup.cancel({ backupId: `${BACKUP_ID}4`, backend: BACKEND });
136+
const success = await client.backup.cancel({ backupId: `${BACKUP_ID}-unknown`, backend: BACKEND });
137137
expect(success).toBe(false);
138138
});
139139

src/collections/config/integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ describe('Testing of the collection.config namespace', () => {
583583
vectorizer: 'none',
584584
})
585585
.do();
586-
const collection = client.collections.get(collectionName);
586+
const collection = client.collections.use(collectionName);
587587
const config = await collection.config
588588
.update({
589589
vectorizers: weaviate.reconfigure.vectorizer.update({
@@ -635,7 +635,7 @@ describe('Testing of the collection.config namespace', () => {
635635
return;
636636
}
637637
const collectionName = 'TestCollectionConfigUpdateGenerative';
638-
const collection = client.collections.get(collectionName);
638+
const collection = client.collections.use(collectionName);
639639
await client.collections.create({
640640
name: collectionName,
641641
vectorizers: weaviate.configure.vectorizer.none(),

0 commit comments

Comments
 (0)