This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
es7-persistence module migration from 2.31.4 to 3.0.6 #2324
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1489d60
es7-persistence module migration from 2.31.4 to 3.0.6
FpyrypT 9526b7b
revert conductor dependencies.lock
FpyrypT d4d206d
finalize es7 migration
FpyrypT 8f17d87
update es-7 README.md
FpyrypT 50d07b8
update es-7 README
FpyrypT e609119
rollback conductor es-7 properties migration
FpyrypT f848330
fix:Create indexes on start-up including task_log one
marcocrasso 98578f8
include es7-persistence to project
FpyrypT 1ada33a
shade es7-persistence
FpyrypT 3026e1e
fix es7 README.md
FpyrypT 55a3408
replace deprecated method
FpyrypT 5c40851
set ext['elasticsearch.version'] explicitly to avoid conflicts
FpyrypT 7f3f283
update es7-persistence README
FpyrypT 6aa6f33
fix revElasticSearch7 version, shaded jar, add reminding note
FpyrypT bc35b29
fix elasticsearch container version
FpyrypT f0859f7
remove revElasticSearch7 from build.gradle
FpyrypT 0f78d31
Merge remote-tracking branch 'origin/main' into es7
FpyrypT 2090c3e
remove not necessary ext['elasticsearch.version'], replace _index_tem…
FpyrypT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# ES7 Persistence | ||
|
||
This module provides ES7 persistence when indexing workflows and tasks. | ||
|
||
## ES Breaking changes | ||
|
||
From ES6 to ES7 there were significant breaking changes which affected ES7-persistence module implementation. | ||
* Mapping type deprecation | ||
* Templates API | ||
* TransportClient deprecation | ||
|
||
More information can be found here: https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html | ||
|
||
|
||
## Build | ||
|
||
1. In order to use the ES7, you must change the following files from ES6 to ES7: | ||
|
||
https://github.com/Netflix/conductor/blob/main/build.gradle | ||
https://github.com/Netflix/conductor/blob/main/server/src/main/resources/application.properties | ||
|
||
In file: | ||
|
||
- /build.gradle | ||
|
||
change ext['elasticsearch.version'] from revElasticSearch6 to revElasticSearch7 | ||
|
||
|
||
In file: | ||
|
||
- /server/src/main/resources/application.properties | ||
|
||
change conductor.elasticsearch.version from 6 to 7 | ||
|
||
Also you need to recreate dependencies.lock files with ES7 dependencies. To do that delete all dependencies.lock files and then run: | ||
|
||
``` | ||
./gradlew generateLock updateLock saveLock | ||
``` | ||
|
||
|
||
2. To use the ES7 for all modules include test-harness, you must change also the following files: | ||
|
||
https://github.com/Netflix/conductor/blob/main/test-harness/build.gradle | ||
https://github.com/Netflix/conductor/blob/main/test-harness/src/test/java/com/netflix/conductor/test/integration/AbstractEndToEndTest.java | ||
|
||
In file: | ||
|
||
- /test-harness/build.gradle | ||
|
||
* change module inclusion from 'es6-persistence' to 'es7-persistence' | ||
|
||
In file: | ||
|
||
- /test-harness/src/test/java/com/netflix/conductor/test/integration/AbstractEndToEndTest.java | ||
|
||
* change conductor.elasticsearch.version from 6 to 7 | ||
* change DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss").withTag("6.8.12") to DockerImageName.parse("docker.elastic.co/elasticsearch/elasticsearch-oss").withTag("7.6.2") | ||
|
||
|
||
## Usage | ||
|
||
This module uses the following configuration options: | ||
|
||
* `conductor.elasticsearch.url` - A comma separated list of schema/host/port of the ES nodes to communicate with. | ||
Schema can be `http` or `https`. If schema is ignored then `http` transport will be used; | ||
Since ES deprecated TransportClient, conductor will use only the REST transport protocol. | ||
* `conductor.elasticsearch.indexPrefix` - The name of the workflow and task index. | ||
Defaults to `conductor` | ||
* `conductor.elasticsearch.asyncWorkerQueueSize` - Worker Queue size used in executor service for async methods in IndexDao | ||
Defaults to `100` | ||
* `conductor.elasticsearch.asyncMaxPoolSize` - Maximum thread pool size in executor service for async methods in IndexDao | ||
Defaults to `12` | ||
* `conductor.elasticsearch.asyncBufferFlushTimeout` - Timeout (in seconds) for the in-memory to be flushed if not explicitly indexed | ||
Defaults to `10` | ||
|
||
### BASIC Authentication | ||
If you need to pass user/password to connect to ES, add the following properties to your config file | ||
* conductor.elasticsearch.username | ||
* conductor.elasticsearch.password | ||
|
||
Example | ||
``` | ||
conductor.elasticsearch.username=someusername | ||
conductor.elasticsearch.password=somepassword | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright 2021 Netflix, Inc. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
plugins { | ||
id 'com.github.johnrengelman.shadow' version '6.1.0' | ||
id 'java' | ||
} | ||
|
||
configurations { | ||
// Prevent shaded dependencies from being published, while keeping them available to tests | ||
shadow.extendsFrom compileOnly | ||
testRuntime.extendsFrom compileOnly | ||
} | ||
|
||
ext['elasticsearch.version'] = revElasticSearch7 | ||
|
||
dependencies { | ||
implementation project(':conductor-common') | ||
implementation project(':conductor-core') | ||
|
||
compileOnly 'org.springframework.boot:spring-boot-starter' | ||
|
||
implementation "commons-io:commons-io:${revCommonsIo}" | ||
implementation "org.apache.commons:commons-lang3" | ||
// SBMTODO: remove guava dep | ||
implementation "com.google.guava:guava:${revGuava}" | ||
|
||
implementation "com.fasterxml.jackson.core:jackson-databind" | ||
implementation "com.fasterxml.jackson.core:jackson-core" | ||
|
||
implementation "org.elasticsearch.client:elasticsearch-rest-client" | ||
implementation "org.elasticsearch.client:elasticsearch-rest-high-level-client" | ||
|
||
testImplementation "org.awaitility:awaitility:${revAwaitility}" | ||
testImplementation "org.testcontainers:elasticsearch:${revTestContainer}" | ||
testImplementation project(':conductor-common').sourceSets.test.output | ||
} | ||
|
||
// Drop the classifier and delete jar task actions to replace the regular jar artifact with the shadow artifact | ||
shadowJar { | ||
configurations = [project.configurations.shadow] | ||
classifier = null | ||
|
||
// Service files are not included by default. | ||
mergeServiceFiles { | ||
include 'META-INF/services/*' | ||
include 'META-INF/maven/*' | ||
} | ||
} | ||
|
||
jar.enabled = false | ||
jar.dependsOn shadowJar |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary here as the dependency is shaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, see previous comment about a preferable way to avoid transitive dependencies conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left ext['elasticsearch.version'] = revElasticSearch7 for es7-persistence module only to avoid transitive dependencies conflicts