Skip to content

Commit 5cf1640

Browse files
authored
Merge pull request #1454 from weaviate/dev/1.28
Dev/1.28
2 parents b56fc00 + e11b2f4 commit 5cf1640

File tree

138 files changed

+2190
-22316
lines changed

Some content is hidden

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

138 files changed

+2190
-22316
lines changed

.github/workflows/main.yaml

Lines changed: 20 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ on:
1414
pull_request:
1515

1616
env:
17-
WEAVIATE_123: 1.23.16
18-
WEAVIATE_124: 1.24.26
1917
WEAVIATE_125: 1.25.24
2018
WEAVIATE_126: 1.26.8
21-
WEAVIATE_127: stable-v1.27-372397e
22-
19+
WEAVIATE_127: 1.27.1
20+
WEAVIATE_128: 1.28.0-rc.0-09ea6b2
2321
jobs:
2422
lint-and-format:
2523
name: Run Linter and Formatter
@@ -114,79 +112,21 @@ jobs:
114112
name: coverage-report-integration-embedded
115113
path: coverage-integration-embedded.xml
116114

117-
integration-tests-v3:
118-
name: Run Integration Tests v3
119-
runs-on: ubuntu-latest
120-
strategy:
121-
fail-fast: false
122-
matrix:
123-
versions: [
124-
{ py: "3.9", weaviate: $WEAVIATE_126},
125-
{ py: "3.10", weaviate: $WEAVIATE_126},
126-
{ py: "3.11", weaviate: $WEAVIATE_123},
127-
{ py: "3.11", weaviate: $WEAVIATE_124},
128-
{ py: "3.11", weaviate: $WEAVIATE_125},
129-
{ py: "3.11", weaviate: $WEAVIATE_126},
130-
{ py: "3.12", weaviate: $WEAVIATE_127}
131-
]
132-
optional_dependencies: [false]
133-
steps:
134-
- uses: actions/checkout@v4
135-
with:
136-
fetch-depth: 0
137-
fetch-tags: true
138-
- uses: actions/setup-python@v5
139-
with:
140-
python-version: ${{ matrix.versions.py }}
141-
cache: 'pip' # caching pip dependencies
142-
- name: Login to Docker Hub
143-
uses: docker/login-action@v3
144-
if: ${{ !github.event.pull_request.head.repo.fork && github.triggering_actor != 'dependabot[bot]' }}
145-
with:
146-
username: ${{secrets.DOCKER_USERNAME}}
147-
password: ${{secrets.DOCKER_PASSWORD}}
148-
- run: |
149-
pip install -r requirements-devel.txt
150-
pip install .
151-
- name: free space
152-
run: sudo rm -rf /usr/local/lib/android
153-
- name: start weaviate
154-
run: /bin/bash ci/start_weaviate.sh ${{ matrix.versions.weaviate }}
155-
- name: Run integration tests with auth secrets
156-
if: ${{ !github.event.pull_request.head.repo.fork }}
157-
env:
158-
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
159-
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
160-
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
161-
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
162-
# OPENAI_APIKEY: ${{ secrets.OPENAI_APIKEY }} disabled until we have a working key
163-
run: pytest -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration-v3.xml integration_v3
164-
- name: Run integration tests without auth secrets (for forks)
165-
if: ${{ github.event.pull_request.head.repo.fork }}
166-
run: pytest -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration-v3.xml integration_v3
167-
- name: Archive code coverage results
168-
if: matrix.versions.py == '3.10' && (github.ref_name != 'main')
169-
uses: actions/upload-artifact@v4
170-
with:
171-
name: coverage-report-integration-v3
172-
path: coverage-integration-v3.xml
173-
- name: stop weaviate
174-
run: /bin/bash ci/stop_weaviate.sh ${{ matrix.versions.weaviate }}
175-
176115
integration-tests:
177116
name: Run Integration Tests
178117
runs-on: ubuntu-latest
179118
strategy:
180119
fail-fast: false
181120
matrix:
182121
versions: [
183-
{ py: "3.9", weaviate: $WEAVIATE_126},
184-
{ py: "3.10", weaviate: $WEAVIATE_126},
185-
{ py: "3.11", weaviate: $WEAVIATE_123},
186-
{ py: "3.11", weaviate: $WEAVIATE_124},
122+
{ py: "3.9", weaviate: $WEAVIATE_128},
123+
{ py: "3.10", weaviate: $WEAVIATE_128},
187124
{ py: "3.11", weaviate: $WEAVIATE_125},
188125
{ py: "3.11", weaviate: $WEAVIATE_126},
189-
{ py: "3.12", weaviate: $WEAVIATE_127}
126+
{ py: "3.11", weaviate: $WEAVIATE_127},
127+
{ py: "3.11", weaviate: $WEAVIATE_128},
128+
{ py: "3.12", weaviate: $WEAVIATE_128},
129+
{ py: "3.13", weaviate: $WEAVIATE_128}
190130
]
191131
optional_dependencies: [false]
192132
steps:
@@ -219,7 +159,7 @@ jobs:
219159
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
220160
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
221161
# OPENAI_APIKEY: ${{ secrets.OPENAI_APIKEY }} disabled until we have a working key
222-
run: pytest -n auto -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration.xml integration
162+
run: pytest -n auto --dist loadgroup -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration.xml integration
223163
- name: Run integration tests without auth secrets (for forks)
224164
if: ${{ github.event.pull_request.head.repo.fork }}
225165
run: pytest -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration.xml integration
@@ -239,10 +179,11 @@ jobs:
239179
fail-fast: false
240180
matrix:
241181
versions: [
242-
{ py: "3.9", weaviate: $WEAVIATE_125},
243-
{ py: "3.10", weaviate: $WEAVIATE_125},
244-
{ py: "3.11", weaviate: $WEAVIATE_125},
245-
{ py: "3.12", weaviate: $WEAVIATE_125}
182+
{ py: "3.9", weaviate: $WEAVIATE_128},
183+
{ py: "3.10", weaviate: $WEAVIATE_128},
184+
{ py: "3.11", weaviate: $WEAVIATE_128},
185+
{ py: "3.12", weaviate: $WEAVIATE_128},
186+
{ py: "3.13", weaviate: $WEAVIATE_128}
246187
]
247188
optional_dependencies: [false]
248189
steps:
@@ -269,7 +210,7 @@ jobs:
269210
run: /bin/bash ci/stop_weaviate.sh ${{ matrix.versions.weaviate }}
270211

