Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
xtermi2 committed Mar 16, 2024
2 parents d5e4726 + d7fb7aa commit 82b29ad
Show file tree
Hide file tree
Showing 27 changed files with 401 additions and 91 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/maven-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ matrix.java }}
Expand All @@ -40,15 +40,15 @@ jobs:
build-with-es:
strategy:
matrix:
elasticsearchVersion: [ "8.11.1", "8.10.4", "8.9.2", "8.8.2", "8.7.1", "8.6.2", "8.5.3", "8.4.3", "8.3.3", "8.2.3", "8.1.3", "8.0.1",
"7.17.15", "7.5.2" ]
elasticsearchVersion: [ "8.12.2", "8.11.4", "8.10.4", "8.9.2", "8.8.2", "8.7.1", "8.6.2", "8.5.3", "8.4.3", "8.3.3", "8.2.3", "8.1.3", "8.0.1",
"7.17.18", "7.5.2" ]
fail-fast: false
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
Expand All @@ -67,7 +67,7 @@ jobs:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Set up JDK 8
# uses: actions/setup-java@v3
# uses: actions/setup-java@v4
# with:
# distribution: zulu
# ja# - name: Set up Docker
Expand All @@ -84,7 +84,7 @@ jobs:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Set up JDK 8
# uses: actions/setup-java@v3
# uses: actions/setup-java@v4
# with:
# distribution: zulu
# java-version: 8
Expand All @@ -111,7 +111,7 @@ jobs:
git_commit_gpgsign: true
- name: Set up JDK 8
# with JDK 11 the maven-javadoc-plugin > 3.0.1 fails with "cannot find symbol org.elasticsearch.*"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
git_commit_gpgsign: true
- name: Set up JDK 8
# with JDK 11 the maven-javadoc-plugin > 3.0.1 fails with "cannot find symbol org.elasticsearch.*"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
uses: actions/checkout@v4
- name: Set up JDK 8
# build with JDK 8 because of issue https://github.com/trautonen/coveralls-maven-plugin/issues/112
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 8
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: 'java'
- name: Build and test with Maven
Expand All @@ -51,4 +51,4 @@ jobs:
GITHUB_EVENT_PATH: ${{ github.event_path }}
run: $MVN_CMD coveralls:report -DrepoToken=$COVERALLS_REPO_TOKEN -DserviceName=GitHub-Actions
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Successful executed migration scripts will not be executed again!
## 2 Features

- tested on Java 8, 11, 17, and 21
- runs on Spring-Boot 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0 and 3.1 (and of course without Spring-Boot)
- runs on Elasticsearch version 7.5.x - 8.11.x
- runs on Spring-Boot 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1 and 3.2 (and of course without Spring-Boot)
- runs on Elasticsearch version 7.5.x - 8.12.x
- runs on Opensearch version 1.x and 2.x
- highly configurable (e.g. location(s) of your migration files, migration files format pattern)
- placeholder substitution in migration scripts
Expand All @@ -31,12 +31,12 @@ Successful executed migration scripts will not be executed again!
- ready to use default configuration
- line comments in migration files

| Compatibility | Spring Boot | Elasticsearch | Opensearch |
|----------------------------------|---------------------------------------------|----------------------|------------|
| elasticsearch-evolution >= 0.4.2 | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1 | 7.5.x - 8.11.x | 1.x - 2.x |
| elasticsearch-evolution >= 0.4.0 | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7 | 7.5.x - 8.6.x | 1.x - 2.x |
| elasticsearch-evolution 0.3.x | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7 | 7.5.x - 7.17.x | |
| elasticsearch-evolution 0.2.x | 1.5, 2.0, 2.1, 2.2, 2.3, 2.4 | 7.0.x - 7.4.x, 6.8.x | |
| Compatibility | Spring Boot | Elasticsearch | Opensearch |
|----------------------------------|--------------------------------------------------|----------------------|------------|
| elasticsearch-evolution >= 0.4.2 | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, 3.1, 3.2 | 7.5.x - 8.12.x | 1.x - 2.x |
| elasticsearch-evolution >= 0.4.0 | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7 | 7.5.x - 8.6.x | 1.x - 2.x |
| elasticsearch-evolution 0.3.x | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7 | 7.5.x - 7.17.x | |
| elasticsearch-evolution 0.2.x | 1.5, 2.0, 2.1, 2.2, 2.3, 2.4 | 7.0.x - 7.4.x, 6.8.x | |

