-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add backwards compatibility tests for SQL #322
Merged
Merged
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
aa496c6
Add bwc tests setup
joshuali925 01f2004
update setup
joshuali925 4e2d8f6
Use only 1 cluster
joshuali925 893e413
Use 2 clusters
joshuali925 0c5b1ae
Add 1.2 snapshot
joshuali925 43cfcfa
Fix test setup
joshuali925 ae59822
Add sql bwc tests for queries and cluster settings
joshuali925 17711c7
Add bwc test script and remove latest artifact
joshuali925 40d9a0c
Format code
joshuali925 e47f13a
Fix indentation
joshuali925 b793c39
Merge branch 'main' into pr/322
joshuali925 a6c4fef
Add bwc tests to CI
joshuali925 303b32e
Merge branch 'main' into sql-bwc
joshuali925 4644dbd
Bump bwc to 1.2.1-SNAPSHOT
joshuali925 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
function usage() { | ||
echo "" | ||
echo "This script is used to run Backwards Compatibility tests" | ||
echo "--------------------------------------------------------------------------" | ||
echo "Usage: $0 [args]" | ||
echo "" | ||
echo "Required arguments:" | ||
echo "None" | ||
echo "" | ||
echo -e "-h\tPrint this message." | ||
echo "--------------------------------------------------------------------------" | ||
} | ||
|
||
while getopts ":h" arg; do | ||
case $arg in | ||
h) | ||
usage | ||
exit 1 | ||
;; | ||
?) | ||
echo "Invalid option: -${OPTARG}" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# Place SQL artifact for the current version for bwc | ||
function setup_bwc_artifact() { | ||
# This gets opensearch version from build.gradle (e.g. 1.2.0-SNAPSHOT), | ||
# then converts to plugin version by appending ".0" (e.g. 1.2.0.0-SNAPSHOT), | ||
# assuming one line in build.gradle is 'opensearch_version= System.getProperty("opensearch.version", "<opensearch_version>")'. | ||
plugin_version=$(grep 'opensearch_version = System.getProperty' build.gradle | \ | ||
grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+[^"]*' | sed -e 's/\([0-9]\)\([^0-9]*\)$/\1.0\2/') | ||
plugin_artifact="./plugin/build/distributions/opensearch-sql-$plugin_version.zip" | ||
bwc_artifact_dir="./integ-test/src/test/resources/bwc/$plugin_version" | ||
|
||
if [ -z "${plugin_version// }" ]; then | ||
echo "Error: failed to retrieve plugin version from build.gradle." >&2 | ||
exit 1 | ||
fi | ||
|
||
# copy current artifact to bwc artifact directory if it's not there | ||
if [ ! -f "$bwc_artifact_dir/opensearch-sql-$plugin_version.zip" ]; then | ||
if [ ! -f "$plugin_artifact" ]; then | ||
./gradlew assemble | ||
fi | ||
mkdir -p "$bwc_artifact_dir" | ||
cp "$plugin_artifact" "$bwc_artifact_dir" | ||
fi | ||
} | ||
|
||
setup_bwc_artifact | ||
./gradlew bwcTestSuite -Dtests.security.manager=false | ||
|
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# This file is generated by the 'io.freefair.lombok' Gradle plugin | ||
config.stopBubbling = true | ||
lombok.addLombokGeneratedAnnotation = true |
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.
np: should we have this double indent here?
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.
fixed