Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
ef43d4a
chore: enforce minimal server version
bevzzz Oct 29, 2025
9c1adc5
test: add unit tests for SemanticVersion
bevzzz Oct 29, 2025
0ce5a58
chore: fix javadoc
bevzzz Oct 29, 2025
f335f9c
chore: set minimal server version to 1.31
bevzzz Oct 29, 2025
03530ed
test: upgrate Surefire to 3.5.4
bevzzz Nov 4, 2025
1a4fbfc
ci: run tests in parallel
bevzzz Nov 4, 2025
52e697c
test: remove ALL-UNNAMED opens from test config
bevzzz Nov 4, 2025
4f93a35
ci: extend test matrix to 2 latest Weaviate versions
bevzzz Nov 5, 2025
903c809
ci: fix syntax
bevzzz Nov 5, 2025
01a75b5
chore: use smaller image
bevzzz Nov 5, 2025
70bdad6
debug(ci): do not cache model2vec image
bevzzz Nov 5, 2025
cfa860d
ci(fix): do not save model2vec image
bevzzz Nov 5, 2025
2634d96
ci(fix): use correct version tag
bevzzz Nov 5, 2025
f70d376
chore: user lookup-only restore in Docker Cache step
bevzzz Nov 5, 2025
99779df
ci(fix): move env definition
bevzzz Nov 5, 2025
bd7c1a5
ci: disable fail-fast
bevzzz Nov 5, 2025
4d0fb6f
ci: skip GPG signing for tests job
bevzzz Nov 5, 2025
ac98d42
chore: skip tests that require a later version
bevzzz Nov 6, 2025
5c7e7f3
ci: expand test matrix
bevzzz Nov 6, 2025
9ad739e
ci: disable some tests for earlier versions
bevzzz Nov 6, 2025
7730461
ci: raise minimal required version to 1.32
bevzzz Nov 6, 2025
8c3583a
fix: use mutable list
bevzzz Nov 6, 2025
b3847d5
test: fix skip syntax
bevzzz Nov 6, 2025
ecef35c
build: drop Lombok dependency
bevzzz Nov 6, 2025
a534d9a
Merge branch 'v6' into v6-minimal-version
g-despot Nov 21, 2025
728aad7
Update Weaviate versions
g-despot Nov 21, 2025
657cfab
Free workflow disk space step
g-despot Nov 21, 2025
1bde56b
Free workflow disk space step
g-despot Nov 21, 2025
e9b1743
Fix failing TCs
g-despot Nov 21, 2025
9cd6c40
Update replication factor
g-despot Nov 21, 2025
82f7c17
Fix cluster creation
g-despot Nov 21, 2025
f4da5f6
Update bindNodes
g-despot Nov 21, 2025
cae7c72
Revert changes
g-despot Nov 21, 2025
869e8bb
Add missing env var
g-despot Nov 21, 2025
bcf6f48
chore: enforce minimal server version
bevzzz Oct 29, 2025
703411a
test: add unit tests for SemanticVersion
bevzzz Oct 29, 2025
7648bf7
chore: fix javadoc
bevzzz Oct 29, 2025
a31b7d2
chore: set minimal server version to 1.31
bevzzz Oct 29, 2025
7659b11
test: upgrate Surefire to 3.5.4
bevzzz Nov 4, 2025
9a585a1
ci: run tests in parallel
bevzzz Nov 4, 2025
daccf84
test: remove ALL-UNNAMED opens from test config
bevzzz Nov 4, 2025
44ef2d7
ci: extend test matrix to 2 latest Weaviate versions
bevzzz Nov 5, 2025
0169f62
ci: fix syntax
bevzzz Nov 5, 2025
d2a08ba
chore: use smaller image
bevzzz Nov 5, 2025
f0a96aa
debug(ci): do not cache model2vec image
bevzzz Nov 5, 2025
d085d06
ci(fix): do not save model2vec image
bevzzz Nov 5, 2025
05ec2ad
ci(fix): use correct version tag
bevzzz Nov 5, 2025
84f967a
chore: user lookup-only restore in Docker Cache step
bevzzz Nov 5, 2025
063faf2
ci(fix): move env definition
bevzzz Nov 5, 2025
37d8d75
ci: disable fail-fast
bevzzz Nov 5, 2025
b3806ac
ci: skip GPG signing for tests job
bevzzz Nov 5, 2025
9017e92
chore: skip tests that require a later version
bevzzz Nov 6, 2025
3be9085
ci: expand test matrix
bevzzz Nov 6, 2025
1e3256a
ci: disable some tests for earlier versions
bevzzz Nov 6, 2025
6c0600c
ci: raise minimal required version to 1.32
bevzzz Nov 6, 2025
2392d50
fix: use mutable list
bevzzz Nov 6, 2025
46817cc
test: fix skip syntax
bevzzz Nov 6, 2025
053e586
build: drop Lombok dependency
bevzzz Nov 6, 2025
c8bbb33
Merge branch 'v6' into v6-minimal-version-update
g-despot Nov 21, 2025
f8a34c6
Merge branch 'v6-minimal-version' into v6-minimal-version-update
g-despot Nov 21, 2025
1ed70bd
Update src/it/java/io/weaviate/containers/Weaviate.java
g-despot Nov 21, 2025
e42446d
Update Double to Float
g-despot Nov 21, 2025
0f43304
Merge pull request #510 from weaviate/v6-minimal-version-update
bevzzz Nov 21, 2025
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
113 changes: 99 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,118 @@ on:
branches:
- main
pull_request:
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