271212
Codecov:
272-
needs: [Unit-Tests, Integration-Tests, Integration-Tests-v3]
213+
needs: [Unit-Tests, Integration-Tests]
273214
runs-on: ubuntu-latest
274215
if: github.ref_name != 'main'
275216
steps:
@@ -286,10 +227,6 @@ jobs:
286227
uses: actions/download-artifact@v4
287228
with:
288229
name: coverage-report-integration
289-
- name: Download coverage integration v3
290-
uses: actions/download-artifact@v4
291-
with:
292-
name: coverage-report-integration-v3
293230
- name: Download coverage integration embedded
294231
uses: actions/download-artifact@v4
295232
with:
@@ -298,7 +235,7 @@ jobs:
298235
uses: codecov/codecov-action@v4
299236
with:
300237
fail_ci_if_error: true
301-
files: ./coverage-integration.xml, ./coverage-integration-v3.xml, ./coverage-integration-embedded.xml, ./coverage-test.xml, ./coverage-mock_tests.xml
238+
files: ./coverage-integration.xml, ./coverage-integration-embedded.xml, ./coverage-test.xml, ./coverage-mock_tests.xml
302239
verbose: true
303240
token: ${{ secrets.CODECOV_TOKEN }}
304241

@@ -334,11 +271,10 @@ jobs:
334271
fail-fast: false
335272
matrix:
336273
server: [
337-
$WEAVIATE_123,
338-
$WEAVIATE_124,
339274
$WEAVIATE_125,
340275
$WEAVIATE_126,
341-
$WEAVIATE_127
276+
$WEAVIATE_127,
277+
$WEAVIATE_128
342278
]
343279
steps:
344280
- name: Checkout
@@ -370,7 +306,7 @@ jobs:
370306
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
371307
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
372308
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
373-
run: pytest -v -n auto integration
309+
run: pytest -v -n auto --dist loadgroup integration
374310
- name: Run integration tests without auth secrets (for forks)
375311
if: ${{ github.event.pull_request.head.repo.fork }}
376312
run: pytest -v -n auto integration
@@ -417,4 +353,4 @@ jobs:
417353
with:
418354
generate_release_notes: true
419355
draft: true
420-
files: dist/*.whl
356+
files: dist/*.whl

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: trailing-whitespace
1414

1515
- repo: https://github.com/myint/autoflake
16-
rev: v1.4
16+
rev: v2.2.1 # autoflake v2.2.1 is the latest version that supports Python 3.12
1717
hooks:
1818
- id: autoflake
1919
args: [--in-place, --remove-all-unused-imports, --exclude=weaviate/proto/*]
@@ -36,13 +36,13 @@ repos:
3636
]
3737
files: '^weaviate/collections'
3838

39-
- repo: local
40-
hooks:
39+
- repo: local
40+
hooks:
4141
- id: mypy
4242
name: mypy
4343
entry: ./run-mypy.sh
4444
language: python
45-
language_version: "3.11"
45+
language_version: "3.12"
4646
# use require_serial so that script
4747
# is only called once per commit
4848
require_serial: true

ci/compose.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function compose_down_all {
2121
}
2222

2323
function all_weaviate_ports {
24-
echo "8090 8081 8087 8088 8089 8086 8082 8083 8075 8079 8085 8080" # in alphabetic order of appearance in docker-compose files
24+
echo "8090 8081 8087 8088 8089 8086 8082 8083 8075 8079 8092 8085 8080" # in alphabetic order of appearance in docker-compose files
2525
}
2626

2727
function wait(){

ci/docker-compose-rbac.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
version: '3.4'
3+
services:
4+
weaviate-rbac:
5+
command:
6+
- --host
7+
- 0.0.0.0
8+
- --port
9+
- '8085'
10+
- --scheme
11+
- http
12+
- --write-timeout=600s
13+
image: semitechnologies/weaviate:${WEAVIATE_VERSION}
14+
ports:
15+
- 8092:8085
16+
- "50063:50051"
17+
restart: on-failure:0
18+
environment:
19+
ENABLE_MODULES: "generative-dummy,reranker-dummy"
20+
AUTHENTICATION_APIKEY_ENABLED: "true"
21+
AUTHENTICATION_APIKEY_ALLOWED_KEYS: "existing-key"
22+
AUTHENTICATION_APIKEY_USERS: "existing-user"
23+
AUTHORIZATION_ADMIN_USERS: "existing-user"
24+
PERSISTENCE_DATA_PATH: "./data-weaviate-0"
25+
CLUSTER_IN_LOCALHOST: "true"
26+
CLUSTER_GOSSIP_BIND_PORT: "7100"
27+
CLUSTER_DATA_BIND_PORT: "7101"
28+
RAFT_BOOTSTRAP_EXPECT: "1"
29+
AUTHORIZATION_ENABLE_RBAC: "true"
30+
...

integration/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def __call__(
7070
self,
7171
headers: Optional[Dict[str, str]] = None,
7272
ports: Tuple[int, int] = (8080, 50051),
73+
auth_credentials: Optional[weaviate.auth.AuthCredentials] = None,
7374
) -> weaviate.WeaviateClient:
7475
"""Typing for fixture."""
7576
...
@@ -82,6 +83,7 @@ def client_factory() -> Generator[ClientFactory, None, None]:
8283
def _factory(
8384
headers: Optional[Dict[str, str]] = None,
8485
ports: Tuple[int, int] = (8080, 50051),
86+
auth_credentials: Optional[weaviate.auth.AuthCredentials] = None,
8587
) -> weaviate.WeaviateClient:
8688
nonlocal client_fixture
8789
if client_fixture is None:
@@ -90,6 +92,7 @@ def _factory(
9092
grpc_port=ports[1],
9193
port=ports[0],
9294
additional_config=AdditionalConfig(timeout=(60, 120)), # for image tests
95+
auth_credentials=auth_credentials,
9396
)
9497
return client_fixture
9598

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
BackupFailedException,
2020
)
2121

22+
pytestmark = pytest.mark.xdist_group(name="backup")
23+
2224
BACKEND = BackupStorage.FILESYSTEM
2325

2426
PARAGRAPHS_IDS = [

0 commit comments

Comments
 (0)