Skip to content

Commit b20e78b

Browse files
authored
Merge branch 'main' into multinode-test
Signed-off-by: Andrew Klepchick <aklepchi@amazon.com>
2 parents f8a865a + 8a09fbc commit b20e78b

File tree

139 files changed

+7855
-1373
lines changed

Some content is hidden

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

139 files changed

+7855
-1373
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'KNN Check Files Changed'
2+
description: 'Check if specific files have changed for KNN repo'
3+
inputs:
4+
files:
5+
description: 'Files to check for changes'
6+
outputs:
7+
files_changed:
8+
description: 'Whether any files changed'
9+
value: ${{ steps.changed-files.outputs.any_changed }}
10+
runs:
11+
using: 'composite'
12+
steps:
13+
- name: Combine files
14+
id: combine-files
15+
shell: bash
16+
run: |
17+
DEFAULT_FILES="build.gradle,settings.gradle,src/**,build-tools/**,buildSrc/**,gradle/**,jni/**"
18+
COMBINED_FILES="$DEFAULT_FILES,${{ inputs.files }}"
19+
echo "combined_files=$COMBINED_FILES" >> $GITHUB_OUTPUT
20+
- name: Get changed files
21+
id: changed-files
22+
uses: tj-actions/changed-files@v47.0.0
23+
with:
24+
files: ${{ steps.combine-files.outputs.combined_files }}
25+
files_separator: ","
26+
- name: Debug output
27+
shell: bash
28+
run: |
29+
echo "Files changed: ${{ steps.changed-files.outputs.any_changed }}"
30+
echo "Combined files: ${{ steps.combine-files.outputs.combined_files }}"

.github/workflows/CI.yml

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,37 @@ on:
66
branches:
77
- "*"
88
- "feature/**"
9-
paths:
10-
- 'build.gradle'
11-
- 'settings.gradle'
12-
- 'src/**'
13-
- 'build-tools/**'
14-
- 'buildSrc/**'
15-
- 'gradle/**'
16-
- 'jni/**'
17-
- '.github/workflows/CI.yml'
9+
1810
pull_request:
1911
branches:
2012
- "*"
2113
- "feature/**"
22-
paths:
23-
- 'build.gradle'
24-
- 'settings.gradle'
25-
- 'src/**'
26-
- 'build-tools/**'
27-
- 'buildSrc/**'
28-
- 'gradle/**'
29-
- 'jni/**'
30-
- '.github/workflows/CI.yml'
3114

3215
jobs:
16+
check-files:
17+
name: Check file for Build and Test k-NN
18+
runs-on: ubuntu-latest
19+
outputs:
20+
RUN_BUILD_AND_TEST: ${{ steps.check.outputs.files_changed }}
21+
steps:
22+
- uses: actions/checkout@v6
23+
- name: Check files
24+
id: check
25+
uses: ./.github/actions/check-files
26+
with:
27+
files: .github/workflows/CI.yml
28+
3329
Get-CI-Image-Tag:
30+
needs: check-files
31+
if: needs.check-files.outputs.RUN_BUILD_AND_TEST == 'true'
3432
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
3533
with:
3634
product: opensearch
3735

3836
Build-k-NN-Linux:
3937
strategy:
4038
matrix:
41-
java: [21, 24]
39+
java: [21, 25]
4240

4341
env:
4442
CC: gcc10-gcc
@@ -99,14 +97,15 @@ jobs:
9997
10098
10199
- name: Upload Coverage Report
102-
uses: codecov/codecov-action@v4
100+
uses: codecov/codecov-action@v5
103101
with:
104102
token: ${{ secrets.CODECOV_TOKEN }}
103+
use_pypi: true
105104

106105
Build-k-NN-MacOS:
107106
strategy:
108107
matrix:
109-
java: [21, 24]
108+
java: [21, 25]
110109

111110
name: Build and Test k-NN Plugin on MacOS
112111
needs: Get-CI-Image-Tag
@@ -149,7 +148,7 @@ jobs:
149148
Build-k-NN-Windows:
150149
strategy:
151150
matrix:
152-
java: [21, 24]
151+
java: [21, 25]
153152

