Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a688dbcb4 | |||
| f5a9e1149a | |||
| ec1186119a | |||
| f2e00278cb | |||
| c300d462ac | |||
| 216e90f4a7 | |||
| d58e5a7173 | |||
| e4be6d82d5 | |||
| 08ea0bb6d9 | |||
| aeda13f920 | |||
| 270a5e2fca | |||
| de0eadc72b | |||
| 33bf5d505d | |||
| 9667d10933 | |||
| 008074118a | |||
| 94b0d04d70 | |||
| 6f9f12e348 | |||
| 1b4ec95616 | |||
| f409e3ced3 | |||
| d1b80ac7f4 | |||
| 3c264913b5 | |||
| e1d40ded31 | |||
| c824179773 | |||
| 10b43450d5 | |||
| 26e7d37a7a | |||
| 86fc1294d5 | |||
| 1f2dbb0505 | |||
| 2c9ff93d11 | |||
| da0e859d1f |
@@ -1,4 +1,4 @@
|
|||||||
= Spring Data for Elasticsearch image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-elasticsearch%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-elasticsearch/] https://gitter.im/spring-projects/spring-data[image:https://badges.gitter.im/spring-projects/spring-data.svg[Gitter]] image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?search.rootProjectNames=Spring Data Elasticsearch"]
|
= Spring Data for Elasticsearch image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?search.rootProjectNames=Spring Data Elasticsearch"]
|
||||||
|
|
||||||
The primary goal of the https://projects.spring.io/spring-data[Spring Data] project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
|
The primary goal of the https://projects.spring.io/spring-data[Spring Data] project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
name: CI Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ 5.5.x, 'issue/5.5.x/**' ]
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-java:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java-version: [ base, next ]
|
||||||
|
name: Build project
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- name: Setup Java and Maven
|
||||||
|
uses: spring-projects/spring-data-build/actions/setup-maven@3.5.x
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.java-version }}
|
||||||
|
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'
|
||||||
|
- name: Build
|
||||||
|
uses: spring-projects/spring-data-build/actions/maven-build@3.5.x
|
||||||
|
env:
|
||||||
|
TESTCONTAINERS_REUSE_ENABLE: true
|
||||||
|
with:
|
||||||
|
settings-xml: '${{ vars.SETTINGS_XML }}'
|
||||||
@@ -18,7 +18,7 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
Inbox:
|
Inbox:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request == null && !contains(join(github.event.issue.labels.*.name, ', '), 'dependency-upgrade') && !contains(github.event.issue.title, 'Release ')
|
if: vars.PROJECT_CARDS_ENABLED == 'true' && github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request == null && !contains(join(github.event.issue.labels.*.name, ', '), 'dependency-upgrade') && !contains(github.event.issue.title, 'Release ')
|
||||||
steps:
|
steps:
|
||||||
- name: Create or Update Issue Card
|
- name: Create or Update Issue Card
|
||||||
uses: actions/add-to-project@v1.0.2
|
uses: actions/add-to-project@v1.0.2
|
||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
|
github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
|
||||||
Pull-Request:
|
Pull-Request:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request != null
|
if: vars.PROJECT_CARDS_ENABLED == 'true' && github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request != null
|
||||||
steps:
|
steps:
|
||||||
- name: Create or Update Pull Request Card
|
- name: Create or Update Pull Request Card
|
||||||
uses: actions/add-to-project@v1.0.2
|
uses: actions/add-to-project@v1.0.2
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
|
github-token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
|
||||||
Feedback-Provided:
|
Feedback-Provided:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository_owner == 'spring-projects' && github.event_name == 'issue_comment' && github.event.action == 'created' && github.actor != 'spring-projects-issues' && github.event.pull_request == null && github.event.issue.state == 'open' && contains(toJSON(github.event.issue.labels), 'waiting-for-feedback')
|
if: vars.PROJECT_CARDS_ENABLED == 'true' && github.repository_owner == 'spring-projects' && github.event_name == 'issue_comment' && github.event.action == 'created' && github.actor != 'spring-projects-issues' && github.event.pull_request == null && github.event.issue.state == 'open' && contains(toJSON(github.event.issue.labels), 'waiting-for-feedback')
|
||||||
steps:
|
steps:
|
||||||
- name: Update Project Card
|
- name: Update Project Card
|
||||||
uses: actions/add-to-project@v1.0.2
|
uses: actions/add-to-project@v1.0.2
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
name: Snapshots
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [ 5.5.x, 'issue/5.5.x/**' ]
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-snapshots:
|
||||||
|
name: Build and deploy snapshots
|
||||||
|
if: ${{ github.repository_owner == 'spring-projects' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- name: Setup Java and Maven
|
||||||
|
uses: spring-projects/spring-data-build/actions/setup-maven@3.5.x
|
||||||
|
with:
|
||||||
|
develocity-access-key: '${{ secrets.DEVELOCITY_ACCESS_KEY }}'
|
||||||
|
- name: Deploy to Artifactory
|
||||||
|
uses: spring-projects/spring-data-build/actions/maven-artifactory-deploy@3.5.x
|
||||||
|
env:
|
||||||
|
TESTCONTAINERS_REUSE_ENABLE: true
|
||||||
|
with:
|
||||||
|
build-name: 'spring-data-elasticsearch'
|
||||||
|
username: '${{ secrets.ARTIFACTORY_USERNAME }}'
|
||||||
|
password: '${{ secrets.ARTIFACTORY_PASSWORD }}'
|
||||||
|
context-url: '${{ vars.ARTIFACTORY_CONTEXT_URL }}'
|
||||||
|
repository: '${{ vars.ARTIFACTORY_REPOSITORY }}'
|
||||||
|
project: '${{ vars.ARTIFACTORY_PROJECT }}'
|
||||||
|
settings-xml: '${{ vars.SETTINGS_XML }}'
|
||||||
+1
-1
@@ -3,6 +3,6 @@
|
|||||||
<extension>
|
<extension>
|
||||||
<groupId>io.spring.develocity.conventions</groupId>
|
<groupId>io.spring.develocity.conventions</groupId>
|
||||||
<artifactId>develocity-conventions-maven-extension</artifactId>
|
<artifactId>develocity-conventions-maven-extension</artifactId>
|
||||||
<version>0.0.22</version>
|
<version>0.0.25</version>
|
||||||
</extension>
|
</extension>
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|||||||
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
#Thu Jul 17 14:00:55 CEST 2025
|
#Tue Jun 02 15:00:44 CEST 2026
|
||||||
|
distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip
|
||||||
wrapperUrl=https\://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
|
wrapperUrl=https\://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
|
||||||
distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
|
|
||||||
|
|||||||
@@ -1,43 +1,5 @@
|
|||||||
= Continuous Integration
|
= Continuous Integration
|
||||||
|
|
||||||
image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-elasticsearch%2Fmain&subject=2020.0.0%20(main)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-elasticsearch/]
|
|
||||||
image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-elasticsearch%2F4.0.x&subject=Neumann%20(4.0.x)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-elasticsearch/]
|
|
||||||
image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-elasticsearch%2F3.2.x&subject=Moore%20(3.2.x)[link=https://jenkins.spring.io/view/SpringData/job/spring-data-elasticsearch/]
|
|
||||||
|
|
||||||
== Running CI tasks locally
|
== Running CI tasks locally
|
||||||
|
|
||||||
Since this pipeline is purely Docker-based, it's easy to:
|
You can run CI jobs locally using Docker and act[https://nektosact.com/].
|
||||||
|
|
||||||
* Debug what went wrong on your local machine.
|
|
||||||
* Test out a a tweak to your `verify.sh` script before sending it out.
|
|
||||||
* Experiment against a new image before submitting your pull request.
|
|
||||||
|
|
||||||
All of these use cases are great reasons to essentially run what the CI server does on your local machine.
|
|
||||||
|
|
||||||
IMPORTANT: To do this you must have Docker installed on your machine.
|
|
||||||
|
|
||||||
1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-elasticsearch-github adoptopenjdk/openjdk8:latest /bin/bash`
|
|
||||||
+
|
|
||||||
This will launch the Docker image and mount your source code at `spring-data-elasticsearch-github`.
|
|
||||||
+
|
|
||||||
2. `cd spring-data-elasticsearch-github`
|
|
||||||
+
|
|
||||||
Next, run your tests from inside the container:
|
|
||||||
+
|
|
||||||
3. `./mvnw clean dependency:list test -Dsort` (or whatever profile you need to test out)
|
|
||||||
|
|
||||||
Since the container is binding to your source, you can make edits from your IDE and continue to run build jobs.
|
|
||||||
|
|
||||||
If you need to package things up, do this:
|
|
||||||
|
|
||||||
1. `docker run -it -v /var/run/docker.sock:/var/run/docker.sock --mount type=bind,source="$(pwd)",target=/spring-data-elasticsearch-github adoptopenjdk/openjdk8:latest /bin/bash`
|
|
||||||
+
|
|
||||||
This will launch the Docker image and mount your source code at `spring-data-elasticsearch-github`.
|
|
||||||
+
|
|
||||||
2. `cd spring-data-elasticsearch-github`
|
|
||||||
+
|
|
||||||
Next, try to package everything up from inside the container:
|
|
||||||
+
|
|
||||||
3. `./mvnw -Pci,snapshot -Dmaven.test.skip=true clean package`
|
|
||||||
|
|
||||||
NOTE: Docker containers can eat up disk space fast! From time to time, run `docker system prune` to clean out old images.
|
|
||||||
|
|||||||
Vendored
-132
@@ -1,132 +0,0 @@
|
|||||||
def p = [:]
|
|
||||||
node {
|
|
||||||
checkout scm
|
|
||||||
p = readProperties interpolate: true, file: 'ci/pipeline.properties'
|
|
||||||
}
|
|
||||||
|
|
||||||
pipeline {
|
|
||||||
agent none
|
|
||||||
|
|
||||||
triggers {
|
|
||||||
pollSCM 'H/10 * * * *'
|
|
||||||
upstream(upstreamProjects: "spring-data-commons/3.5.x", threshold: hudson.model.Result.SUCCESS)
|
|
||||||
}
|
|
||||||
|
|
||||||
options {
|
|
||||||
disableConcurrentBuilds()
|
|
||||||
buildDiscarder(logRotator(numToKeepStr: '14'))
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
stage("test: baseline (main)") {
|
|
||||||
when {
|
|
||||||
beforeAgent(true)
|
|
||||||
anyOf {
|
|
||||||
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
|
|
||||||
not { triggeredBy 'UpstreamCause' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
agent {
|
|
||||||
label 'data'
|
|
||||||
}
|
|
||||||
options { timeout(time: 30, unit: 'MINUTES') }
|
|
||||||
|
|
||||||
environment {
|
|
||||||
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
|
|
||||||
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
|
|
||||||
}
|
|
||||||
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
|
|
||||||
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
|
|
||||||
sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh"
|
|
||||||
sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage("Test other configurations") {
|
|
||||||
when {
|
|
||||||
beforeAgent(true)
|
|
||||||
allOf {
|
|
||||||
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
|
|
||||||
not { triggeredBy 'UpstreamCause' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
parallel {
|
|
||||||
stage("test: baseline (next)") {
|
|
||||||
agent {
|
|
||||||
label 'data'
|
|
||||||
}
|
|
||||||
options { timeout(time: 30, unit: 'MINUTES') }
|
|
||||||
environment {
|
|
||||||
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
|
|
||||||
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
|
|
||||||
docker.image(p['docker.java.next.image']).inside(p['docker.java.inside.docker']) {
|
|
||||||
sh "PROFILE=none JENKINS_USER_NAME=${p['jenkins.user.name']} ci/verify.sh"
|
|
||||||
sh "JENKINS_USER_NAME=${p['jenkins.user.name']} ci/clean.sh"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Release to artifactory') {
|
|
||||||
when {
|
|
||||||
beforeAgent(true)
|
|
||||||
anyOf {
|
|
||||||
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
|
|
||||||
not { triggeredBy 'UpstreamCause' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
agent {
|
|
||||||
label 'data'
|
|
||||||
}
|
|
||||||
options { timeout(time: 20, unit: 'MINUTES') }
|
|
||||||
environment {
|
|
||||||
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
|
|
||||||
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
script {
|
|
||||||
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
|
|
||||||
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
|
|
||||||
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
|
|
||||||
"./mvnw -s settings.xml -Pci,artifactory " +
|
|
||||||
"-Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root " +
|
|
||||||
"-Dartifactory.server=${p['artifactory.url']} " +
|
|
||||||
"-Dartifactory.username=${ARTIFACTORY_USR} " +
|
|
||||||
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
|
|
||||||
"-Dartifactory.staging-repository=${p['artifactory.repository.snapshot']} " +
|
|
||||||
"-Dartifactory.build-name=spring-data-elasticsearch " +
|
|
||||||
"-Dartifactory.build-number=spring-data-elasticsearch-${BRANCH_NAME}-build-${BUILD_NUMBER} " +
|
|
||||||
"-Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch " +
|
|
||||||
"-Dmaven.test.skip=true clean deploy -U -B"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
changed {
|
|
||||||
script {
|
|
||||||
emailext(
|
|
||||||
subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}",
|
|
||||||
mimeType: 'text/html',
|
|
||||||
recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']],
|
|
||||||
body: "<a href=\"${env.BUILD_URL}\">${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}</a>")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
= Spring Data for Elasticsearch image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-elasticsearch%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-elasticsearch/] https://gitter.im/spring-projects/spring-data[image:https://badges.gitter.im/spring-projects/spring-data.svg[Gitter]] image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?search.rootProjectNames=Spring Data Elasticsearch"]
|
= Spring Data for Elasticsearch image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?search.rootProjectNames=Spring Data Elasticsearch"]
|
||||||
|
|
||||||
The primary goal of the https://projects.spring.io/spring-data[Spring Data] project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
|
The primary goal of the https://projects.spring.io/spring-data[Spring Data] project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash -x
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
export JENKINS_USER=${JENKINS_USER_NAME}
|
|
||||||
|
|
||||||
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
|
|
||||||
./mvnw -s settings.xml clean -Dscan=false -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
# Java versions
|
|
||||||
java.main.tag=17.0.15_6-jdk-focal
|
|
||||||
java.next.tag=24.0.1_9-jdk-noble
|
|
||||||
|
|
||||||
# Docker container images - standard
|
|
||||||
docker.java.main.image=library/eclipse-temurin:${java.main.tag}
|
|
||||||
docker.java.next.image=library/eclipse-temurin:${java.next.tag}
|
|
||||||
|
|
||||||
# Supported versions of MongoDB
|
|
||||||
docker.mongodb.6.0.version=6.0.23
|
|
||||||
docker.mongodb.7.0.version=7.0.20
|
|
||||||
docker.mongodb.8.0.version=8.0.9
|
|
||||||
|
|
||||||
# Supported versions of Redis
|
|
||||||
docker.redis.6.version=6.2.13
|
|
||||||
docker.redis.7.version=7.2.4
|
|
||||||
docker.valkey.8.version=8.1.1
|
|
||||||
|
|
||||||
# Docker environment settings
|
|
||||||
docker.java.inside.basic=-v $HOME:/tmp/jenkins-home --ulimit nofile=32000:32000
|
|
||||||
docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home --ulimit nofile=32000:32000
|
|
||||||
|
|
||||||
# Credentials
|
|
||||||
docker.registry=
|
|
||||||
docker.credentials=hub.docker.com-springbuildmaster
|
|
||||||
docker.proxy.registry=https://docker-hub.usw1.packages.broadcom.com
|
|
||||||
docker.proxy.credentials=usw1_packages_broadcom_com-jenkins-token
|
|
||||||
artifactory.credentials=02bd1690-b54f-4c9f-819d-a77cb7a9822c
|
|
||||||
artifactory.url=https://repo.spring.io
|
|
||||||
artifactory.repository.snapshot=libs-snapshot-local
|
|
||||||
develocity.access-key=gradle_enterprise_secret_access_key
|
|
||||||
jenkins.user.name=spring-builds+jenkins
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash -x
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
mkdir -p /tmp/jenkins-home/.m2/spring-data-elasticsearch
|
|
||||||
export JENKINS_USER=${JENKINS_USER_NAME}
|
|
||||||
|
|
||||||
MAVEN_OPTS="-Duser.name=${JENKINS_USER} -Duser.home=/tmp/jenkins-home" \
|
|
||||||
./mvnw -s settings.xml \
|
|
||||||
-P${PROFILE} clean dependency:list verify -Dsort -U -B -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-elasticsearch -Ddevelocity.storage.directory=/tmp/jenkins-home/.develocity-root
|
|
||||||
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
<groupId>org.springframework.data</groupId>
|
<groupId>org.springframework.data</groupId>
|
||||||
<artifactId>spring-data-elasticsearch</artifactId>
|
<artifactId>spring-data-elasticsearch</artifactId>
|
||||||
<version>5.5.8</version>
|
<version>5.5.13</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.data.build</groupId>
|
<groupId>org.springframework.data.build</groupId>
|
||||||
<artifactId>spring-data-parent</artifactId>
|
<artifactId>spring-data-parent</artifactId>
|
||||||
<version>3.5.8</version>
|
<version>3.5.13</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<name>Spring Data Elasticsearch</name>
|
<name>Spring Data Elasticsearch</name>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<url>https://github.com/spring-projects/spring-data-elasticsearch</url>
|
<url>https://github.com/spring-projects/spring-data-elasticsearch</url>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<springdata.commons>3.5.8</springdata.commons>
|
<springdata.commons>3.5.13</springdata.commons>
|
||||||
|
|
||||||
<!-- version of the ElasticsearchClient -->
|
<!-- version of the ElasticsearchClient -->
|
||||||
<elasticsearch-java>8.18.8</elasticsearch-java>
|
<elasticsearch-java>8.18.8</elasticsearch-java>
|
||||||
@@ -82,8 +82,7 @@
|
|||||||
<scm>
|
<scm>
|
||||||
<url>https://github.com/spring-projects/spring-data-elasticsearch</url>
|
<url>https://github.com/spring-projects/spring-data-elasticsearch</url>
|
||||||
<connection>scm:git:git://github.com/spring-projects/spring-data-elasticsearch.git</connection>
|
<connection>scm:git:git://github.com/spring-projects/spring-data-elasticsearch.git</connection>
|
||||||
<developerConnection>scm:git:ssh://git@github.com/spring-projects/spring-data-elasticsearch.git
|
<developerConnection>scm:git:ssh://git@github.com/spring-projects/spring-data-elasticsearch.git</developerConnection>
|
||||||
</developerConnection>
|
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<issueManagement>
|
<issueManagement>
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
|
|
||||||
https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
|
||||||
|
|
||||||
<servers>
|
|
||||||
<server>
|
|
||||||
<id>spring-plugins-release</id>
|
|
||||||
<username>${env.ARTIFACTORY_USR}</username>
|
|
||||||
<password>${env.ARTIFACTORY_PSW}</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>spring-libs-snapshot</id>
|
|
||||||
<username>${env.ARTIFACTORY_USR}</username>
|
|
||||||
<password>${env.ARTIFACTORY_PSW}</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>spring-libs-milestone</id>
|
|
||||||
<username>${env.ARTIFACTORY_USR}</username>
|
|
||||||
<password>${env.ARTIFACTORY_PSW}</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>spring-libs-release</id>
|
|
||||||
<username>${env.ARTIFACTORY_USR}</username>
|
|
||||||
<password>${env.ARTIFACTORY_PSW}</password>
|
|
||||||
</server>
|
|
||||||
</servers>
|
|
||||||
|
|
||||||
</settings>
|
|
||||||
@@ -6,12 +6,8 @@ nav:
|
|||||||
ext:
|
ext:
|
||||||
collector:
|
collector:
|
||||||
- run:
|
- run:
|
||||||
command: ./mvnw validate process-resources -am -Pantora-process-resources
|
command: ./mvnw -B validate process-resources dependency:unpack -am -Pantora-process-resources
|
||||||
local: true
|
local: true
|
||||||
scan:
|
scan:
|
||||||
dir: target/classes/
|
- dir: target/classes/
|
||||||
- run:
|
- dir: target/antora/
|
||||||
command: ./mvnw package -Pdistribute
|
|
||||||
local: true
|
|
||||||
scan:
|
|
||||||
dir: target/antora
|
|
||||||
|
|||||||
+17
-15
@@ -15,15 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package org.springframework.data.elasticsearch.client.elc.aot;
|
package org.springframework.data.elasticsearch.client.elc.aot;
|
||||||
|
|
||||||
import co.elastic.clients.elasticsearch._types.mapping.RuntimeFieldType;
|
|
||||||
import co.elastic.clients.elasticsearch._types.mapping.TypeMapping;
|
|
||||||
import co.elastic.clients.elasticsearch.indices.IndexSettings;
|
|
||||||
import co.elastic.clients.elasticsearch.indices.PutMappingRequest;
|
|
||||||
import org.springframework.aot.hint.MemberCategory;
|
import org.springframework.aot.hint.MemberCategory;
|
||||||
import org.springframework.aot.hint.RuntimeHints;
|
import org.springframework.aot.hint.RuntimeHints;
|
||||||
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
import org.springframework.aot.hint.RuntimeHintsRegistrar;
|
||||||
import org.springframework.aot.hint.TypeReference;
|
|
||||||
import org.springframework.lang.Nullable;
|
import org.springframework.lang.Nullable;
|
||||||
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* runtime hints for the Elasticsearch client libraries, as these do not provide any of their own.
|
* runtime hints for the Elasticsearch client libraries, as these do not provide any of their own.
|
||||||
@@ -37,17 +34,22 @@ public class ElasticsearchClientRuntimeHints implements RuntimeHintsRegistrar {
|
|||||||
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
|
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
|
||||||
|
|
||||||
hints.reflection()
|
hints.reflection()
|
||||||
.registerType(TypeReference.of(IndexSettings.class), builder -> builder.withField("_DESERIALIZER")) //
|
.registerTypeIfPresent(classLoader, "co.elastic.clients.elasticsearch.indices.IndexSettings",
|
||||||
.registerType(TypeReference.of(PutMappingRequest.class), builder -> builder.withField("_DESERIALIZER")) //
|
builder -> builder.withField("_DESERIALIZER"))
|
||||||
.registerType(TypeReference.of(RuntimeFieldType.class), builder -> builder.withField("_DESERIALIZER"))//
|
.registerTypeIfPresent(classLoader, "co.elastic.clients.elasticsearch.indices.PutMappingRequest",
|
||||||
.registerType(TypeReference.of(TypeMapping.class), builder -> builder.withField("_DESERIALIZER")) //
|
builder -> builder.withField("_DESERIALIZER"))
|
||||||
;
|
.registerTypeIfPresent(classLoader, "co.elastic.clients.elasticsearch._types.mapping.RuntimeFieldType",
|
||||||
|
builder -> builder.withField("_DESERIALIZER"))
|
||||||
|
.registerTypeIfPresent(classLoader, "co.elastic.clients.elasticsearch._types.mapping.TypeMapping",
|
||||||
|
builder -> builder.withField("_DESERIALIZER"));
|
||||||
|
|
||||||
hints.serialization() //
|
if (ClassUtils.isPresent("org.apache.http.impl.auth.BasicScheme", classLoader)) {
|
||||||
.registerType(org.apache.http.impl.auth.BasicScheme.class) //
|
hints.serialization() //
|
||||||
.registerType(org.apache.http.impl.auth.RFC2617Scheme.class) //
|
.registerType(org.apache.http.impl.auth.BasicScheme.class) //
|
||||||
.registerType(java.util.HashMap.class) //
|
.registerType(org.apache.http.impl.auth.RFC2617Scheme.class) //
|
||||||
;
|
.registerType(java.util.HashMap.class) //
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
hints.resources() //
|
hints.resources() //
|
||||||
.registerPattern("co/elastic/clients/version.properties") //
|
.registerPattern("co/elastic/clients/version.properties") //
|
||||||
|
|||||||
+12
-2
@@ -245,7 +245,10 @@ abstract public class AbstractReactiveElasticsearchTemplate
|
|||||||
public void onNext(List<T> entityList) {
|
public void onNext(List<T> entityList) {
|
||||||
onNextHasBeenCalled.set(true);
|
onNextHasBeenCalled.set(true);
|
||||||
saveAll(entityList, index)
|
saveAll(entityList, index)
|
||||||
.map(sink::tryEmitNext)
|
.map(entity -> {
|
||||||
|
sink.tryEmitNext(entity);
|
||||||
|
return entity;
|
||||||
|
})
|
||||||
.doOnComplete(() -> {
|
.doOnComplete(() -> {
|
||||||
if (!upstreamComplete.get()) {
|
if (!upstreamComplete.get()) {
|
||||||
if (subscription == null) {
|
if (subscription == null) {
|
||||||
@@ -255,7 +258,14 @@ abstract public class AbstractReactiveElasticsearchTemplate
|
|||||||
} else {
|
} else {
|
||||||
sink.tryEmitComplete();
|
sink.tryEmitComplete();
|
||||||
}
|
}
|
||||||
}).subscribe();
|
})
|
||||||
|
.subscribe(v -> {
|
||||||
|
}, error -> {
|
||||||
|
if (subscription != null) {
|
||||||
|
subscription.cancel();
|
||||||
|
}
|
||||||
|
sink.tryEmitError(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Spring Data Elasticsearch 5.5.8 (2025.0.8)
|
Spring Data Elasticsearch 5.5.13 (2025.0.13)
|
||||||
Copyright (c) [2013-2022] Pivotal Software, Inc.
|
Copyright (c) [2013-2022] Pivotal Software, Inc.
|
||||||
|
|
||||||
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
||||||
@@ -33,6 +33,9 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+22
@@ -1220,6 +1220,28 @@ public abstract class ReactiveElasticsearchIntegrationTests {
|
|||||||
.allMatch(failureStatus -> failureStatus.status().equals(409));
|
.allMatch(failureStatus -> failureStatus.status().equals(409));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test // Error propagation in reactive Flux save
|
||||||
|
@DisplayName("should propagate errors during Flux save operations")
|
||||||
|
void shouldPropagateErrorsDuringFluxSaveOperations() {
|
||||||
|
// Create a Flux that will produce an error after emitting some valid entities
|
||||||
|
Flux<SampleEntity> entitiesWithError = Flux.concat(
|
||||||
|
Flux.just(
|
||||||
|
randomEntity("valid entity 1"),
|
||||||
|
randomEntity("valid entity 2")),
|
||||||
|
Flux.error(new RuntimeException("Simulated error during entity creation")));
|
||||||
|
|
||||||
|
// The save operation should propagate the error to the subscriber.
|
||||||
|
// With the manual subscriber approach, the error propagates eagerly —
|
||||||
|
// sink.tryEmitError is called before in-flight saveAll results can be emitted,
|
||||||
|
// so the caller sees 0 entities before the error.
|
||||||
|
operations.save(entitiesWithError, SampleEntity.class, 10)
|
||||||
|
.as(StepVerifier::create)
|
||||||
|
.expectNextCount(0)
|
||||||
|
.expectErrorMatches(throwable -> throwable instanceof RuntimeException &&
|
||||||
|
throwable.getMessage().equals("Simulated error during entity creation"))
|
||||||
|
.verify();
|
||||||
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
// region Helper functions
|
// region Helper functions
|
||||||
|
|||||||
Reference in New Issue
Block a user