Skip to content

Commit

Permalink
Merge pull request #147 from opensearch-project/2.x
Browse files Browse the repository at this point in the history
Sync our `main` with `upstream`/`2.x`
  • Loading branch information
Yury-Fridlyand authored Oct 31, 2022
2 parents 3ca6450 + 634e2ff commit 2b918a6
Show file tree
Hide file tree
Showing 324 changed files with 445,164 additions and 4,034 deletions.
1 change: 0 additions & 1 deletion .github/workflows/bi-connectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Build connectors for BI tools

on:
pull_request:
types: [opened, reopened]
push:
paths:
- 'bi-connectors/PowerBIConnector/**'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- 'main'
- '[1-9]+.[0-9x]+'
types: [opened, reopened]
push:
branches-ignore:
- 'dependabot/**'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/draft-release-notes-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Release Drafter

on:
pull_request:
types: [opened, reopened]
push:
branches:
- 'main'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Link Checker

on:
pull_request:
types: [opened, reopened]
push:
branches:
- 'main'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sql-cli-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: SQL CLI Test and Build

on:
pull_request:
types: [opened, reopened]
push:
branches-ignore:
- 'dependabot/**'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/sql-jdbc-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: SQL JDBC Java CI

on:
pull_request:
types: [opened, reopened]
push:
branches-ignore:
- 'dependabot/**'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/sql-odbc-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: OpenSearch ODBC Driver

on:
pull_request:
types: [opened, reopened]
push:
branches-ignore:
- 'dependabot/**'
Expand All @@ -14,14 +13,15 @@ env:
CI_OUTPUT_PATH: "sql-odbc/ci-output"
ODBC_LIB_PATH: "./build/odbc/lib"
ODBC_BIN_PATH: "./build/odbc/bin"
ODBC_BUILD_PATH: "./build/odbc/build"
AWS_SDK_INSTALL_PATH: "./build/aws-sdk/install"
ODBC_BUILD_PATH: "./build/odbc/cmake"
VCPKG_X64_INSTALL_PATH: ".\\src\\vcpkg_installed\\x64-windows"
VCPKG_X86_INSTALL_PATH: ".\\src\\vcpkg_installed\\x86-windows"

# Tests are disabled (commented out) in all jobs because they are fail and/or outdated
# Keeping them for the brighten future when we can re-activate them
jobs:
build-mac:
runs-on: macos-10.15
runs-on: macos-12
defaults:
run:
working-directory: sql-odbc
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
- name: build-installer
if: success()
run: |
.\scripts\build_installer.ps1 Release Win32 .\src $Env:ODBC_BUILD_PATH $Env:AWS_SDK_INSTALL_PATH
.\scripts\build_installer.ps1 Release Win32 .\src $Env:ODBC_BUILD_PATH $Env:VCPKG_X86_INSTALL_PATH
#- name: test
# run: |
# cp .\\libraries\\VisualLeakDetector\\bin32\\*.* .\\bin32\\Release
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- name: build-installer
if: success()
run: |
.\scripts\build_installer.ps1 Release x64 .\src $Env:ODBC_BUILD_PATH $Env:AWS_SDK_INSTALL_PATH
.\scripts\build_installer.ps1 Release x64 .\src $Env:ODBC_BUILD_PATH $Env:VCPKG_X64_INSTALL_PATH
#- name: test
# run: |
# cp .\\libraries\\VisualLeakDetector\\bin64\\*.* .\\bin64\\Release
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/sql-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: SQL Java CI

on:
pull_request:
types: [opened, reopened]
push:
branches-ignore:
- 'dependabot/**'
Expand All @@ -21,25 +20,32 @@ on:
jobs:
build:
strategy:
# Run all jobs
fail-fast: false
matrix:
java:
- 11
- 17
runs-on: ubuntu-latest
entry:
- { os: ubuntu-latest, java: 11 }
- { os: windows-latest, java: 11, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc}
- { os: macos-latest, java: 11, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc }
- { os: ubuntu-latest, java: 17 }
- { os: windows-latest, java: 17, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc }
- { os: macos-latest, java: 17, os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc }
runs-on: ${{ matrix.entry.os }}

steps:
- uses: actions/checkout@v3

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
java-version: ${{ matrix.entry.java }}

- name: Build with Gradle
run: ./gradlew --continue build assemble
run: ./gradlew --continue build ${{ matrix.entry.os_build_args }}

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

- name: Create Artifact Path
Expand All @@ -49,7 +55,7 @@ jobs:
# This step uses the codecov-action Github action: https://github.com/codecov/codecov-action
- name: Upload SQL Coverage Report
if: always()
if: ${{ always() && matrix.entry.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v3
with:
flags: sql-engine
Expand All @@ -58,11 +64,11 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: opensearch-sql
name: opensearch-sql-${{ matrix.entry.os }}
path: opensearch-sql-builds

- name: Upload test reports
if: always()
if: ${{ always() && matrix.entry.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: test-reports
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/sql-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: SQL Plugin Tests

on:
workflow_dispatch:
inputs:
name:
required: false
type: string

run-name:
${{ inputs.name == '' && format('{0} @ {1}', github.ref_name, github.sha) || inputs.name }}

jobs:
build:
Expand Down Expand Up @@ -64,10 +71,10 @@ jobs:
- name: Verify test results
run: |
if [[ -e failures.log ]]
if [[ -e report.log ]]
then
echo "## FAILED TESTS :facepalm::warning::bangbang:" >> $GITHUB_STEP_SUMMARY
cat failures.log >> $GITHUB_STEP_SUMMARY
cat report.log >> $GITHUB_STEP_SUMMARY
exit 1
fi
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/sql-workbench-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: SQL Workbench Test and Build

on:
pull_request:
types: [opened, reopened]
push:
branches-ignore:
- 'dependabot/**'
Expand All @@ -17,8 +16,15 @@ env:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Enable longer filenames
if: ${{ matrix.os == 'windows-latest' }}
run: git config --system core.longpaths true

- name: Checkout Plugin
uses: actions/checkout@v3

Expand Down Expand Up @@ -52,7 +58,7 @@ jobs:
yarn test:jest --coverage
- name: Upload coverage
if: always()
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v3
with:
flags: query-workbench
Expand All @@ -69,5 +75,6 @@ jobs:
if: always()
uses: actions/upload-artifact@v1 # can't update to v3 because upload fails
with:
name: workbench
name: workbench-${{ matrix.os }}
path: ../OpenSearch-Dashboards/plugins/workbench/build

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ gen
.DS_Store

/artifacts/
/.pid.lock
/.prom.pid.lock
3 changes: 3 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Foundation (http://www.apache.org/).
This product includes software developed by
Joda.org (http://www.joda.org/).

This product includes software developed by
Kraken (https://github.com/thekrakken/java-grok).

This project is based on the Apache 2.0-licensed elasticsearch-sql project (https://github.com/NLPchina/elasticsearch-sql):

Copyright 2014 omershelef
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ buildscript {
opensearch_version = System.getProperty("opensearch.version", "2.4.0-SNAPSHOT")
spring_version = "5.3.22"
jackson_version = "2.13.4"
jackson_databind_version = "2.13.4.2"
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")
version_tokens = opensearch_version.tokenize('-')
Expand Down
4 changes: 4 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ dependencies {
api "org.antlr:antlr4-runtime:4.7.1"
api group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
api group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1'
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'

testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.9.1'
testImplementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1'
}
Loading

0 comments on commit 2b918a6

Please sign in to comment.