-
Notifications
You must be signed in to change notification settings - Fork 162
[RORDEV-1435] Improved patching algorithm #1095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mgoworko
merged 38 commits into
sscarduzio:develop
from
mgoworko:feature/rordev-1435-improved-patching-algorithm
May 8, 2025
Merged
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
b7834d8
algorithm improvements and refactor
mgoworko c2a2da8
tests
mgoworko 67157a1
bump azure base image
mgoworko 0e2f70a
errors instead of exceptions
mgoworko db4b55a
errors instead of exceptions
mgoworko c620684
errors instead of exceptions
mgoworko 00765e6
missing flag renames
mgoworko c76d8e4
use and test flag with and without =
mgoworko 2485bc4
use new ror-tools.jar patch argument only for ROR>=1.64
mgoworko c75db4a
additional adjustments for testing from file and sources
mgoworko 0b50455
review changes
mgoworko e5f4eef
review changes
mgoworko 81a0ad6
review changes
mgoworko 3f76ba0
Bump pre version
mgoworko f4e625b
qs
mgoworko d69c154
file hashes
mgoworko bfc2278
review changes
mgoworko a354e68
Merge remote-tracking branch 'origin/develop' into feature/rordev-143…
mgoworko 24f3b09
qs
mgoworko fbc7644
review changes
mgoworko 5b1d1c2
qs
mgoworko 478d36b
qs
mgoworko e50df09
debug pipeline problem
mgoworko 76fbbb1
debug pipeline problem
mgoworko b9dc12d
qs
mgoworko afacc0a
qs
mgoworko 62641b5
qs
mgoworko ce4dd7e
qs
mgoworko 5a2605e
qs
mgoworko 736898e
qs
mgoworko 0cd7839
qs
mgoworko 1cf4c3a
qs
mgoworko a790c0d
review changes
mgoworko ea45985
Merge remote-tracking branch 'origin/develop' into feature/rordev-143…
mgoworko c602993
review changes
mgoworko 7bc476e
test fix
mgoworko 49dc936
fix
mgoworko 2329ca0
comment
mgoworko 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 hidden or 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 |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ parameters: | |
| default: ' ' | ||
|
|
||
| pool: | ||
| vmImage: 'ubuntu-20.04' | ||
| vmImage: 'ubuntu-22.04' | ||
|
|
||
| stages: | ||
|
|
||
|
|
||
33 changes: 25 additions & 8 deletions
33
docker-envs/base-ror-docker/es/install-ror-es-using-api.sh
This file contains hidden or 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 |
|---|---|---|
| @@ -1,23 +1,40 @@ | ||
| #!/bin/bash | ||
|
|
||
| function verlte() { | ||
| [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ] | ||
| verlte() { | ||
| local v1="$1" | ||
| local v2="${2%%[-+]*}" # Strip suffix from second argument in order to support -pre versions | ||
| [ "$v1" = "$(echo -e "$v1\n$v2" | sort -V | head -n1)" ] | ||
| } | ||
|
|
||
| if [[ -z "$ES_VERSION" ]]; then | ||
| echo "No ES_VERSION variable is set" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ -z "$ROR_VERSION" ]]; then | ||
| echo "No $ROR_VERSION variable is set" | ||
| exit 2 | ||
| if [[ ! -v ROR_VERSION || -z "$ROR_VERSION" ]]; then | ||
| echo "No ROR_VERSION variable is set" | ||
| exit 3 | ||
| fi | ||
|
|
||
| echo "Installing ES ROR $ROR_VERSION..." | ||
| /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch "https://api.beshu.tech/download/es?esVersion=$ES_VERSION&pluginVersion=$ROR_VERSION&email=ror-sandbox%40readonlyrest.com" | ||
| if verlte "6.5.0" "$ES_VERSION"; then | ||
| echo "Patching ES ROR $ROR_VERSION..." | ||
| /usr/share/elasticsearch/jdk/bin/java -jar /usr/share/elasticsearch/plugins/readonlyrest/ror-tools.jar patch --I_UNDERSTAND_AND_ACCEPT_ES_PATCHING yes | ||
|
|
||
| # Set Java path based on ES version | ||
| if verlte "7.0.0" "$ES_VERSION"; then | ||
| JAVA_BIN_PATH="/usr/share/elasticsearch/jdk/bin/java" | ||
| elif verlte "6.7.0" "$ES_VERSION"; then | ||
| JAVA_BIN_PATH="$JAVA_HOME/bin/java" | ||
| else | ||
| echo "Unsupported ES version: $ES_VERSION" | ||
| exit 4 | ||
| fi | ||
|
|
||
| # Set OPTIONS based on ROR version | ||
| if verlte "1.64.0" "$ROR_VERSION"; then | ||
| OPTIONS="--I_UNDERSTAND_AND_ACCEPT_ES_PATCHING=yes" | ||
| else | ||
| OPTIONS="" | ||
| fi | ||
|
|
||
| $JAVA_BIN_PATH -jar /usr/share/elasticsearch/plugins/readonlyrest/ror-tools.jar patch $OPTIONS | ||
| echo "DONE!" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| publishedPluginVersion=1.63.0 | ||
| pluginVersion=1.64.0-pre7 | ||
| pluginVersion=1.64.0-pre8 | ||
| pluginName=readonlyrest | ||
|
|
||
| org.gradle.jvmargs=-Xmx6144m |
This file contains hidden or 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
54 changes: 0 additions & 54 deletions
54
ror-tools-core/src/main/scala/tech/beshu/ror/tools/core/actions.scala
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.