Skip to content

Commit 2dbb612

Browse files
authored
Merge pull request #528 from weaviate/v6-rebased
Upgrade main branch to v6
2 parents ceb08a8 + 2e1492c commit 2dbb612

1,053 files changed

Lines changed: 124994 additions & 153752 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Ci related folders
1+
# CI related resources
22
/.github/ @weaviate/core
33
decrypt_secret.sh @weaviate/core
44
secrets.tar.gp @weaviate/core

.github/workflows/create-release.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
name: Create Release
22
on:
33
push:
4-
# run only on tags
54
tags:
65
- '**'
6+
pull_request:
7+
# Release a new SNAPSHOT version every time a PR is merged to v6.
8+
types: [closed]
9+
branches: ['v6']
710

811
jobs:
912
release:
1013
name: Deploy
11-
if: startsWith(github.ref, 'refs/tags')
14+
if: >
15+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags'))
16+
|| (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
1217
runs-on: ubuntu-latest
1318
steps:
14-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1520
- name: Unpack secrets
1621
env:
1722
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
@@ -39,7 +44,7 @@ jobs:
3944
retention-days: 1
4045
gh-release:
4146
name: Create a GitHub Release
42-
if: startsWith(github.ref, 'refs/tags')
47+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
4348
runs-on: ubuntu-latest
4449
needs: [ release ]
4550
steps:

.github/workflows/test.yaml

Lines changed: 111 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,118 @@ on:
44
branches:
55
- main
66
pull_request:
7+
concurrency:
8+
group: tests-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
env:
12+
IMG2VEC: cr.weaviate.io/semitechnologies/img2vec-pytorch:resnet50
13+
MINIO: minio/minio
14+
MODEL2VEC: cr.weaviate.io/semitechnologies/model2vec-inference:minishlab-potion-base-4M
15+
DOCKER_IMAGES_TAR: docker-images.tar
716

817
jobs:
9-
tests:
10-
name: Tests
18+
docker-cache:
19+
name: Cache shared Docker images
1120
runs-on: ubuntu-latest
1221
steps:
13-
- uses: actions/checkout@v3
14-
- name: Login to Docker Hub
15-
if: ${{ !github.event.pull_request.head.repo.fork }}
16-
uses: docker/login-action@v2
17-
with:
18-
username: ${{secrets.DOCKER_USERNAME}}
19-
password: ${{secrets.DOCKER_PASSWORD}}
20-
- name: Run Build
21-
run: mvn -DskipTests clean package
22-
- name: Run Tests
23-
env:
24-
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
25-
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
26-
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
27-
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
28-
OPENAI_APIKEY: ${{ secrets.OPENAI_APIKEY }}
29-
run: |
30-
mvn clean test
22+
- name: Login to Docker Hub
23+
if: ${{ !github.event.pull_request.head.repo.fork }}
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ secrets.DOCKER_USERNAME }}
27+
password: ${{ secrets.DOCKER_PASSWORD }}
28+
- id: cache-check
29+
uses: actions/cache/restore@v4
30+
env:
31+
DOCKER_CACHE_KEY: docker-images-${{ env.IMG2VEC }}-${{ env.MINIO }}-${{ env.MODEL2VEC }}
32+
with:
33+
path: ${{ env.DOCKER_IMAGES_TAR }}
34+
key: ${{ env.DOCKER_CACHE_KEY }}
35+
lookup-only: true # Only check if cache exists, don't download
36+
- name: Free Disk Space (Ubuntu)
37+
uses: jlumbroso/free-disk-space@v1.3.1
38+
with:
39+
tool-cache: false
40+
android: true
41+
dotnet: true
42+
haskell: true
43+
large-packages: true
44+
docker-images: false
45+
swap-storage: false
46+
- name: Pull images
47+
if: steps.cache-check.outputs.cache-hit != 'true'
48+
run: |
49+
docker pull $IMG2VEC
50+
docker pull $MINIO
51+
# docker pull $MODEL2VEC
52+
docker save $IMG2VEC $MINIO -o $DOCKER_IMAGES_TAR
53+
- name: Cache images
54+
if: steps.cache-check.outputs.cache-hit != 'true'
55+
uses: actions/cache/save@v4
56+
env:
57+
DOCKER_CACHE_KEY: docker-images-${{ env.IMG2VEC }}-${{ env.MINIO }}-${{ env.MODEL2VEC }}
58+
with:
59+
path: ${{ env.DOCKER_IMAGES_TAR }}
60+
key: ${{ env.DOCKER_CACHE_KEY }}
61+
62+
maven-cache:
63+
name: Cache Maven dependencies
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v4
67+
- uses: actions/setup-java@v4
68+
with:
69+
distribution: "zulu"
70+
java-version: "17"
71+
cache: "maven"
72+
- run: mvn dependency:go-offline
73+
74+
test:
75+
name: Test
76+
runs-on: ubuntu-latest
77+
needs: [docker-cache, maven-cache]
78+
strategy:
79+
fail-fast: false
80+
matrix:
81+
WEAVIATE_VERSION: ["1.32.24", "1.33.11", "1.34.7", "1.35.2"]
82+
steps:
83+
- uses: actions/checkout@v4
84+
85+
- uses: actions/cache/restore@v4
86+
env:
87+
DOCKER_CACHE_KEY: docker-images-${{ env.IMG2VEC }}-${{ env.MINIO }}-${{ env.MODEL2VEC }}
88+
with:
89+
path: ${{ env.DOCKER_IMAGES_TAR }}
90+
key: ${{ env.DOCKER_CACHE_KEY }}
91+
- name: Free Disk Space (Ubuntu)
92+
uses: jlumbroso/free-disk-space@v1.3.1
93+
with:
94+
tool-cache: false
95+
android: true
96+
dotnet: true
97+
haskell: true
98+
large-packages: true
99+
docker-images: false
100+
swap-storage: false
101+
- name: Load Docker images
102+
run: |
103+
if [ -f $DOCKER_IMAGES_TAR ]; then
104+
docker load -i $DOCKER_IMAGES_TAR
105+
fi
106+
- uses: actions/setup-java@v4
107+
name: Setup JDK
108+
with:
109+
distribution: "zulu"
110+
java-version: "17"
111+
cache: "maven"
112+
113+
- name: Run Tests (v${{ matrix.WEAVIATE_VERSION }})
114+
env:
115+
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
116+
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
117+
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
118+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
119+
OPENAI_APIKEY: ${{ secrets.OPENAI_APIKEY }}
120+
WEAVIATE_VERSION: ${{ matrix.WEAVIATE_VERSION }}
121+
run: mvn verify -Dgpg.skip

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@
1111
target/
1212
# maven-lombok-plugin
1313
.factorypath
14+
# Surefire statistics for optimized execution time
15+
.surefire-*

CONTRIBUTE.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributing works pretty easy. You can do a pull request or you can commit if you are part of a Weaviate team.
33

44
### Code of Conduct
5-
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
5+
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
66
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
77

88

@@ -27,6 +27,22 @@ AKA: smart commits
2727

2828
If you create a pull request without smart commits, the pull request will be [squashed into](https://blog.github.com/2016-04-01-squash-your-commits/) one git commit.
2929

30+
### Updating dependencies
31+
32+
It's a good practice to periodically check for possible dependency upgrades. Ideally, we should do it before every release.
33+
34+
```sh
35+
mvn versions:display-property-updates
36+
```
37+
38+
If appropriate, update dependency version with this command:
39+
40+
```sh
41+
mvn versions:update-properties
42+
```
43+
44+
Commit all version upgrades in a single commit, unless there's a good reason not to.
45+
3046
### Contributor License Agreement
3147

3248
Contributions to Weaviate Java client must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of Weaviate Java client. Go to [this page](https://weaviate.io/service/contributor-license-agreement) to read the current agreement.

0 commit comments

Comments
 (0)