env:
IMG2VEC: cr.weaviate.io/semitechnologies/img2vec-pytorch:resnet50
MINIO: minio/minio
MODEL2VEC: cr.weaviate.io/semitechnologies/model2vec-inference:minishlab-potion-base-4M
DOCKER_IMAGES_TAR: docker-images.tar

jobs:
tests:
name: Tests
docker-cache:
name: Cache shared Docker images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
- name: Login to Docker Hub
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- id: cache-check
uses: actions/cache/restore@v4
env:
DOCKER_CACHE_KEY: docker-images-${{ env.IMG2VEC }}-${{ env.MINIO }}-${{ env.MODEL2VEC }}
with:
path: ${{ env.DOCKER_IMAGES_TAR }}
key: ${{ env.DOCKER_CACHE_KEY }}
lookup-only: true # Only check if cache exists, don't download
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: false
- name: Pull images
if: steps.cache-check.outputs.cache-hit != 'true'
run: |
docker pull $IMG2VEC
docker pull $MINIO
# docker pull $MODEL2VEC
docker save $IMG2VEC $MINIO -o $DOCKER_IMAGES_TAR
- name: Cache images
if: steps.cache-check.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
env:
DOCKER_CACHE_KEY: docker-images-${{ env.IMG2VEC }}-${{ env.MINIO }}-${{ env.MODEL2VEC }}
with:
path: ${{ env.DOCKER_IMAGES_TAR }}
key: ${{ env.DOCKER_CACHE_KEY }}

maven-cache:
name: Cache Maven dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'
- run: mvn dependency:go-offline

test:
name: Test
runs-on: ubuntu-latest
needs: [ docker-cache, maven-cache]
strategy:
fail-fast: false
matrix:
WEAVIATE_VERSION: ["1.32.16", "1.33.4", "1.34.0"]
steps:
- uses: actions/checkout@v4

- uses: actions/cache/restore@v4
env:
DOCKER_CACHE_KEY: docker-images-${{ env.IMG2VEC }}-${{ env.MINIO }}-${{ env.MODEL2VEC }}
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{secrets.DOCKER_PASSWORD}}
- name: Setup JDK
uses: actions/setup-java@v4
path: ${{ env.DOCKER_IMAGES_TAR }}
key: ${{ env.DOCKER_CACHE_KEY }}
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: false
- name: Load Docker images
run: |
if [ -f $DOCKER_IMAGES_TAR ]; then
docker load -i $DOCKER_IMAGES_TAR
fi
- uses: actions/setup-java@v4
name: Setup JDK
with:
distribution: 'zulu'
java-version: '17'
- name: Run Build
run: mvn -DskipTests clean package
- name: Run Tests
cache: 'maven'

