Skip to content

Commit 8d2dd56

Browse files
[2.x] Lucene 9.9.1 Upgrade (#99)
* custom codecs upgrade to lucene99 codec Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com> * moving lucene95 extended codecs to backward_codecs Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com> * introducing bwc framework Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com> * addressing review comments Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com> * re-introducing lucene95 custom stored fields format Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com> --------- Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
1 parent edd8216 commit 8d2dd56

24 files changed

+1386
-115
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 'Create a backwards compatible ready build'
2+
description: 'Checkouts the official version of a the custom-codecs plugin and builds it so it can be used for BWC tests'
3+
4+
inputs:
5+
plugin-branch:
6+
description: 'The branch of the plugin that should be built, e.g "2.2", "1.x"'
7+
required: true
8+
9+
outputs:
10+
built-version:
11+
description: 'The version of OpenSearch that was associated with this branch'
12+
value: ${{ steps.get-opensearch-version.outputs.version }}
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Enable Longpaths if on Windows
18+
if: ${{ runner.os == 'Windows' }}
19+
run: git config --system core.longpaths true
20+
shell: pwsh
21+
22+
- name: Checkout Branch from Fork
23+
if: ${{ inputs.plugin-branch == 'current_branch' }}
24+
uses: actions/checkout@v2
25+
with:
26+
path: ${{ inputs.plugin-branch }}
27+
28+
- uses: actions/checkout@v3
29+
if: ${{ inputs.plugin-branch != 'current_branch' }}
30+
with:
31+
repository: opensearch-project/custom-codecs
32+
ref: ${{ inputs.plugin-branch }}
33+
path: ${{ inputs.plugin-branch }}
34+
35+
- name: Build
36+
uses: gradle/gradle-build-action@v2
37+
with:
38+
cache-disabled: true
39+
arguments: assemble
40+
build-root-directory: ${{ inputs.plugin-branch }}
41+
42+
- id: get-opensearch-version
43+
uses: peternied/get-opensearch-version@v1
44+
with:
45+
working-directory: ${{ inputs.plugin-branch }}
46+
47+
- name: Copy current distro into the expected folder
48+
run: |
49+
mkdir -p ./bwc-test/src/test/resources/${{ steps.get-opensearch-version.outputs.version }}
50+
cp ${{ inputs.plugin-branch }}/build/distributions/opensearch-custom-codecs-${{ steps.get-opensearch-version.outputs.version }}-SNAPSHOT.zip ./bwc-test/src/test/resources/${{ steps.get-opensearch-version.outputs.version }}
51+
shell: bash
+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: 'Runs the backward compatiblity test suite'
2+
description: 'Tests backwards compability between a previous and next version of this plugin'
3+
4+
inputs:
5+
plugin-previous-branch:
6+
description: 'The branch of the plugin that should be built for the previous version, e.g "2.2", "1.x"'
7+
required: true
8+
9+
plugin-next-branch:
10+
description: 'The branch of the plugin that should be built for the next version, e.g "2.3", "main"'
11+
required: true
12+
13+
report-artifact-name:
14+
description: 'The name of the artifacts for this run, e.g. "BWC-2.1-to-2.4-results"'
15+
required: true
16+
17+
username:
18+
description: 'Username to use for cluster health check in testClusters'
19+
required: true
20+
21+
password:
22+
description: 'Password to use for cluster health check in testClusters'
23+
required: true
24+
25+
runs:
26+
using: "composite"
27+
steps:
28+
29+
- id: build-previous
30+
uses: ./.github/actions/create-bwc-build
31+
with:
32+
plugin-branch: ${{ inputs.plugin-previous-branch }}
33+
34+
- id: build-next
35+
uses: ./.github/actions/create-bwc-build
36+
with:
37+
plugin-branch: ${{ inputs.plugin-next-branch }}
38+
39+
- name: Run BWC tests
40+
uses: gradle/gradle-build-action@v2
41+
with:
42+
cache-disabled: true
43+
arguments: |
44+
-p bwc-test
45+
bwcTestSuite
46+
-Dtests.security.manager=true
47+
-Dtests.opensearch.username=${{ inputs.username }}
48+
-Dtests.opensearch.password=${{ inputs.password }}
49+
-Dbwc.version.previous=${{ steps.build-previous.outputs.built-version }}
50+
-Dbwc.version.next=${{ steps.build-next.outputs.built-version }} -i
51+
52+
- uses: alehechka/upload-tartifact@v2
53+
if: always()
54+
with:
55+
name: ${{ inputs.report-artifact-name }}
56+
path: |
57+
./bwc-test/build/reports/

.github/workflows/ci.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Backward Compatibility Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- 2.x
7+
pull_request:
8+
9+
env:
10+
GRADLE_OPTS: -Dhttp.keepAlive=true
11+
CI_ENVIRONMENT: normal
12+
13+
jobs:
14+
15+
backward-compatibility-build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/setup-java@v4
19+
with:
20+
distribution: temurin # Temurin is a distribution of adoptium
21+
java-version: 17
22+
23+
- name: Checkout custom-codecs Repo
24+
uses: actions/checkout@v4
25+
26+
- name: Build BWC tests
27+
uses: gradle/gradle-build-action@v2
28+
with:
29+
cache-disabled: true
30+
arguments: |
31+
-p bwc-test build -x test -x integTest
32+
33+
backward-compatibility:
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
jdk: [11, 17]
38+
platform: [ubuntu-latest, windows-latest]
39+
runs-on: ${{ matrix.platform }}
40+
41+
steps:
42+
- uses: actions/setup-java@v4
43+
with:
44+
distribution: temurin # Temurin is a distribution of adoptium
45+
java-version: ${{ matrix.jdk }}
46+
47+
- name: Checkout custom-codecs Repo
48+
uses: actions/checkout@v4
49+
50+
- id: build-previous
51+
uses: ./.github/actions/run-bwc-suite
52+
with:
53+
plugin-previous-branch: "2.11"
54+
plugin-next-branch: "current_branch"
55+
report-artifact-name: bwc-${{ matrix.platform }}-jdk${{ matrix.jdk }}
56+
username: admin
57+
password: admin

0 commit comments

Comments
 (0)