154153
name: Build and Test k-NN Plugin on Windows
155154
needs: Get-CI-Image-Tag
@@ -216,4 +215,16 @@ jobs:
216215
# TODO: Detect processor count and set the value of nproc.count
217216
- name: Run build
218217
run: |
219-
./gradlew.bat build -D'avx2.enabled=false' -D'avx512.enabled=false' -D'nproc.count=4'
218+
./gradlew.bat build -D'avx2.enabled=false' -D'avx512.enabled=false' -D'nproc.count=4'
219+
220+
check-results:
221+
needs: [check-files, Build-k-NN-Windows, Build-k-NN-MacOS, Build-k-NN-Linux]
222+
if: always()
223+
name: Check results Build and Test k-NN
224+
runs-on: ubuntu-latest
225+
steps:
226+
- name: Check results
227+
if: ${{ needs.check-files.outputs.RUN_BUILD_AND_TEST && needs.Build-k-NN-Linux.result == 'failure' }}
228+
run: |
229+
echo "Integration tests failed, failing the check-results step"
230+
exit 1

.github/workflows/backwards_compatibility_tests_workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
java: [ 21 ]
3737
os: [ubuntu-latest]
3838
bwc_version : [ "2.0.1", "2.1.0", "2.2.1", "2.3.0", "2.4.1", "2.5.0", "2.6.0", "2.7.0", "2.8.0", "2.9.0", "2.10.0", "2.11.0", "2.12.0", "2.13.0", "2.14.0", "2.15.0", "2.16.0", "2.17.0", "2.18.0","2.19.1", "2.20.0-SNAPSHOT"]
39-
opensearch_version : [ "3.4.0-SNAPSHOT" ]
39+
opensearch_version : [ "3.5.0-SNAPSHOT" ]
4040
exclude:
4141
- os: windows-latest
4242
bwc_version: "2.0.1"
@@ -131,7 +131,7 @@ jobs:
131131
java: [ 21 ]
132132
os: [ubuntu-latest]
133133
bwc_version: [ "2.20.0-SNAPSHOT" ]
134-
opensearch_version: [ "3.4.0-SNAPSHOT" ]
134+
opensearch_version: [ "3.5.0-SNAPSHOT" ]
135135

136136
name: k-NN Rolling-Upgrade BWC Tests
137137
runs-on: ${{ matrix.os }}

.github/workflows/remote_index_build.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,28 @@ on:
66
branches:
77
- "*"
88
- "feature/**"
9-
paths:
10-
- 'build.gradle'
11-
- 'settings.gradle'
12-
- 'src/**'
13-
- 'build-tools/**'
14-
- 'buildSrc/**'
15-
- 'gradle/**'
16-
- 'jni/**'
17-
- '.github/workflows/remote_index_build.yml'
189
pull_request:
1910
branches:
2011
- "*"
2112
- "feature/**"
22-
paths:
23-
- 'build.gradle'
24-
- 'settings.gradle'
25-
- 'src/**'
26-
- 'build-tools/**'
27-
- 'buildSrc/**'
28-
- 'gradle/**'
29-
- 'jni/**'
30-
- '.github/workflows/remote_index_build.yml'
3113

