Skip to content

Commit

Permalink
Merge branch 'main' into numeric_exact_match
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi authored Dec 1, 2023
2 parents 0215078 + 69cc2a1 commit 03e8282
Show file tree
Hide file tree
Showing 826 changed files with 9,920 additions and 2,254 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* text eol=lf
*.jar binary
*.bat binary
*.zip binary
*.exe binary
Expand Down
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,14 @@ updates:
labels:
- "dependabot"
- "dependencies"
- directory: /modules/crypto/
open-pull-requests-limit: 1
package-ecosystem: gradle
schedule:
interval: weekly
labels:
- "dependabot"
- "dependencies"
- directory: /plugins/
open-pull-requests-limit: 1
package-ecosystem: gradle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/add-untriaged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
if: github.repository == 'opensearch-project/OpenSearch'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
Expand Down
57 changes: 39 additions & 18 deletions .github/workflows/lucene-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
# Inputs the workflow accepts.
inputs:
ref:
description:
description: 'Lucene ref in github.com/apache/lucene'
type: string
required: false
default: 'main'

Expand All @@ -21,40 +22,60 @@ jobs:
contents: read

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'

- name: Checkout Lucene
- name: Checkout Lucene ref:${{ github.event.inputs.ref }}
uses: actions/checkout@v4
with:
repository: 'apache/lucene'
path: lucene
ref: ${{ github.event.inputs.ref }}

- name: Set hash
working-directory: ./lucene
- name: Get Java Min Version and Lucene Revision from Lucene Repository
run: |
echo "REVISION=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: version
java_version=`cat build.gradle | grep minJavaVersion | head -1 | grep -Eo '_[0-9]+$' | tr -d '_'`
echo "JAVA_VERSION=$java_version" >> $GITHUB_ENV
echo "REVISION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Setup JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'

- name: Initialize gradle settings
working-directory: ./lucene
run: ./gradlew localSettings

- name: Publish Lucene to local maven repo.
working-directory: ./lucene
run: ./gradlew publishJarsPublicationToMavenLocal -Pversion.suffix=snapshot-${{ steps.version.outputs.REVISION }}
run: ./gradlew publishJarsPublicationToMavenLocal -Pversion.suffix=snapshot-${{ env.REVISION }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.LUCENE_SNAPSHOTS_SECRET_ROLE }}
aws-region: us-east-1

- name: Get S3 Bucket
id: get_s3_bucket
run: |
lucene_snapshots_bucket=`aws secretsmanager get-secret-value --secret-id jenkins-artifact-bucket-name --query SecretString --output text`
echo "::add-mask::$lucene_snapshots_bucket"
echo "LUCENE_SNAPSHOTS_BUCKET=$lucene_snapshots_bucket" >> $GITHUB_OUTPUT
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.LUCENE_SNAPSHOTS_S3_ROLE }}
aws-region: us-east-1

- name: Copy files to S3 with the aws CLI (New)
run: |
aws s3 cp ~/.m2/repository/org/apache/lucene/ s3://${{ steps.get_s3_bucket.outputs.LUCENE_SNAPSHOTS_BUCKET }}/snapshots/lucene/org/apache/lucene/ --recursive --no-progress
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.LUCENE_SNAPSHOTS_ROLE }}
aws-region: us-west-2

- name: Copy files to S3 with the aws CLI.
# We will remove this step once all the lucene snapshots old links are updated with the new one
- name: Copy files to S3 with the aws CLI (Old)
run: |
aws s3 cp ~/.m2/repository/org/apache/lucene/ s3://${{ secrets.LUCENE_SNAPSHOTS_BUCKET }}/snapshots/lucene/org/apache/lucene/ --recursive --no-progress
69 changes: 50 additions & 19 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ application {
}

base {
archivesBaseName = 'opensearch-benchmarks'
archivesName = 'opensearch-benchmarks'
}

test.enabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* compatible open source license.
*/

package org.opensearch.common;
package org.opensearch.common.round;