NOTE: When you run on Java 11 and using spring-boot 2.2 or 2.3 and you hit [this issue](https://github.com/ronmamo/reflections/issues/279), you have 2 options:

Expand All @@ -53,7 +53,7 @@ First add the latest version of Elasticsearch-Evolution spring boot starter as a
<dependency>
<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>spring-boot-starter-elasticsearch-evolution</artifactId>
<version>0.4.3</version>
<version>0.5.1</version>
</dependency>
```

Expand All @@ -77,7 +77,7 @@ First add the latest version of Elasticsearch-Evolution core as a dependency:
<dependency>
<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>elasticsearch-evolution-core</artifactId>
<version>0.4.3</version>
<version>0.5.1</version>
</dependency>
```

Expand Down Expand Up @@ -291,6 +291,12 @@ ElasticsearchEvolution.configure()

## 6 changelog

### v0.5.1

- version updates (spring-boot 2.7.18)
- added regression tests for spring boot 3.2
- remove deprecated query parameter `ignore_throttled` from ES requests

### v0.5.0

- added spring boot configuration metadata [#240](https://github.com/senacor/elasticsearch-evolution/pull/240)
Expand All @@ -300,7 +306,8 @@ ElasticsearchEvolution.configure()

- support out of order migration execution.
- version updates (spring-boot 2.7.17)
- added regression tests against OpenSearch 2.6.0
- added regression tests against OpenSearch 2.11, 2.10 and 2.9
- added regression tests against ElasticSearch 8.11. 8.10 and 8.9
- drop older Elasticsearch and OpenSearch versions in regression tests. Only test against the last 3 minor versions of the latest major release.
- added regression tests on JDK 21
- added regression tests for spring boot 3.1
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch-evolution-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>elasticsearch-evolution-parent</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
<relativePath>../</relativePath>
</parent>
<artifactId>elasticsearch-evolution-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ private Map<String, String> indicesOptions(IndexOptions indicesOptions) {
Map<String, String> nameValuePairs = new HashMap<>();
nameValuePairs.put("ignore_unavailable", Boolean.toString(indicesOptions.ignoreUnavailable()));
nameValuePairs.put("allow_no_indices", Boolean.toString(indicesOptions.allowNoIndices()));
nameValuePairs.put("ignore_throttled", Boolean.toString(indicesOptions.ignoreThrottled()));
String expandWildcards;
if (!indicesOptions.expandWildcardsOpen() && !indicesOptions.expandWildcardsClosed()) {
expandWildcards = "none";
Expand All @@ -293,24 +292,20 @@ private static final class IndexOptions {
private static final IndexOptions LENIENT_EXPAND_OPEN = new IndexOptions(
true,
true,
false,
true,
false);

private final boolean ignoreUnavailable;
private final boolean allowNoIndices;
private final boolean ignoreThrottled;
private final boolean expandWildcardsOpen;
private final boolean expandWildcardsClosed;

public IndexOptions(boolean ignoreUnavailable,
boolean allowNoIndices,
boolean ignoreThrottled,
boolean expandWildcardsOpen,
boolean expandWildcardsClosed) {
this.ignoreUnavailable = ignoreUnavailable;
this.allowNoIndices = allowNoIndices;
this.ignoreThrottled = ignoreThrottled;
this.expandWildcardsOpen = expandWildcardsOpen;
this.expandWildcardsClosed = expandWildcardsClosed;
}
Expand All @@ -327,10 +322,6 @@ public boolean allowNoIndices() {
return allowNoIndices;
}

public boolean ignoreThrottled() {
return ignoreThrottled;
}

public boolean expandWildcardsOpen() {
return expandWildcardsOpen;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ void OK_indexDocumentIsWrittenToElasticsearch(String versionInfo, EsUtils esUtil
softly.assertThat(res.isLocked())
.isTrue();
softly.assertThat(res.getExecutionRuntimeInMillis())
.isBetween(1, 6000);
.isBetween(1, 8000);
softly.assertThat(res.getExecutionTimestamp())
.isBetween(afterExecution.minus(6000, ChronoUnit.MILLIS), afterExecution);
.isBetween(afterExecution.minus(8000, ChronoUnit.MILLIS), afterExecution);
});

// wait until all documents are indexed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ public class EmbeddedElasticsearchExtension implements TestInstancePostProcessor
private static final Logger logger = LoggerFactory.getLogger(EmbeddedElasticsearchExtension.class);
private static final Namespace NAMESPACE = Namespace.create(ExtensionContext.class);
private static final SortedSet<SearchContainer> SUPPORTED_SEARCH_VERSIONS = Collections.unmodifiableSortedSet(new TreeSet<>(Arrays.asList(
ofOpensearch("2.11.0"),
ofOpensearch("2.12.0"),
ofOpensearch("2.11.1"),
ofOpensearch("2.10.0"),
ofOpensearch("2.9.0"),
ofOpensearch("1.3.12"),
ofOpensearch("1.3.15"),

ofElasticsearch("8.11.1"),
ofElasticsearch("8.12.2"),
ofElasticsearch("8.11.4"),
ofElasticsearch("8.10.4"),
ofElasticsearch("8.9.1"),
ofElasticsearch("7.17.15")
ofElasticsearch("7.17.18")
)));

@Override
Expand Down
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>elasticsearch-evolution-parent</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
<packaging>pom</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.7.17</version>
<version>2.7.18</version>
</parent>

<name>elasticsearch-evolution</name>
Expand Down Expand Up @@ -93,17 +93,17 @@

<!-- Plugin Versions -->
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.6.2</maven-javadoc-plugin.version>
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
<maven-gpg-plugin.version>3.2.0</maven-gpg-plugin.version>
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>

<!-- Dependency Versions -->
<commons-io.version>2.15.0</commons-io.version>
<commons-io.version>2.15.1</commons-io.version>
<!--when updating elasticsearch versions, also update "ElasticsearchContainer" version in EmbeddedElasticsearchExtension-->
<elasticsearch.version>7.5.2</elasticsearch.version>
<classgraph.version>4.8.164</classgraph.version>
<testcontainers.elasticsearch.version>1.19.2</testcontainers.elasticsearch.version>
<classgraph.version>4.8.168</classgraph.version>
<testcontainers.elasticsearch.version>1.19.7</testcontainers.elasticsearch.version>
<lombok.version>1.18.30</lombok.version>
<!-- newer byte-buddy version to support JDK 21 -->
<byte-buddy.version>1.14.9</byte-buddy.version>
Expand Down
2 changes: 1 addition & 1 deletion spring-boot-starter-elasticsearch-evolution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>elasticsearch-evolution-parent</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
<relativePath>../</relativePath>
</parent>
<artifactId>spring-boot-starter-elasticsearch-evolution</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tests/migration-scripts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>migration-scripts</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
<description>jar containing migration files</description>

<packaging>jar</packaging>
Expand Down
3 changes: 2 additions & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>elasticsearch-evolution-parent</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
<relativePath>../</relativePath>
</parent>
<artifactId>tests</artifactId>
Expand Down Expand Up @@ -38,6 +38,7 @@
<modules>
<module>test-spring-boot-3.0-scriptsInJarFile</module>
<module>test-spring-boot-3.1</module>
<module>test-spring-boot-3.2</module>
</modules>
</profile>
</profiles>
Expand Down
8 changes: 4 additions & 4 deletions tests/test-spring-boot-2.1-scriptsInJarFile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
</parent>
<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>test-spring-boot-2.1-scriptsInJarFile</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>

<commons-io.version>2.15.0</commons-io.version>
<commons-io.version>2.15.1</commons-io.version>
<elasticsearch.version>7.5.2</elasticsearch.version>
<testcontainers.elasticsearch.version>1.19.2</testcontainers.elasticsearch.version>
<testcontainers.elasticsearch.version>1.19.7</testcontainers.elasticsearch.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -85,7 +85,7 @@
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<!--jacoco snapshot to support java 17/18-->
<version>0.8.8</version>
<version>0.8.11</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand Down
8 changes: 4 additions & 4 deletions tests/test-spring-boot-2.2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
</parent>
<groupId>com.senacor.elasticsearch.evolution</groupId>
<artifactId>test-spring-boot-2.2</artifactId>
<version>0.5.0</version>
<version>0.5.1</version>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>

<commons-io.version>2.15.0</commons-io.version>
<commons-io.version>2.15.1</commons-io.version>
<elasticsearch.version>7.5.2</elasticsearch.version>
<testcontainers.elasticsearch.version>1.19.2</testcontainers.elasticsearch.version>
<testcontainers.elasticsearch.version>1.19.7</testcontainers.elasticsearch.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -77,7 +77,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<version>0.8.11</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand Down
Loading

0 comments on commit 82b29ad

Please sign in to comment.