Skip to content

Commit 2b918a6

Browse files
Merge pull request #147 from opensearch-project/2.x
Sync our `main` with `upstream`/`2.x`
2 parents 3ca6450 + 634e2ff commit 2b918a6

File tree

324 files changed

+445164
-4034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

324 files changed

+445164
-4034
lines changed

.github/workflows/bi-connectors.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Build connectors for BI tools
22

33
on:
44
pull_request:
5-
types: [opened, reopened]
65
push:
76
paths:
87
- 'bi-connectors/PowerBIConnector/**'

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches:
66
- 'main'
77
- '[1-9]+.[0-9x]+'
8-
types: [opened, reopened]
98
push:
109
branches-ignore:
1110
- 'dependabot/**'

.github/workflows/draft-release-notes-workflow.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Release Drafter
22

33
on:
44
pull_request:
5-
types: [opened, reopened]
65
push:
76
branches:
87
- 'main'

.github/workflows/link-checker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Link Checker
22

33
on:
44
pull_request:
5-
types: [opened, reopened]
65
push:
76
branches:
87
- 'main'

.github/workflows/sql-cli-test-and-build-workflow.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: SQL CLI Test and Build
22

33
on:
44
pull_request:
5-
types: [opened, reopened]
65
push:
76
branches-ignore:
87
- 'dependabot/**'

.github/workflows/sql-jdbc-test-and-build-workflow.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: SQL JDBC Java CI
22

33
on:
44
pull_request:
5-
types: [opened, reopened]
65
push:
76
branches-ignore:
87
- 'dependabot/**'

.github/workflows/sql-odbc-main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: OpenSearch ODBC Driver
22

33
on:
44
pull_request:
5-
types: [opened, reopened]
65
push:
76
branches-ignore:
87
- 'dependabot/**'
@@ -14,14 +13,15 @@ env:
1413
CI_OUTPUT_PATH: "sql-odbc/ci-output"
1514
ODBC_LIB_PATH: "./build/odbc/lib"
1615
ODBC_BIN_PATH: "./build/odbc/bin"
17-
ODBC_BUILD_PATH: "./build/odbc/build"
18-
AWS_SDK_INSTALL_PATH: "./build/aws-sdk/install"
16+
ODBC_BUILD_PATH: "./build/odbc/cmake"
17+
VCPKG_X64_INSTALL_PATH: ".\\src\\vcpkg_installed\\x64-windows"
18+
VCPKG_X86_INSTALL_PATH: ".\\src\\vcpkg_installed\\x86-windows"
1919

2020
# Tests are disabled (commented out) in all jobs because they are fail and/or outdated
2121
# Keeping them for the brighten future when we can re-activate them
2222
jobs:
2323
build-mac:
24-
runs-on: macos-10.15
24+
runs-on: macos-12
2525
defaults:
2626
run:
2727
working-directory: sql-odbc
@@ -104,7 +104,7 @@ jobs:
104104
- name: build-installer
105105
if: success()
106106
run: |
107-
.\scripts\build_installer.ps1 Release Win32 .\src $Env:ODBC_BUILD_PATH $Env:AWS_SDK_INSTALL_PATH
107+
.\scripts\build_installer.ps1 Release Win32 .\src $Env:ODBC_BUILD_PATH $Env:VCPKG_X86_INSTALL_PATH
108108
#- name: test
109109
# run: |
110110
# cp .\\libraries\\VisualLeakDetector\\bin32\\*.* .\\bin32\\Release
@@ -149,7 +149,7 @@ jobs:
149149
- name: build-installer
150150
if: success()
151151
run: |
152-
.\scripts\build_installer.ps1 Release x64 .\src $Env:ODBC_BUILD_PATH $Env:AWS_SDK_INSTALL_PATH
152+
.\scripts\build_installer.ps1 Release x64 .\src $Env:ODBC_BUILD_PATH $Env:VCPKG_X64_INSTALL_PATH
153153
#- name: test
154154
# run: |
155155
# cp .\\libraries\\VisualLeakDetector\\bin64\\*.* .\\bin64\\Release

.github/workflows/sql-test-and-build-workflow.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: SQL Java CI
22

33
on:
44
pull_request:
5-
types: [opened, reopened]
65
push:
76
branches-ignore:
87
- 'dependabot/**'
@@ -21,25 +20,32 @@ on:
2120
jobs:
2221
build:
2322
strategy:
23+
# Run all jobs
24+
fail-fast: false
2425
matrix:
25-
java:
26-
- 11
27-
- 17
28-
runs-on: ubuntu-latest
26+
entry:
27+
- { os: ubuntu-latest, java: 11 }
28+
- { os: windows-latest, java: 11, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc}
29+
- { os: macos-latest, java: 11, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc }
30+
- { os: ubuntu-latest, java: 17 }
31+
- { os: windows-latest, java: 17, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc }
32+
- { os: macos-latest, java: 17, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc }
33+
runs-on: ${{ matrix.entry.os }}
2934