import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
Expand All @@ -27,13 +27,13 @@
@Warmup(iterations = 3, time = 1)
@Measurement(iterations = 1, time = 1)
@BenchmarkMode(Mode.Throughput)
public class ArrayRoundingBenchmark {
public class RoundableBenchmark {

@Benchmark
public void round(Blackhole bh, Options opts) {
Rounding.Prepared rounding = opts.supplier.get();
public void floor(Blackhole bh, Options opts) {
Roundable roundable = opts.supplier.get();
for (long key : opts.queries) {
bh.consume(rounding.round(key));
bh.consume(roundable.floor(key));
}
}

Expand Down Expand Up @@ -90,7 +90,7 @@ public static class Options {
public String distribution;

public long[] queries;
public Supplier<Rounding.Prepared> supplier;
public Supplier<Roundable> supplier;

@Setup
public void setup() {
Expand Down Expand Up @@ -130,10 +130,10 @@ public void setup() {

switch (type) {
case "binary":
supplier = () -> new Rounding.BinarySearchArrayRounding(values, size, null);
supplier = () -> new BinarySearcher(values, size);
break;
case "linear":
supplier = () -> new Rounding.BidirectionalLinearSearchArrayRounding(values, size, null);
supplier = () -> new BidirectionalLinearSearcher(values, size);
break;
default:
throw new IllegalArgumentException("invalid type: " + type);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ allprojects {
} else {
// Link to non-shadowed dependant projects
project.javadoc.dependsOn "${upstreamProject.path}:javadoc"
String externalLinkName = upstreamProject.base.archivesBaseName
String externalLinkName = upstreamProject.base.archivesName
String artifactPath = dep.group.replaceAll('\\.', '/') + '/' + externalLinkName.replaceAll('\\.', '/') + '/' + dep.version
String projectRelativePath = project.relativePath(upstreamProject.buildDir)
project.javadoc.options.linksOffline artifactsHost + "/javadoc/" + artifactPath, "${projectRelativePath}/docs/javadoc/"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ dependencies {
api 'org.jdom:jdom2:2.0.6.1'
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${props.getProperty('kotlin')}"
api 'de.thetaphi:forbiddenapis:3.6'
api 'com.avast.gradle:gradle-docker-compose-plugin:0.16.12'
api 'com.avast.gradle:gradle-docker-compose-plugin:0.17.5'
api "org.yaml:snakeyaml:${props.getProperty('snakeyaml')}"
api 'org.apache.maven:maven-model:3.9.4'
api 'com.networknt:json-schema-validator:1.0.86'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class PluginBuildPlugin implements Plugin<Project> {
String name = extension1.name

BasePluginExtension base = project.getExtensions().findByType(BasePluginExtension.class)
base.archivesBaseName = name
base.archivesName = name
project.description = extension1.description

if (extension1.name == null) {
Expand Down Expand Up @@ -155,15 +155,15 @@ class PluginBuildPlugin implements Plugin<Project> {
// Only configure publishing if applied externally
if (extension.hasClientJar) {
project.pluginManager.apply('com.netflix.nebula.maven-base-publish')
// Only change Jar tasks, we don't want a -client zip so we can't change archivesBaseName
// Only change Jar tasks, we don't want a -client zip so we can't change archivesName
project.tasks.withType(Jar) {
archiveBaseName = archiveBaseName.get() + "-client"
}
// always configure publishing for client jars
project.publishing.publications.nebula(MavenPublication).artifactId(extension.name + "-client")
final BasePluginExtension base = project.getExtensions().findByType(BasePluginExtension.class)
project.tasks.withType(GenerateMavenPom.class).configureEach { GenerateMavenPom generatePOMTask ->
generatePOMTask.destination = "${project.buildDir}/distributions/${base.archivesBaseName}-client-${project.versions.opensearch}.pom"
generatePOMTask.destination = "${project.buildDir}/distributions/${base.archivesName}-client-${project.versions.opensearch}.pom"
}
} else {
if (project.plugins.hasPlugin(MavenPublishPlugin)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void apply(Project project) {
}

private static String getArchivesBaseName(Project project) {
return project.getExtensions().getByType(BasePluginExtension.class).getArchivesBaseName();
return project.getExtensions().getByType(BasePluginExtension.class).getArchivesName().get();
}

/**Configuration generation of maven poms. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public void execute(Task task) {
.findFirst();

composeExtension.getExecutable().set(dockerCompose.isPresent() ? dockerCompose.get() : "/usr/bin/docker");
composeExtension.getUseDockerComposeV2().set(false);

tasks.named("composeUp").configure(t -> {
// Avoid running docker-compose tasks in parallel in CI due to some issues on certain Linux distributions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repositories {
}

dependencies {
implementation "org.apache.logging.log4j:log4j-core:2.21.1"
implementation "org.apache.logging.log4j:log4j-core:2.22.0"
}

["0.0.1", "0.0.2"].forEach { v ->
Expand Down
12 changes: 6 additions & 6 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ bundled_jdk = 21.0.1+12
# optional dependencies
spatial4j = 0.7
jts = 1.15.0
jackson = 2.15.2
jackson_databind = 2.15.2
jackson = 2.16.0
jackson_databind = 2.16.0
snakeyaml = 2.1
icu4j = 70.1
supercsv = 2.4.0
Expand All @@ -26,11 +26,11 @@ jakarta_annotation = 1.3.5
# when updating the JNA version, also update the version in buildSrc/build.gradle
jna = 5.13.0

netty = 4.1.100.Final
netty = 4.1.101.Final
joda = 2.12.2

# project reactor
reactor_netty = 1.1.12
reactor_netty = 1.1.13
reactor = 3.5.11

# client dependencies
Expand Down Expand Up @@ -70,5 +70,5 @@ jzlib = 1.1.3
resteasy = 6.2.4.Final

# opentelemetry dependencies
opentelemetry = 1.31.0
opentelemetrysemconv = 1.21.0-alpha
opentelemetry = 1.32.0
opentelemetrysemconv = 1.23.1-alpha
2 changes: 1 addition & 1 deletion client/benchmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ apply plugin: 'application'

base {
group = 'org.opensearch.client'
archivesBaseName = 'client-benchmarks'
archivesName = 'client-benchmarks'
}

// Not published so no need to assemble
Expand Down
2 changes: 1 addition & 1 deletion client/rest-high-level/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ apply plugin: 'opensearch.rest-resources'

base {
group = 'org.opensearch.client'
archivesBaseName = 'opensearch-rest-high-level-client'
archivesName = 'opensearch-rest-high-level-client'
}

restResources {
Expand Down
2 changes: 1 addition & 1 deletion client/rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ java {

base {
group = 'org.opensearch.client'
archivesBaseName = 'opensearch-rest-client'
archivesName = 'opensearch-rest-client'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion client/sniffer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ java {

base {
group = 'org.opensearch.client'
archivesBaseName = 'opensearch-rest-client-sniffer'
archivesName = 'opensearch-rest-client-sniffer'
}

dependencies {
Expand Down
1 change: 0 additions & 1 deletion client/sniffer/licenses/jackson-core-2.15.2.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions client/sniffer/licenses/jackson-core-2.16.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
899e5cf01be55fbf094ad72b2edb0c5df99111ee
15 changes: 15 additions & 0 deletions distribution/archives/darwin-arm64-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/darwin-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
15 changes: 15 additions & 0 deletions distribution/archives/freebsd-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
2 changes: 1 addition & 1 deletion distribution/archives/integ-test-zip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ apply plugin: 'com.netflix.nebula.maven-publish'

base {
group = "org.opensearch.distribution.integ-test-zip"
archivesBaseName = "opensearch"
archivesName = "opensearch"
}

integTest {
Expand Down
15 changes: 15 additions & 0 deletions distribution/archives/jre-linux-tar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

// This file is intentionally blank. All configuration of the
// distribution is done in the parent project.

// See please https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
Loading

0 comments on commit 03e8282

Please sign in to comment.