Skip to content

Commit

Permalink
Multiple minor changes: drop precommit for win CI, refator BWC, added…
Browse files Browse the repository at this point in the history
… changelog

Signed-off-by: Martin Gaievski <[email protected]>
  • Loading branch information
martin-gaievski committed Feb 15, 2025
1 parent 333cd31 commit 1ffa7d6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 31 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,6 @@ jobs:
name: coverage-report-${{ matrix.os }}-${{ matrix.java }}
path: ./jacocoTestReport.xml

Precommit-neural-search-windows:
strategy:
matrix:
java: [21, 23]
os: [windows-latest]

name: Pre-commit Windows
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}

- name: Run build
run: |
./gradlew precommit --parallel
Precommit-codecov:
needs: Precommit-neural-search-linux
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_aggregations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
Check-neural-search-windows:
strategy:
matrix:
java: [21, 23]
java: [23]
os: [windows-latest]

name: Integ Tests Windows
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased 3.0](https://github.com/opensearch-project/neural-search/compare/2.x...HEAD)
### Features
### Enhancements
- Set neural-search plugin 3.0.0 baseline JDK version to JDK-2 ([#838](https://github.com/opensearch-project/neural-search/pull/838))
- Set neural-search plugin 3.0.0 baseline JDK version to JDK-23 ([#838](https://github.com/opensearch-project/neural-search/pull/838))
### Bug Fixes
### Infrastructure
- [3.0] Update neural-search for OpenSearch 3.0 compatibility ([#1141](https://github.com/opensearch-project/neural-search/pull/1141))
### Documentation
### Maintenance
### Refactoring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static org.opensearch.neuralsearch.util.BatchIngestionUtils.prepareDataForBulkIngestion;
import static org.opensearch.neuralsearch.util.TestUtils.NODES_BWC_CLUSTER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
import com.google.common.collect.ImmutableList;

import static org.opensearch.neuralsearch.util.TestUtils.INGEST_PIPELINE_TYPE;
import static org.opensearch.neuralsearch.util.TestUtils.MAX_TASK_RESULT_QUERY_TIME_IN_SECOND;
import static org.opensearch.neuralsearch.util.TestUtils.MAX_TASK_RETRIES;
import static org.opensearch.neuralsearch.util.TestUtils.DEFAULT_TASK_RESULT_QUERY_INTERVAL_IN_MILLISECOND;
import static org.opensearch.neuralsearch.util.TestUtils.DEFAULT_USER_AGENT;
import static org.opensearch.neuralsearch.util.TestUtils.DEFAULT_NORMALIZATION_METHOD;
Expand Down Expand Up @@ -214,7 +214,7 @@ protected String uploadModel(final String requestBody) throws Exception {

Map<String, Object> taskQueryResult = getTaskQueryResponse(taskId);
boolean isComplete = checkComplete(taskQueryResult);
for (int i = 0; !isComplete && i < MAX_TASK_RESULT_QUERY_TIME_IN_SECOND; i++) {
for (int i = 0; !isComplete && i < MAX_TASK_RETRIES; i++) {
taskQueryResult = getTaskQueryResponse(taskId);
isComplete = checkComplete(taskQueryResult);
Thread.sleep(DEFAULT_TASK_RESULT_QUERY_INTERVAL_IN_MILLISECOND);
Expand Down Expand Up @@ -243,12 +243,12 @@ protected void loadModel(final String modelId) throws Exception {

Map<String, Object> taskQueryResult = getTaskQueryResponse(taskId);
boolean isComplete = checkComplete(taskQueryResult);
for (int i = 0; !isComplete && i < MAX_TASK_RESULT_QUERY_TIME_IN_SECOND; i++) {
for (int i = 0; !isComplete && i < MAX_TASK_RETRIES; i++) {
taskQueryResult = getTaskQueryResponse(taskId);
isComplete = checkComplete(taskQueryResult);
Thread.sleep(DEFAULT_TASK_RESULT_QUERY_INTERVAL_IN_MILLISECOND);
}
assertTrue(isComplete);
assertTrue(String.format(Locale.ROOT, "failed to load the model, last task finished with status %s", taskQueryResult.get("state")), isComplete);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ public class TestUtils {
public static final String SEARCH_PIPELINE_TYPE = "_search";
public static final String TEXT_EMBEDDING_PROCESSOR = "text_embedding";
public static final String TEXT_IMAGE_EMBEDDING_PROCESSOR = "text_image_embedding";
public static final int MAX_TASK_RESULT_QUERY_TIME_IN_SECOND = 60 * 5;
public static final int MAX_TASK_RETRIES = 30;
public static final int DEFAULT_TASK_RESULT_QUERY_INTERVAL_IN_MILLISECOND = 1000;
public static final String DEFAULT_USER_AGENT = "Kibana";
public static final String DEFAULT_NORMALIZATION_METHOD = "min_max";
public static final String DEFAULT_COMBINATION_METHOD = "arithmetic_mean";
public static final String PARAM_NAME_WEIGHTS = "weights";
public static final String SPARSE_ENCODING_PROCESSOR = "sparse_encoding";
public static final String TEXT_CHUNKING_PROCESSOR = "text_chunking";
public static final int MAX_TIME_OUT_INTERVAL = 3000;
public static final int MAX_RETRY = 5;

Expand Down

0 comments on commit 1ffa7d6

Please sign in to comment.