- name: Run Tests (v${{ matrix.WEAVIATE_VERSION }})
env:
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
OPENAI_APIKEY: ${{ secrets.OPENAI_APIKEY }}
run: mvn clean test
WEAVIATE_VERSION: ${{ matrix.WEAVIATE_VERSION }}
run: mvn verify -Dgpg.skip
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
target/
# maven-lombok-plugin
.factorypath
# Surefire statistics for optimized execution time
.surefire-*
96 changes: 7 additions & 89 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<lombok.version>1.18.42</lombok.version>
<gson.version>2.13.2</gson.version>
<httpclient.version>5.5.1</httpclient.version>
<lang3.version>3.19.0</lang3.version>
Expand Down Expand Up @@ -112,11 +111,6 @@
<artifactId>httpclient5</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down Expand Up @@ -229,72 +223,17 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.5.4</version>
<configuration>
<trimStackTrace>false</trimStackTrace>
<argLine>
<!--
Gson (used for JSON serialization) utilizes reflection and needs to be able to access private fields of
Java core classes. For that to work correctly after Java 9, we need to open up some of the core Java
classes to reflection.
@see: https://www.oracle.com/corporate/features/understanding-java-9-modules.html
-->
--add-opens=java.base/java.lang=ALL-UNNAMED
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.weaviate.containers.TestListener</value>
</property>
</properties>
<parallel>classes</parallel>
<forkCount>4</forkCount>
<reuseForks>true</reuseForks>
<threadCount>1</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
<runOrder>balanced</runOrder>
</configuration>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>1.18.20.0</version>
<executions>
<execution>
<id>delombok-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
<configuration>
<sourceDirectory>src/main/java</sourceDirectory>
<outputDirectory>${project.build.directory}/delombok</outputDirectory>
<addOutputDirectory>false</addOutputDirectory>
<encoding>UTF-8</encoding>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>generate-delomboked-sources-jar</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<jar destfile="${project.build.directory}/${project.build.finalName}-sources.jar" basedir="${project.build.directory}/delombok"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
Expand All @@ -317,22 +256,6 @@
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-delomboked-sources-jar</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.build.finalName}-sources.jar</file>
<type>jar</type>
<classifier>sources</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
Expand Down Expand Up @@ -384,7 +307,6 @@
</execution>
</executions>
<configuration>
<sourcepath>${project.build.directory}/delombok</sourcepath>
<!--Disable warnings about missing docstrings.-->
<doclint>all,-missing</doclint>
</configuration>
Expand Down Expand Up @@ -512,10 +434,6 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
Expand Down
22 changes: 22 additions & 0 deletions src/it/java/io/weaviate/ConcurrentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@

import org.apache.commons.lang3.RandomStringUtils;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.Assumptions;
import org.junit.Rule;
import org.junit.rules.TestName;

import io.weaviate.client6.v1.internal.VersionSupport.SemanticVersion;
import io.weaviate.containers.Weaviate;

/**
* ConcurrentTest is the base class for integration tests, which provides
* utility methods to uniqualize collections and objects created in the
Expand Down Expand Up @@ -110,4 +114,22 @@ public static void eventually(Callable<Boolean> cond, int intervalMillis, int ti
throw new RuntimeException(ex);
}
}

/**
* Skip the test if the version that the {@link Weaviate}
* container is running is older than the required one.
*/
public static void requireAtLeast(Weaviate.Version required) {
var actual = SemanticVersion.of(Weaviate.VERSION);
Assumptions.assumeThat(actual)
.as("requires at least %s, but running %s", required.semver, actual)
.isGreaterThanOrEqualTo(required.semver);
}

public static void requireAtLeast(Weaviate.Version required, Runnable r) {
var actual = SemanticVersion.of(Weaviate.VERSION);
if (actual.compareTo(required.semver) >= 0) {
r.run();
}
}
}
12 changes: 0 additions & 12 deletions src/it/java/io/weaviate/containers/Container.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ public class Container {
public static final Img2VecNeural IMG2VEC_NEURAL = Img2VecNeural.createDefault();
public static final MinIo MINIO = MinIo.createDefault();

/**
* Stop all shared Testcontainers created in {@link #startAll}.
* <p>
* Testcontainer's Ryuk will reap any dangling containers after the tests
* finish. However, since {@link Weaviate} instances also hold a
* {@link WeaviateClient}, we want to stop them proactively to
* close client connections.
*/
static void stopAll() {
WEAVIATE.stop();
}

public static ContainerGroup compose(Weaviate weaviate, GenericContainer<?>... containers) {
return new ContainerGroup(weaviate, containers);
}
Expand Down
14 changes: 0 additions & 14 deletions src/it/java/io/weaviate/containers/TestListener.java

This file was deleted.

Loading
Loading