Skip to content
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 wrapper to builder #1

Closed
wants to merge 123 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
a395e4f
Update Jackson to 2.14.0 (#258) (#259)
reta Nov 9, 2022
bfe1998
Update Gradle to 7.6 (#309) (#311)
reta Jan 5, 2023
d377766
[Backport] [2.x] Fix: Make ChildrenAggregate as a SingleBucketAggrega…
sivaGH3 Jan 6, 2023
dcd5f58
[BUG] /_nodes/stats throwing serialization error (#315) (#320)
reta Jan 12, 2023
0c498c0
Removing unsupported dynamic_templates option for bulk (#276) (#319)
opensearch-trigger-bot[bot] Jan 12, 2023
aa9daf4
Fix: responseCompression option. (#322) (#327)
opensearch-trigger-bot[bot] Jan 17, 2023
0081c56
Introduce new OpenSearchTransport based on Apache HttpClient 5 (#281)…
reta Jan 17, 2023
0087546
Added support for signing service name. (#324) (#335)
dblock Jan 19, 2023
341b1c0
Added skip-changelog. (#331) (#341)
opensearch-trigger-bot[bot] Jan 21, 2023
80607fa
Increment to next minor version (#340)
VachaShah Jan 21, 2023
7eae121
Fix: do not double-wrap OpenSearchException. (#323) (#332)
opensearch-trigger-bot[bot] Jan 23, 2023
037d488
Adding x-amz-content-sha256 header for signed requests (#339) (#344)
VachaShah Jan 24, 2023
9d1b34d
Adds release workflows to onboard to new release process (#321) (#345)
gaiksaya Jan 24, 2023
00d8f99
Use bash (#346)
gaiksaya Jan 24, 2023
f527470
Fix issue with completion suggester being parsed as term suggester. (…
opensearch-trigger-bot[bot] Jan 26, 2023
959d721
ISSUE-292 Prevent SPI calls at runtime (#351)
chibenwa Jan 26, 2023
588c1ca
Bulk UpdateOperation misses upsert options (#353) (#358)
opensearch-trigger-bot[bot] Feb 7, 2023
2b500bb
Bumps Jackson from 2.14.1 to 2.14.2 (#357) (#359)
reta Feb 7, 2023
8daf5be
Upgrading compatibility to opensearch 2.5 (#367) (#368)
opensearch-trigger-bot[bot] Feb 20, 2023
b515c9c
[Backport 2.x] Feature/range aggregation fix 369 (#381)
opensearch-trigger-bot[bot] Feb 28, 2023
63693ab
Refactor two-client usage. (#333) (#386)
opensearch-trigger-bot[bot] Mar 2, 2023
faebdf7
Adding bulk request example in user guide (#373) (#384)
opensearch-trigger-bot[bot] Mar 3, 2023
684f216
Adding an example to use raw JSON class instead of target classes (#3…
opensearch-trigger-bot[bot] Mar 6, 2023
68ef7a7
Update Gradle to 8.0.2 (#392) (#397)
opensearch-trigger-bot[bot] Mar 7, 2023
2e7de62
Bumping classgraph from 4.8.149 to 4.8.156 (#395)
VachaShah Mar 8, 2023
a058ada
Add 2PR approval to release workflow (#383) (#394)
VachaShah Mar 8, 2023
607ebfe
Add "mappings" field to IndexSettings object (#382) (#400)
opensearch-trigger-bot[bot] Mar 13, 2023
cb11e41
Increment client version to 2.3.0 (#396)
VachaShah Mar 13, 2023
af20708
Bump io.github.classgraph:classgraph from 4.8.156 to 4.8.157 in /java…
reta Mar 15, 2023
66166f7
Add buffered lookahead for Jackson (#338) (#410)
opensearch-trigger-bot[bot] Mar 16, 2023
402c6b9
Add option to set headers and sort options in cat requests (#412) (#413)
opensearch-trigger-bot[bot] Mar 21, 2023
04dc3ad
Support DataStream APIs (#416) (#419)
opensearch-trigger-bot[bot] Apr 3, 2023
defaa44
Fix compilation issues (after changes in main) (#423) (#427)
opensearch-trigger-bot[bot] Apr 4, 2023
4230a1e
refactor: create AbstractAggregationRequestIT class + fail with OpenS…
szczepanczykd Apr 5, 2023
e2869c0
Increment version to 2.4.0 (#438)
VachaShah Apr 11, 2023
7c021c2
Backport/backport 442 to 2.x (#445)
szczepanczykd Apr 12, 2023
573ac7f
Fixing changelog for the 2.x branch (#447)
VachaShah Apr 12, 2023
d358a5a
Fixing issue when tracktotalhits is disabled (#372) (#449)
VachaShah Apr 13, 2023
7a80b89
Add javadoc link for the client (#448)
VachaShah Apr 13, 2023
f0d3f7d
Backport workflow improvements and increment version (#446)
VachaShah Apr 13, 2023
34e544f
[Backport 2.x] Publish snapshots from 2.x branch (#451) (#454)
VachaShah Apr 14, 2023
1320f3e
[Backport 2.x] Add workflow to publish snapshots via GHA (#325) (#455)
VachaShah Apr 14, 2023
dd902af
Fixing issues when deserializing response for tasks API (#463) (#467)
opensearch-trigger-bot[bot] May 3, 2023
a89f8a5
[Backport 2.x] Include aggregations and suggest in SearchTemplateResp…
eNorby1 May 4, 2023
9a666eb
Adds point in time APIs (#461) (#472)
harshavamsi May 9, 2023
a7d2624
fix: handle String error deserialization for ErrorCause object (#301)…
szczepanczykd May 11, 2023
964be9e
Upgrading gradle plugin dependency-license-report to 2.2 (#483) (#485)
VachaShah May 16, 2023
4294495
Fixes deserialization of enums when using booleans instead of strings…
opensearch-trigger-bot[bot] May 21, 2023
5b59448
Backport/backport 489 to 2.x (#496)
szczepanczykd May 23, 2023
3d78190
Upgrading to latest OpenSearch version (#487)
VachaShah May 23, 2023
2f83361
Add RestClient initialization code snippets (#501) (#504)
reta May 30, 2023
18c4f07
[Backport] backport-495-to-2.x (#508)
chenqi0805 May 31, 2023
5dc144c
refactor: deprecate totalDataSetSize and totalDataSetSizeInBytes in S…
opensearch-trigger-bot[bot] May 31, 2023
bcbaac4
FIX: extract reason from error in AWSSdk2Transport (#493) (#509)
opensearch-trigger-bot[bot] Jun 1, 2023
a86c6dd
Bump org.eclipse.parsson:parsson from 1.1.1 to 1.1.2 (#492) (#507)
opensearch-trigger-bot[bot] Jun 2, 2023
dcc6269
Bump client to 2.6.0 (#512)
VachaShah Jun 2, 2023
b41f95f
Bump io.github.classgraph:classgraph from 4.8.158 to 4.8.160 in /java…
reta Jun 6, 2023
d376527
fix: add several missing fields in MultisearchBody.Builder (#506) (#5…
reta Jun 6, 2023
2050ad1
Fix suggestion classes for Term, Phrase, and Completion. (#477) (#529)
harshavamsi Jun 14, 2023
b53b1b1
Manual backport: Add support for knn_vector property type (#532)
maltehedderich Jun 20, 2023
a09f260
Bumps 'jackson' from 2.14.2 to 2.15.2 (#537) (#542)
reta Jun 27, 2023
ccb59f5
fix: add missing translog sync interval option to index settings (#51…
opensearch-trigger-bot[bot] Jun 28, 2023
8be26ff
Fixes #283 (#538) (#552)
opensearch-trigger-bot[bot] Jul 3, 2023
b540c98
Fixes #553: fix highlight max_analyzer_offset field name to match wit…
schmittjoaopedro Jul 5, 2023
b9f70b3
Update `httpcomponents` dependencies. (#554) (#560)
reta Jul 5, 2023
1eb8fc5
[Backport 2.x] Add support for approximate k-NN queries (#559)
opensearch-trigger-bot[bot] Jul 5, 2023
15018fd
Bumping client version to 2.7.0 post 2.6.0 release (#562)
VachaShah Jul 5, 2023
22627f4
Bump org.ajoberstar.grgit:grgit-gradle from 5.0.0 to 5.2.0 (#458) (#563)
opensearch-trigger-bot[bot] Jul 6, 2023
23de3e6
Update jenkins file to use updated docker image (#571) (#572)
opensearch-trigger-bot[bot] Jul 7, 2023
960483f
Update Gradle to 8.2.1 (#570) (#577)
reta Jul 10, 2023
dfee24e
[Backport 2.x] Upgrade dependency-license-report and classgraph (#599)
VachaShah Aug 9, 2023
c4addce
Bump org.eclipse.parsson:parsson from 1.1.1 to 1.1.4 (#600)
VachaShah Aug 9, 2023
9362d0d
Remove code generated comments (#598) (#601)
VachaShah Aug 9, 2023
b4e30f2
Removing unsupported field runtime for PutMappingRequest (#597) (#606)
VachaShah Aug 22, 2023
a1a0b63
[Backport 2.x] Added "smartcn" and "cjk" analyzers (#607)
VachaShah Aug 22, 2023
239b5d9
Update to Gradle 8.3 (#608) (#609)
opensearch-trigger-bot[bot] Aug 24, 2023
03de404
JarHell caused by latest software.amazon.awssdk 2.20.141 (#616) (#622)
reta Sep 14, 2023
ed66cf6
Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to co…
reta Sep 15, 2023
d5340a4
Fix for CVE-2976 + add CVE checker (#624) (#625)
reta Sep 15, 2023
e9946b7
[Backport 2.x] Backporting samples and user guide to 2.x (#626)
VachaShah Sep 15, 2023
4b47ab0
Add support for wrapper queries (#630) (#633)
opensearch-trigger-bot[bot] Sep 22, 2023
2fbe403
Moving "software.amazon.awssdk" dependencies to the compileOnly scope…
VachaShah Sep 22, 2023
d498c65
Add newer versions of server to compatibility matrix (#635) (#643)
opensearch-trigger-bot[bot] Oct 2, 2023
d7b3abf
Add script fields support for multi search request (#632) (#646)
VachaShah Oct 3, 2023
4d074c9
Fixed GetFieldMappingResponse. (#641) (#647)
VachaShah Oct 4, 2023
3d2f20b
Added size attribute to MultiTermsAggregation (#627) (#652)
VachaShah Oct 4, 2023
53489bc
TermvectorsResponse fix for optionals. (#642) (#658)
VachaShah Oct 9, 2023
119cabc
[Backport 2.x] Migrating from checkstyle to spotless (#648 and #651) …
VachaShah Oct 12, 2023
d0c10d6
Make `MultiSearchItem.status` optional (#660) (#662)
Xtansia Oct 12, 2023
b9ff4be
Updating CHANGELOG for the next release (#663)
VachaShah Oct 13, 2023
5201dce
Adding workflow to increment version after release (#664) (#671)
opensearch-trigger-bot[bot] Oct 16, 2023
a20fc94
Increment version to 2.8.0 (#673)
opensearch-trigger-bot[bot] Oct 16, 2023
d0ffb0f
Add basic Search API integration test (#678) (#683)
opensearch-trigger-bot[bot] Oct 23, 2023
97c2768
Add support neural query type (#674) (#686)
opensearch-trigger-bot[bot] Oct 24, 2023
ff3916c
Add indexing and search index settings (#667) (#689)
opensearch-trigger-bot[bot] Oct 25, 2023
42b592c
Accept null in arrays (#687) (#692)
opensearch-trigger-bot[bot] Oct 27, 2023
a4f313b
Adding an example for bulk update operation (#690) (#693)
opensearch-trigger-bot[bot] Oct 27, 2023
89a37b0
Update Gradle to 8.4 (#691) (#697)
reta Oct 31, 2023
3491c33
Fixing Hit responses when search request has storedFields as none (#6…
opensearch-trigger-bot[bot] Oct 31, 2023
84410e8
Increment version to 2.9.0 (#703)
opensearch-trigger-bot[bot] Nov 1, 2023
592f943
Updating CHANGELOG for next release (#701) (#704)
VachaShah Nov 1, 2023
f4af3e8
Add Java 11/17/21 matrix for build, test and integration (main only) …
opensearch-trigger-bot[bot] Nov 3, 2023
a6bf1f6
Fixing partial success results for msearch template (#709) (#714)
VachaShah Nov 7, 2023
dc6da37
Fix Maven local repository location (post Gradle 8.4 update) (#717) (…
opensearch-trigger-bot[bot] Nov 7, 2023
daddaff
Add support for icu_collation_keyword field type (#725) (#728)
opensearch-trigger-bot[bot] Nov 15, 2023
551cd4e
Add JDK compatibility matrix to COMPATIBILITY.md (#713) (#729)
reta Nov 18, 2023
8dc1e18
Add support for Flat Objects (#735) (#739)
opensearch-trigger-bot[bot] Nov 21, 2023
e201a87
Fix MissingRequiredPropertyException on node stats response (#745) (#…
opensearch-trigger-bot[bot] Dec 1, 2023
52b987e
add `ResponseException#status` (#756) (#759)
rursprung Dec 4, 2023
73be144
Replacing leftover references to OpenSearch (#763) (#764)
opensearch-trigger-bot[bot] Dec 11, 2023
cd38878
Fix PutIndexTemplateRequest deserialization (#765) (#768)
matthewbogner Dec 12, 2023
e7c3f66
Bump com.diffplug.spotless from 6.23.0 to 6.23.3 (#772) (#776)
reta Dec 18, 2023
584440c
Bump org.apache.httpcomponents.client5:httpclient5 from 5.2.3 to 5.3 …
reta Jan 2, 2024
081a17e
[Backport] [2.x] Restore support for Java 8 (#767) (#777)
reta Jan 2, 2024
58416a5
Fixing InnerHits storedFields ("stored_fields") generated Json name. …
reta Jan 2, 2024
29ea02c
[Backport] [2.x] add toBuilder method on some models (#766) (#797)
channel-dante Jan 3, 2024
339c16c
Revert "[Backport] [2.x] Restore support for Java 8 (#767) (#777)" (#…
reta Jan 3, 2024
e8d49fd
rename _toQuery() to toQuery() (#760) (#801)
channel-dante Jan 4, 2024
4ac515a
Bump org.owasp.dependencycheck from 9.0.7 to 9.0.8 (#803) (#805)
reta Jan 8, 2024
044c2dc
Bump com.diffplug.spotless from 6.23.3 to 6.24.0 (#808) (#810)
reta Jan 16, 2024
5a9fa6b
Removing unsupported prefix field from CompletionSuggester (#812) (#813)
opensearch-trigger-bot[bot] Jan 19, 2024
b3e6733
Adding OpenSearch 2.11.0 to the matrix (#814) (#815)
opensearch-trigger-bot[bot] Jan 19, 2024
2e85266
Add wrapper to builder (#806)
ls-urs-keller Jan 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 7 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ 11 ]
java: [ 11, 17, 21 ]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout Java Client
uses: actions/checkout@v3

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

- name: Checkout Branch
uses: actions/checkout@v2
distribution: 'temurin'
cache: 'gradle'

- name: Build with Gradle
run: ./gradlew clean build -x test
2 changes: 1 addition & 1 deletion .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:

- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: "autocut"
skipLabels: "autocut, skip-changelog"
20 changes: 0 additions & 20 deletions .github/workflows/checkstyle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/dependabot_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
installation_id: 22958780

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ steps.github_app_token.outputs.token }}

Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/increment-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Increment Version

on:
push:
tags:
- '*.*.*'

permissions: {}
jobs:
build:
if: github.repository == 'opensearch-project/opensearch-java'
runs-on: ubuntu-latest
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- uses: actions/checkout@v4
- name: Fetch Tag and Version Information
run: |
TAG=$(echo "${GITHUB_REF#refs/*/}")
CURRENT_VERSION_ARRAY=($(echo "${TAG//v}" | tr . '\n'))
CURRENT_VERSION_ARRAY[0]=$((CURRENT_VERSION_ARRAY[0]//v))
BASE_X=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:1}.x")
CURRENT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
CURRENT_VERSION_ARRAY[1]=$((CURRENT_VERSION_ARRAY[1]+1))
NEXT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
# if [[ ${#CURRENT_VERSION_ARRAY[2]} -gt 1 ]]; then
# NEXT_VERSION_ID="${CURRENT_VERSION_ARRAY[0]:0:3}0${CURRENT_VERSION_ARRAY[1]:0:3}${CURRENT_VERSION_ARRAY[2]:0:3}99"
# else
# NEXT_VERSION_ID=$(IFS=0 ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}99")
# fi
echo "TAG=$TAG" >> $GITHUB_ENV
# echo "BASE=$BASE" >> $GITHUB_ENV
echo "BASE_X=$BASE_X" >> $GITHUB_ENV
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_ENV
# echo "NEXT_VERSION_ID=$NEXT_VERSION_ID" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: ${{ env.BASE_X }}
token: ${{ steps.github_app_token.outputs.token }}

- name: Increment Minor Version
run: |
echo Incrementing $CURRENT_VERSION to $NEXT_VERSION
sed -i "s/systemProp.version = $CURRENT_VERSION/systemProp.version = $NEXT_VERSION/g" gradle.properties

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ steps.github_app_token.outputs.token }}
base: ${{ env.BASE_X }}
branch: 'create-pull-request/patch-${{ env.BASE }}'
commit-message: Increment version to ${{ env.NEXT_VERSION }}
signoff: true
delete-branch: true
labels: |
autocut
title: '[AUTO] Increment version to ${{ env.NEXT_VERSION }}.'
body: |
I've noticed that a new tag ${{ env.TAG }} was pushed, and incremented the version from ${{ env.CURRENT_VERSION }} to ${{ env.NEXT_VERSION }}.
2 changes: 1 addition & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: lychee Link Checker
id: lychee
uses: lycheeverse/[email protected]
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/publish-snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish snapshots to maven

on:
push:
branches:
- main
- '2.x'

jobs:
build-and-publish-snapshots:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'gradle'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
aws-region: us-east-1
- name: publish snapshots to maven
run: |
export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
echo "::add-mask::$SONATYPE_USERNAME"
echo "::add-mask::$SONATYPE_PASSWORD"
./gradlew --no-daemon publishPublishMavenPublicationToSnapshotsRepository
44 changes: 44 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release drafter

on:
push:
tags:
- "*"

jobs:
draft-a-release:
name: Draft a release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- id: get_data
run: |
echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '* ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT
echo "version=$(cat gradle.properties | grep "systemProp.version" | cut -d'=' -f2)" >> $GITHUB_OUTPUT
- uses: trstringer/manual-approval@v1
with:
secret: ${{ github.TOKEN }}
approvers: ${{ steps.get_data.outputs.approvers }}
minimum-approvals: 2
issue-title: 'Release opensearch-java : ${{ steps.get_data.outputs.version }}'
issue-body: "Please approve or deny the release of opensearch-java. **VERSION**: ${{ steps.get_data.outputs.version }} **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}"
exclude-workflow-initiator-as-approver: true
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'gradle'
- name: Build with Gradle
run: |
export VERSION=`cat gradle.properties | grep "systemProp.version" | tr -d " " | cut -d '=' -f2`
echo Building the version: $VERSION
./gradlew --no-daemon publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository
- name: Draft a release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
files: |
artifacts.tar.gz
53 changes: 41 additions & 12 deletions .github/workflows/test-integration-unreleased.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,69 @@ jobs:
- { opensearch_ref: '1.x', java: 11 }
- { opensearch_ref: '2.x', java: 11 }
- { opensearch_ref: '2.x', java: 17 }
- { opensearch_ref: '2.0', java: 11 }
- { opensearch_ref: '2.x', java: 21 }
- { opensearch_ref: 'main', java: 11 }
- { opensearch_ref: 'main', java: 17 }
- { opensearch_ref: 'main', java: 21 }
steps:
- name: Set up JDK ${{ matrix.entry.java }}
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.entry.java }}
distribution: 'temurin'

- name: Checkout OpenSearch
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: opensearch-project/OpenSearch
ref: ${{ matrix.entry.opensearch_ref }}
path: opensearch

- name: Get OpenSearch branch top
id: get-key
working-directory: opensearch
run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT

- name: Restore cached build
id: cache-restore
uses: actions/cache/restore@v3
with:
path: opensearch/distribution/archives/linux-tar/build/distributions
key: ${{ steps.get-key.outputs.key }}

- name: Assemble OpenSearch
run: |
cd opensearch
./gradlew assemble
if: steps.cache-restore.outputs.cache-hit != 'true'
working-directory: opensearch
run: ./gradlew :distribution:archives:linux-tar:assemble

# This step runs the docker image generated during gradle assemble in OpenSearch. It is tagged as opensearch:test.
# Reference: https://github.com/opensearch-project/OpenSearch/blob/2.0/distribution/docker/build.gradle#L190
- name: Run Docker Image
- name: Save cached build
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: opensearch/distribution/archives/linux-tar/build/distributions
key: ${{ steps.get-key.outputs.key }}

- name: Run OpenSearch
working-directory: opensearch/distribution/archives/linux-tar/build/distributions
run: |
docker run -p 9200:9200 -p 9600:9600 -d -e "discovery.type=single-node" -e "bootstrap.memory_lock=true" opensearch:test
sleep 90
tar xf opensearch-min-*
./opensearch-*/bin/opensearch &
for attempt in {1..20}; do sleep 5; if curl -s localhost:9200; then echo '=====> ready'; break; fi; echo '=====> waiting...'; done

- name: Checkout Java Client
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: opensearch-java

- name: Run Integration Test
run: |
cd opensearch-java
./gradlew clean integrationTest -Dhttps=false

- name: Upload Reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-reports
path: opensearch-java/java-client/build/reports/
retention-days: 7
28 changes: 23 additions & 5 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,29 @@ jobs:
- { opensearch_version: 1.0.1, java: 11 }
- { opensearch_version: 1.1.0, java: 11 }
- { opensearch_version: 1.2.4, java: 11 }
- { opensearch_version: 1.3.5, java: 11 }
- { opensearch_version: 1.3.13, java: 11 }
- { opensearch_version: 2.0.1, java: 11 }
- { opensearch_version: 2.1.0, java: 11 }
- { opensearch_version: 2.2.1, java: 11 }
- { opensearch_version: 2.3.0, java: 11 }
- { opensearch_version: 2.4.1, java: 11 }
- { opensearch_version: 2.5.0, java: 11 }
- { opensearch_version: 2.6.0, java: 11 }
- { opensearch_version: 2.7.0, java: 11 }
- { opensearch_version: 2.8.0, java: 11 }
- { opensearch_version: 2.9.0, java: 11 }
- { opensearch_version: 2.10.0, java: 11 }
- { opensearch_version: 2.11.1, java: 11 }
steps:
- name: Checkout Java Client
uses: actions/checkout@v3

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

- name: Checkout Branch
uses: actions/checkout@v2
distribution: 'temurin'
cache: 'gradle'

- name: Run Docker
run: |
Expand All @@ -34,6 +44,14 @@ jobs:
- name: Run Integration Test
run: ./gradlew clean integrationTest

- name: Upload Reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-reports
path: java-client/build/reports/
retention-days: 7

- name: Stop Docker
run: |
docker-compose --project-directory .ci/opensearch down
12 changes: 7 additions & 5 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ 11 ]
java: [ 11, 17, 21 ]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout Java Client
uses: actions/checkout@v3

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

- name: Checkout Branch
uses: actions/checkout@v2
distribution: 'temurin'
cache: 'gradle'

- name: Run Unit Test
run: ./gradlew clean unitTest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ gradle-app.setting

.ci/output
java-client/bin
samples/bin
Loading
Loading