3035
steps:
3136
- uses: actions/checkout@v3
32-
37+
3338
- name: Set up JDK ${{ matrix.java }}
3439
uses: actions/setup-java@v3
3540
with:
3641
distribution: 'temurin'
37-
java-version: ${{ matrix.java }}
38-
42+
java-version: ${{ matrix.entry.java }}
43+
3944
- name: Build with Gradle
40-
run: ./gradlew --continue build assemble
45+
run: ./gradlew --continue build ${{ matrix.entry.os_build_args }}
4146

4247
- name: Run backward compatibility tests
48+
if: ${{ matrix.entry.os == 'ubuntu-latest' }}
4349
run: ./scripts/bwctest.sh
4450

4551
- name: Create Artifact Path
@@ -49,7 +55,7 @@ jobs:
4955
5056
# This step uses the codecov-action Github action: https://github.com/codecov/codecov-action
5157
- name: Upload SQL Coverage Report
52-
if: always()
58+
if: ${{ always() && matrix.entry.os == 'ubuntu-latest' }}
5359
uses: codecov/codecov-action@v3
5460
with:
5561
flags: sql-engine
@@ -58,11 +64,11 @@ jobs:
5864
- name: Upload Artifacts
5965
uses: actions/upload-artifact@v2
6066
with:
61-
name: opensearch-sql
67+
name: opensearch-sql-${{ matrix.entry.os }}
6268
path: opensearch-sql-builds
6369

6470
- name: Upload test reports
65-
if: always()
71+
if: ${{ always() && matrix.entry.os == 'ubuntu-latest' }}
6672
uses: actions/upload-artifact@v2
6773
with:
6874
name: test-reports

.github/workflows/sql-test-workflow.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ name: SQL Plugin Tests
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
name:
7+
required: false
8+
type: string
9+
10+
run-name:
11+
${{ inputs.name == '' && format('{0} @ {1}', github.ref_name, github.sha) || inputs.name }}
512

613
jobs:
714
build:
@@ -64,10 +71,10 @@ jobs:
6471
6572
- name: Verify test results
6673
run: |
67-
if [[ -e failures.log ]]
74+
if [[ -e report.log ]]
6875
then
6976
echo "## FAILED TESTS :facepalm::warning::bangbang:" >> $GITHUB_STEP_SUMMARY
70-
cat failures.log >> $GITHUB_STEP_SUMMARY
77+
cat report.log >> $GITHUB_STEP_SUMMARY
7178
exit 1
7279
fi
7380

.github/workflows/sql-workbench-test-and-build-workflow.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: SQL Workbench Test and Build
22

33
on:
44
pull_request:
5-
types: [opened, reopened]
65
push:
76
branches-ignore:
87
- 'dependabot/**'
@@ -17,8 +16,15 @@ env:
1716

1817
jobs:
1918
build:
20-
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
os: [ubuntu-latest, windows-latest, macos-latest]
22+
runs-on: ${{ matrix.os }}
2123
steps:
24+
- name: Enable longer filenames
25+
if: ${{ matrix.os == 'windows-latest' }}
26+
run: git config --system core.longpaths true
27+
2228
- name: Checkout Plugin
2329
uses: actions/checkout@v3
2430

@@ -52,7 +58,7 @@ jobs:
5258
yarn test:jest --coverage
5359
5460
- name: Upload coverage
55-
if: always()
61+
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
5662
uses: codecov/codecov-action@v3
5763
with:
5864
flags: query-workbench
@@ -69,5 +75,6 @@ jobs:
6975
if: always()
7076
uses: actions/upload-artifact@v1 # can't update to v3 because upload fails
7177
with:
72-
name: workbench
78+
name: workbench-${{ matrix.os }}
7379
path: ../OpenSearch-Dashboards/plugins/workbench/build
80+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ gen
4242
.DS_Store
4343

4444
/artifacts/
45+
/.pid.lock
46+
/.prom.pid.lock

NOTICE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Foundation (http://www.apache.org/).
1111
This product includes software developed by
1212
Joda.org (http://www.joda.org/).
1313

14+
This product includes software developed by
15+
Kraken (https://github.com/thekrakken/java-grok).
16+
1417
This project is based on the Apache 2.0-licensed elasticsearch-sql project (https://github.com/NLPchina/elasticsearch-sql):
1518

1619
Copyright 2014 omershelef

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ buildscript {
99
opensearch_version = System.getProperty("opensearch.version", "2.4.0-SNAPSHOT")
1010
spring_version = "5.3.22"
1111
jackson_version = "2.13.4"
12+
jackson_databind_version = "2.13.4.2"
1213
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
1314
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
1415
version_tokens = opensearch_version.tokenize('-')

common/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ dependencies {
3535
api "org.antlr:antlr4-runtime:4.7.1"
3636
api group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
3737
api group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1'
38+
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
3839

3940
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
41+
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.9.1'
42+
testImplementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
43+
testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1'
4044
}

0 commit comments

Comments
 (0)