Skip to content

Commit 9071ab4

Browse files
authored
Merge branch 'main' into gh-4720
Signed-off-by: Issam El-atif <900456+ielatif@users.noreply.github.com>
2 parents 23b750b + 47e4232 commit 9071ab4

File tree

360 files changed

+13527
-4891
lines changed

Some content is hidden

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

360 files changed

+13527
-4891
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
name: CI/CD build
22

33
on:
4-
schedule:
5-
# Combined schedule covering both EST and CET working hours
6-
# Morning/Early builds
7-
- cron: '30 6 * * 1-5' # 7:30 AM CET / 1:30 AM EST
8-
- cron: '0 9 * * 1-5' # 10:00 AM CET / 4:00 AM EST
9-
- cron: '30 11 * * 1-5' # 12:30 PM CET / 6:30 AM EST
10-
# Midday builds
11-
- cron: '0 14 * * 1-5' # 3:00 PM CET / 9:00 AM EST
12-
- cron: '30 16 * * 1-5' # 5:30 PM CET / 11:30 AM EST
13-
# Afternoon/Evening builds
14-
- cron: '0 19 * * 1-5' # 8:00 PM CET / 2:00 PM EST
15-
- cron: '30 21 * * 1-5' # 10:30 PM CET / 4:30 PM EST
16-
- cron: '0 0 * * 2-6' # 1:00 AM CET / 7:00 PM EST (previous day)
17-
- cron: '30 2 * * 2-6' # 3:30 AM CET / 9:30 PM EST (previous day)
18-
workflow_dispatch:
4+
# DISABLED: Replaced by fast-continuous-integration.yml workflow
5+
# This workflow is kept for reference but will not run automatically
6+
# To re-enable, uncomment the schedule and workflow_dispatch sections below
7+
workflow_call: # Dummy trigger - workflow can only be called by other workflows (effectively disabled)
8+
# schedule:
9+
# # Combined schedule covering both EST and CET working hours
10+
# # Morning/Early builds
11+
# - cron: '30 6 * * 1-5' # 7:30 AM CET / 1:30 AM EST
12+
# - cron: '30 11 * * 1-5' # 12:30 PM CET / 6:30 AM EST
13+
# # Midday builds
14+
# - cron: '30 16 * * 1-5' # 7:30 PM CET / 11:30 AM EST
15+
# # Afternoon/Evening builds
16+
# - cron: '30 21 * * 1-5' # 10:30 PM CET / 4:30 PM EST
17+
# workflow_dispatch:
1918
# Note: If push triggers are added in the future, they should include:
2019
# push:
2120
# paths-ignore:
@@ -29,9 +28,6 @@ jobs:
2928
name: Build branch
3029
runs-on: ubuntu-latest
3130
if: ${{ github.repository_owner == 'spring-projects' }}
32-
concurrency:
33-
group: continuous-integration-${{ github.ref }}
34-
cancel-in-progress: true # Skip if another build is running - next cron will trigger soon
3531
services:
3632
ollama:
3733
image: ollama/ollama:latest
Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
name: Fast CI/CD build
2+
3+
on:
4+
schedule:
5+
# Combined schedule covering both EST and CET working hours
6+
# Morning/Early builds
7+
- cron: '30 6 * * 1-5' # 7:30 AM CET / 1:30 AM EST
8+
- cron: '30 11 * * 1-5' # 12:30 PM CET / 6:30 AM EST
9+
# Midday builds
10+
- cron: '30 16 * * 1-5' # 7:30 PM CET / 11:30 AM EST
11+
# Afternoon/Evening builds
12+
- cron: '30 21 * * 1-5' # 10:30 PM CET / 4:30 PM EST
13+
workflow_dispatch:
14+
15+
jobs:
16+
build-all:
17+
name: Build all modules
18+
runs-on: ubuntu-latest
19+
if: ${{ github.repository_owner == 'spring-projects' }}
20+
steps:
21+
- name: Checkout source code
22+
uses: actions/checkout@v4
23+
24+
- name: Free Disk Space
25+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
26+
with:
27+
large-packages: false
28+
docker-images: false
29+
30+
- name: Set up JDK 17
31+
uses: actions/setup-java@v4
32+
with:
33+
java-version: '17'
34+
distribution: 'temurin'
35+
cache: 'maven'
36+
37+
- name: Build all modules (skip tests)
38+
run: |
39+
./mvnw -T 1C -DskipTests --batch-mode --update-snapshots clean install
40+
41+
- name: Generate Java docs
42+
if: github.ref == 'refs/heads/main'
43+
run: ./mvnw --batch-mode javadoc:aggregate
44+
45+
- name: Generate assembly
46+
if: github.ref == 'refs/heads/main'
47+
working-directory: spring-ai-docs
48+
run: ../mvnw --batch-mode assembly:single
49+
50+
- name: Upload Maven repository
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: maven-repo
54+
path: ~/.m2/repository
55+
retention-days: 1
56+
57+
- name: Upload Javadoc
58+
if: github.ref == 'refs/heads/main'
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: javadoc
62+
path: target/site/apidocs
63+
retention-days: 1
64+
65+
- name: Upload assembly
66+
if: github.ref == 'refs/heads/main'
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: assembly
70+
path: spring-ai-docs/target/*.zip
71+
retention-days: 1
72+
73+
test-ollama:
74+
name: Test Ollama
75+
runs-on: ubuntu-latest
76+
needs: build-all
77+
if: ${{ github.repository_owner == 'spring-projects' }}
78+
services:
79+
ollama:
80+
image: ollama/ollama:latest
81+
ports:
82+
- 11434:11434
83+
env:
84+
OLLAMA_WITH_REUSE: true
85+
OLLAMA_AUTOCONF_TESTS_ENABLED: "true"
86+
steps:
87+
- name: Checkout source code
88+
uses: actions/checkout@v4
89+
90+
- name: Set up JDK 17
91+
uses: actions/setup-java@v4
92+
with:
93+
java-version: '17'
94+
distribution: 'temurin'
95+
cache: 'maven'
96+
97+
- name: Download Maven repository
98+
uses: actions/download-artifact@v4
99+
with:
100+
name: maven-repo
101+
path: ~/.m2/repository
102+
103+
- name: Configure Testcontainers
104+
run: |
105+
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
106+
107+
- name: Test Ollama modules
108+
env:
109+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
110+
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
111+
run: |
112+
./mvnw --batch-mode --no-snapshot-updates \
113+
-pl auto-configurations/models/spring-ai-autoconfigure-model-ollama \
114+
-Pci-fast-integration-tests \
115+
-Dfailsafe.rerunFailingTestsCount=3 \
116+
verify
117+
118+
test-openai:
119+
name: Test OpenAI
120+
runs-on: ubuntu-latest
121+
needs: build-all
122+
if: ${{ github.repository_owner == 'spring-projects' }}
123+
steps:
124+
- name: Checkout source code
125+
uses: actions/checkout@v4
126+
127+
- name: Set up JDK 17
128+
uses: actions/setup-java@v4
129+
with:
130+
java-version: '17'
131+
distribution: 'temurin'
132+
cache: 'maven'
133+
134+
- name: Download Maven repository
135+
uses: actions/download-artifact@v4
136+
with:
137+
name: maven-repo
138+
path: ~/.m2/repository
139+
140+
- name: Configure Testcontainers
141+
run: |
142+
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
143+
144+
- name: Test OpenAI modules
145+
env:
146+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
147+
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
148+
run: |
149+
./mvnw --batch-mode --no-snapshot-updates \
150+
-pl models/spring-ai-openai,auto-configurations/models/spring-ai-autoconfigure-model-openai \
151+
-Pci-fast-integration-tests \
152+
-Dfailsafe.rerunFailingTestsCount=3 \
153+
verify
154+
155+
test-remaining:
156+
name: Test Remaining (MCP, Google GenAI, Chroma, PgVector)
157+
runs-on: ubuntu-latest
158+
needs: build-all
159+
if: ${{ github.repository_owner == 'spring-projects' }}
160+
steps:
161+
- name: Checkout source code
162+
uses: actions/checkout@v4
163+
164+
- name: Set up JDK 17
165+
uses: actions/setup-java@v4
166+
with:
167+
java-version: '17'
168+
distribution: 'temurin'
169+
cache: 'maven'
170+
171+
- name: Download Maven repository
172+
uses: actions/download-artifact@v4
173+
with:
174+
name: maven-repo
175+
path: ~/.m2/repository
176+
177+
- name: Configure Testcontainers
178+
run: |
179+
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
180+
181+
- name: Test remaining modules
182+
env:
183+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
184+
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
185+
run: |
186+
./mvnw --batch-mode --no-snapshot-updates \
187+
-pl models/spring-ai-google-genai,auto-configurations/models/spring-ai-autoconfigure-model-google-genai,mcp/common,mcp/mcp-annotations-spring,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-common,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-httpclient,auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-webflux,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-common,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-webmvc,auto-configurations/mcp/spring-ai-autoconfigure-mcp-server-webflux,vector-stores/spring-ai-chroma-store,vector-stores/spring-ai-pgvector-store \
188+
-Pci-fast-integration-tests \
189+
-Dfailsafe.rerunFailingTestsCount=3 \
190+
verify
191+
192+
deploy-artifactory:
193+
name: Deploy to Artifactory
194+
runs-on: ubuntu-latest
195+
needs: [build-all, test-ollama, test-openai, test-remaining]
196+
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'spring-projects' }}
197+
steps:
198+
- name: Checkout source code
199+
uses: actions/checkout@v4
200+
201+
- name: Set up JDK 17
202+
uses: actions/setup-java@v4
203+
with:
204+
java-version: '17'
205+
distribution: 'temurin'
206+
cache: 'maven'
207+
208+
- name: Download Maven repository
209+
uses: actions/download-artifact@v4
210+
with:
211+
name: maven-repo
212+
path: ~/.m2/repository
213+
214+
- name: Deploy to Artifactory
215+
env:
216+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
217+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
218+
run: |
219+
./mvnw -s settings.xml --batch-mode -DskipTests deploy
220+
221+
deploy-docs:
222+
name: Deploy documentation
223+
runs-on: ubuntu-latest
224+
needs: [build-all, test-ollama, test-openai, test-remaining]
225+
if: ${{ github.ref == 'refs/heads/main' && github.repository_owner == 'spring-projects' }}
226+
steps:
227+
- name: Checkout source code
228+
uses: actions/checkout@v4
229+
230+
- name: Set up JDK 17
231+
uses: actions/setup-java@v4
232+
with:
233+
java-version: '17'
234+
distribution: 'temurin'
235+
cache: 'maven'
236+
237+
- name: Download Javadoc
238+
uses: actions/download-artifact@v4
239+
with:
240+
name: javadoc
241+
path: target/site/apidocs
242+
243+
- name: Download assembly
244+
uses: actions/download-artifact@v4
245+
with:
246+
name: assembly
247+
path: spring-ai-docs/target
248+
249+
- name: Capture project version
250+
run: echo PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV
251+
252+
- name: Setup SSH key
253+
env:
254+
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
255+
DOCS_SSH_HOST_KEY: ${{ secrets.DOCS_SSH_HOST_KEY }}
256+
run: |
257+
mkdir "$HOME/.ssh"
258+
echo "$DOCS_SSH_KEY" > "$HOME/.ssh/key"
259+
chmod 600 "$HOME/.ssh/key"
260+
echo "$DOCS_SSH_HOST_KEY" > "$HOME/.ssh/known_hosts"
261+
262+
- name: Deploy docs
263+
env:
264+
DOCS_HOST: ${{ secrets.DOCS_HOST }}
265+
DOCS_PATH: ${{ secrets.DOCS_PATH }}
266+
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
267+
working-directory: spring-ai-docs/target
268+
run: |
269+
unzip spring-ai-$PROJECT_VERSION-docs.zip
270+
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST "cd $DOCS_PATH && mkdir -p $PROJECT_VERSION"
271+
scp -i $HOME/.ssh/key -r api $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$PROJECT_VERSION

.github/workflows/main-push-fast.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
permissions:
2525
contents: read
2626
concurrency:
27-
group: ${{ github.workflow }}-${{ github.ref }}
27+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }}
2828
cancel-in-progress: true
2929
steps:
3030
- uses: actions/checkout@v4

.github/workflows/maintenance-fast.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
permissions:
1313
contents: read
1414
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
15+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.sha }}
1616
cancel-in-progress: true
1717
steps:
1818
- uses: actions/checkout@v4

.github/workflows/new-maven-central-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
echo "${{ secrets.GPG_PRIVATE_KEY }}" > gpg.asc
2626
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --batch --yes --passphrase-fd 0 --import gpg.asc
2727
28-
- name: Release to Sonatype OSSRH
28+
- name: Release to Maven Central
2929
env:
3030
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
3131
CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can find more details in the [Reference Documentation](https://docs.spring.i
2626
- **Latest Models**: GPT-5, and other cutting-edge models for advanced AI applications.
2727
* Portable API support across AI providers for both synchronous and streaming options. Access to [model-specific features](https://docs.spring.io/spring-ai/reference/api/chatmodel.html#_chat_options) is also available.
2828
* [Structured Outputs](https://docs.spring.io/spring-ai/reference/api/structured-output-converter.html) - Mapping of AI Model output to POJOs.
29-
* Support for all major [Vector Database providers](https://docs.spring.io/spring-ai/reference/api/vectordbs.html) such as *Apache Cassandra, Azure Vector Search, Chroma, Elasticsearch, Milvus, MongoDB Atlas, MariaDB, Neo4j, Oracle, PostgreSQL/PGVector, PineCone, Qdrant, Redis, and Weaviate*.
29+
* Support for all major [Vector Database providers](https://docs.spring.io/spring-ai/reference/api/vectordbs.html) such as *Apache Cassandra, Azure Vector Search, Chroma, Elasticsearch, Milvus, MongoDB Atlas, MariaDB, Neo4j, Oracle, PostgreSQL/PGVector, Pinecone, Qdrant, Redis, and Weaviate*.
3030
* Portable API across Vector Store providers, including a novel SQL-like [metadata filter API](https://docs.spring.io/spring-ai/reference/api/vectordbs.html#metadata-filters).
3131
* [Tools/Function Calling](https://docs.spring.io/spring-ai/reference/api/tools.html) - permits the model to request the execution of client-side tools and functions, thereby accessing necessary real-time information as required.
3232
* [Observability](https://docs.spring.io/spring-ai/reference/observability/index.html) - Provides insights into AI-related operations.
@@ -156,4 +156,4 @@ define the source file coding standards we use along with some IDEA editor setti
156156

157157
## Contributing
158158

159-
Your contributions are always welcome! Please read the [contribution guidelines](CONTRIBUTING.adoc) first.
159+
Your contributions are always welcome! Please read the [contribution guidelines](CONTRIBUTING.adoc) first.

advisors/spring-ai-advisors-vector-store/src/main/java/org/springframework/ai/chat/client/advisor/vectorstore/QuestionAnswerAdvisor.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,6 @@ public class QuestionAnswerAdvisor implements BaseAdvisor {
8383

8484
private final int order;
8585

86-
/**
87-
* Construct instance by given VectorStore
88-
* @param vectorStore the given VectorStore
89-
* @deprecated in favor of {@link #builder(VectorStore)}}
90-
*/
91-
@Deprecated
92-
public QuestionAnswerAdvisor(VectorStore vectorStore) {
93-
this(vectorStore, SearchRequest.builder().build(), DEFAULT_PROMPT_TEMPLATE, BaseAdvisor.DEFAULT_SCHEDULER,
94-
DEFAULT_ORDER);
95-
}
96-
9786
QuestionAnswerAdvisor(VectorStore vectorStore, SearchRequest searchRequest, @Nullable PromptTemplate promptTemplate,
9887
@Nullable Scheduler scheduler, int order) {
9988
Assert.notNull(vectorStore, "vectorStore cannot be null");

0 commit comments

Comments
 (0)