3214
jobs:
15+
check-files:
16+
name: Check file for Build and Test k-NN using Remote Index Builder
17+
runs-on: ubuntu-latest
18+
outputs:
19+
RUN_IT_TEST: ${{ steps.check.outputs.files_changed }}
20+
steps:
21+
- uses: actions/checkout@v6
22+
- name: Check files
23+
id: check
24+
uses: ./.github/actions/check-files
25+
with:
26+
files: .github/workflows/remote_index_build.yml
27+
3328
Remote-Index-Build-IT-Tests:
29+
needs: check-files
30+
if: needs.check-files.outputs.RUN_IT_TEST == 'true'
3431
strategy:
3532
matrix:
3633
java: [21]
@@ -151,3 +148,14 @@ jobs:
151148
docker logout
152149
rm -rf ${{ github.workspace }}/*
153150
151+
check-results:
152+
needs: [check-files, Remote-Index-Build-IT-Tests]
153+
if: always()
154+
name: Check results for Build and Test k-NN using Remote Index Builder
155+
runs-on: ubuntu-latest
156+
steps:
157+
- name: Check results
158+
if: ${{ needs.check-files.outputs.RUN_IT_TEST && needs.Remote-Index-Build-IT-Tests.result == 'failure' }}
159+
run: |
160+
echo "Remote Integration tests failed, failing the check-results step"
161+
exit 1

.github/workflows/test_security.yml

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,36 @@ on:
66
branches:
77
- "*"
88
- "feature/**"
9-
paths:
10-
- 'build.gradle'
11-
- 'settings.gradle'
12-
- 'src/**'
13-
- 'build-tools/**'
14-
- 'buildSrc/**'
15-
- 'gradle/**'
16-
- 'jni/**'
17-
- '.github/workflows/test_security.yml'
189
pull_request:
1910
branches:
2011
- "*"
2112
- "feature/**"
22-
paths:
23-
- 'build.gradle'
24-
- 'settings.gradle'
25-
- 'src/**'
26-
- 'build-tools/**'
27-
- 'buildSrc/**'
28-
- 'gradle/**'
29-
- 'jni/**'
30-
- '.github/workflows/test_security.yml'
3113

3214
jobs:
15+
check-files:
16+
name: Check file for Test k-NN on Secure Cluster
17+
runs-on: ubuntu-latest
18+
outputs:
19+
RUN_SECURE_IT_TEST: ${{ steps.check.outputs.files_changed }}
20+
steps:
21+
- uses: actions/checkout@v6
22+
- name: Check files
23+
id: check
24+
uses: ./.github/actions/check-files
25+
with:
26+
files: .github/workflows/test_security.yml
27+
3328
Get-CI-Image-Tag:
29+
needs: check-files
30+
if: needs.check-files.outputs.RUN_SECURE_IT_TEST == 'true'
3431
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
3532
with:
3633
product: opensearch
3734

3835
integ-test-with-security-linux:
3936
strategy:
4037
matrix:
41-
java: [21, 24]
38+
java: [21, 25]
4239
env:
4340
CC: gcc10-gcc
4441
CXX: gcc10-g++
@@ -92,4 +89,16 @@ jobs:
9289
else
9390
echo "avx512 and avx2 not available on system"
9491
su `id -un 1000` -c "whoami && java -version && ./gradlew build -Davx2.enabled=false -Davx512.enabled=false -Davx512_spr.enabled=false -Dnproc.count=`nproc`"
95-
fi
92+
fi
93+
94+
check-results:
95+
needs: [check-files, integ-test-with-security-linux]
96+
if: always()
97+
name: Check results Test k-NN on Secure Cluster
98+
runs-on: ubuntu-latest
99+
steps:
100+
- name: Check results
101+
if: ${{ needs.check-files.outputs.RUN_SECURE_IT_TEST && needs.integ-test-with-security-linux.result == 'failure' }}
102+
run: |
103+
echo "Integration tests failed, failing the check-results step"
104+
exit 1

CHANGELOG.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,35 @@ All notable changes to this project are documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). See the [CONTRIBUTING guide](./CONTRIBUTING.md#Changelog) for instructions on how to add changelog entries.
66

7-
## [Unreleased 3.4](https://github.com/opensearch-project/k-NN/compare/main...HEAD)
7+
## [Unreleased 3.5](https://github.com/opensearch-project/k-NN/compare/main...HEAD)
88
### Features
9-
* Memory optimized search warmup ([#2954](https://github.com/opensearch-project/k-NN/pull/2954))
9+
1010
### Maintenance
11-
* Onboard to s3 snapshots ([#2943](https://github.com/opensearch-project/k-NN/pull/2943))
1211
* Adds testing for cosine similarity for multi shard and multi node setups [#2977](https://github.com/opensearch-project/k-NN/pull/2977)
12+
* Added gradle task to generate task dependency graph ([#3032](https://github.com/opensearch-project/k-NN/pull/3032))
13+
* Added new gradle task validateLibraryUsage so that System.loadLibrary cannot be run outside KNNLibraryLoader ([#3033](https://github.com/opensearch-project/k-NN/pull/3033))
14+
* Add IT and bwc test with indices containing both vector and non-vector docs ([#3064](https://github.com/opensearch-project/k-NN/pull/3064))
15+
1316

1417
### Bug Fixes
15-
* Fix blocking old indices created before 2.18 to use memory optimized search. [#2918](https://github.com/opensearch-project/k-NN/pull/2918)
16-
* Fix NativeEngineKnnQuery to return all part results for valid totalHits in response [#2965](https://github.com/opensearch-project/k-NN/pull/2965)
17-
* Fix unsafe concurrent update query vector in KNNQueryBuilder [#2974](https://github.com/opensearch-project/k-NN/pull/2974)
18+
* Fix indexing for 16x and 8x compression [#3019](https://github.com/opensearch-project/k-NN/pull/3019)
19+
* Block index creation for Faiss engine with cosine similarity and byte vectors due to normalization incompatibility [#3002](https://github.com/opensearch-project/k-NN/pull/3002)
20+
* Update validation for cases when k is greater than total results [#3038](https://github.com/opensearch-project/k-NN/pull/3038)
21+
* Add regex support to derived source transformer include / exclude check [#3031](https://github.com/opensearch-project/k-NN/pull/3031)
22+
* Correct ef_search parameter for Lucene engine and override mergeLeafResults to return top K results [#3037](https://github.com/opensearch-project/k-NN/pull/3037)
23+
* Fix efficient filtering in nested k-NN queries [#2990](https://github.com/opensearch-project/k-NN/pull/2990)
24+
* Fix nested docs and exact search query when some docs has no vector field present. [#3051](https://github.com/opensearch-project/k-NN/pull/3051)
25+
* Changed warmup seek to use long instead of int to avoid overflow [#3067](https://github.com/opensearch-project/k-NN/pull/3067)
26+
* Fix memory-optimized-search reentrant search bug in byte index. [#3071](https://github.com/opensearch-project/k-NN/pull/3071)
27+
* Fix MemoryOptimizedKNNWeight to use expanded 'k' for disk based index. [#3061](https://github.com/opensearch-project/k-NN/pull/3061)
28+
* Added new exception type to signify expected warmup behavior [#3070](https://github.com/opensearch-project/k-NN/pull/3070)
29+
* Add derived source handling for when field is excluded in source on indexing [#3049](https://github.com/opensearch-project/k-NN/pull/3049)
30+
* Fix patch to have a valid score conversion for BinaryCagra. [#2983](https://github.com/opensearch-project/k-NN/pull/2983)
1831

1932
### Refactoring
20-
* Refactor to not use parallel for MMR rerank. [#2968](https://github.com/opensearch-project/k-NN/pull/2968)
33+
* Change ordering of build task and added tests to catch uninitialized libraries [#3024](https://github.com/opensearch-project/k-NN/pull/3024)
2134

2235
### Enhancements
23-
* Removed VectorSearchHolders map from NativeEngines990KnnVectorsReader [#2948](https://github.com/opensearch-project/k-NN/pull/2948)
24-
* Native scoring for FP16 [#2922](https://github.com/opensearch-project/k-NN/pull/2922)
36+
* Index setting to disable exact search after ANN Search with Faiss efficient filters [#3022](https://github.com/opensearch-project/k-NN/pull/3022)
37+
* Bulk SIMD for FP16 distance computation [#3071](https://github.com/opensearch-project/k-NN/pull/3071)
38+
* Include AdditionalCodecs argument to allow additional Codec registration [#3085](https://github.com/opensearch-project/k-NN/pull/3085)

DEVELOPER_GUIDE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ One easy way to install on mac or linux is to use pip:
6363
pip install cmake==3.24.0
6464
```
6565

66+
On Mac it might be needed to use pip3 and add the cmake install location to path
67+
example for python3.9
68+
```bash
69+
pip3 install cmake==3.24.0
70+
export PATH="$HOME/Library/Python/3.9/bin:$PATH"
71+
```
72+
73+
6674
#### Faiss Dependencies
6775

6876
To build the *faiss* JNI library, you need to have openmp, lapack, gflags and blas installed. For more information on *faiss*

0 commit comments

Comments
 (0)