Skip to content

Commit d2a4ad5

Browse files
authored
Merge branch 'main' into deven009/fix/wildcard-escaped-backslash-19719
Signed-off-by: Deven009 <37845204+Deven009@users.noreply.github.com>
2 parents 6b279f0 + 3005a8c commit d2a4ad5

File tree

314 files changed

+12059
-1121
lines changed

Some content is hidden

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

314 files changed

+12059
-1121
lines changed

.ci/bwcVersions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ BWC_VERSION:
5252
- "3.2.0"
5353
- "3.3.0"
5454
- "3.3.1"
55+
- "3.3.2"

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
distribution: temurin
4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v3
46+
uses: github/codeql-action/init@v4
4747
with:
4848
languages: ${{ matrix.language }}
4949
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
5454
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5555
# If this step fails, then you should remove it and run the build manually (see below)
5656
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v3
57+
uses: github/codeql-action/autobuild@v4
5858

5959
# ℹ️ Command-line programs to run using the OS shell.
6060
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
6868
# make release
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v3
71+
uses: github/codeql-action/analyze@v4

.github/workflows/wrapper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v5
11-
- uses: gradle/actions/wrapper-validation@v4
11+
- uses: gradle/actions/wrapper-validation@v5

CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1111
- Use Lucene `pack` method for `half_float` and `usigned_long` when using `ApproximatePointRangeQuery`.
1212
- Add a mapper for context aware segments grouping criteria ([#19233](https://github.com/opensearch-project/OpenSearch/pull/19233))
1313
- Return full error for GRPC error response ([#19568](https://github.com/opensearch-project/OpenSearch/pull/19568))
14+
- Add support for repository with Server side encryption enabled and client side encryption as well based on a flag. ([#19630)](https://github.com/opensearch-project/OpenSearch/pull/19630))
1415
- Add pluggable gRPC interceptors with explicit ordering([#19005](https://github.com/opensearch-project/OpenSearch/pull/19005))
16+
- Add BindableServices extension point to transport-grpc-spi ([#19304](https://github.com/opensearch-project/OpenSearch/pull/19304))
1517
- Add metrics for the merged segment warmer feature ([#18929](https://github.com/opensearch-project/OpenSearch/pull/18929))
1618
- Add pointer based lag metric in pull-based ingestion ([#19635](https://github.com/opensearch-project/OpenSearch/pull/19635))
19+
- Introduced internal API for retrieving metadata about requested indices from transport actions ([#18523](https://github.com/opensearch-project/OpenSearch/pull/18523))
20+
- Add cluster defaults for merge autoThrottle, maxMergeThreads, and maxMergeCount; Add segment size filter to the merged segment warmer ([#19629](https://github.com/opensearch-project/OpenSearch/pull/19629))
21+
- Add build-tooling to run in FIPS environment ([#18921](https://github.com/opensearch-project/OpenSearch/pull/18921))
22+
- Add SMILE/CBOR/YAML document format support to Bulk GRPC endpoint ([#19744](https://github.com/opensearch-project/OpenSearch/pull/19744))
1723

1824
### Changed
1925
- Faster `terms` query creation for `keyword` field with index and docValues enabled ([#19350](https://github.com/opensearch-project/OpenSearch/pull/19350))
@@ -23,18 +29,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2329
- Remove MultiCollectorWrapper and use MultiCollector in Lucene instead ([#19595](https://github.com/opensearch-project/OpenSearch/pull/19595))
2430
- Change implementation for `percentiles` aggregation for latency improvement ([#19648](https://github.com/opensearch-project/OpenSearch/pull/19648))
2531
- Wrap checked exceptions in painless.DefBootstrap to support JDK-25 ([#19706](https://github.com/opensearch-project/OpenSearch/pull/19706))
26-
- Refactor the ThreadPoolStats.Stats class to use the Builder pattern instead of constructors ([#19306](https://github.com/opensearch-project/OpenSearch/pull/19306))
32+
- Refactor the ThreadPoolStats.Stats class to use the Builder pattern instead of constructors ([#19317](https://github.com/opensearch-project/OpenSearch/pull/19317))
2733
- Refactor the IndexingStats.Stats class to use the Builder pattern instead of constructors ([#19306](https://github.com/opensearch-project/OpenSearch/pull/19306))
34+
- Remove FeatureFlag.MERGED_SEGMENT_WARMER_EXPERIMENTAL_FLAG. ([#19715](https://github.com/opensearch-project/OpenSearch/pull/19715))
35+
- Change the default value of doc_values in WildcardFieldMapper to true. ([#19796](https://github.com/opensearch-project/OpenSearch/pull/19796))
36+
- Make Engine#loadHistoryUUID() protected and Origin#isFromTranslog() public ([#19753](https://github.com/opensearch-project/OpenSearch/pull/19752))
2837

2938
### Fixed
3039
- Fix Allocation and Rebalance Constraints of WeightFunction are incorrectly reset ([#19012](https://github.com/opensearch-project/OpenSearch/pull/19012))
3140
- Fix flaky test FieldDataLoadingIT.testIndicesFieldDataCacheSizeSetting ([#19571](https://github.com/opensearch-project/OpenSearch/pull/19571))
41+
- Fix case-insensitive wildcard + aggregation query crash ([#19489](https://github.com/opensearch-project/OpenSearch/pull/19489))
3242
- Avoid primary shard failure caused by merged segment warmer exceptions ([#19436](https://github.com/opensearch-project/OpenSearch/pull/19436))
3343
- Fix pull-based ingestion out-of-bounds offset scenarios and remove persisted offsets ([#19607](https://github.com/opensearch-project/OpenSearch/pull/19607))
3444
- Fix issue with updating core with a patch number other than 0 ([#19377](https://github.com/opensearch-project/OpenSearch/pull/19377))
3545
- [Java Agent] Allow JRT protocol URLs in protection domain extraction ([#19683](https://github.com/opensearch-project/OpenSearch/pull/19683))
3646
- Fix potential concurrent modification exception when updating allocation filters ([#19701])(https://github.com/opensearch-project/OpenSearch/pull/19701))
3747
- Fix wildcard query with escaped backslash followed by wildcard character ([#19719](https://github.com/opensearch-project/OpenSearch/pull/19719))
48+
- Fix file-based ingestion consumer to handle start point beyond max line number([#19757])(https://github.com/opensearch-project/OpenSearch/pull/19757))
49+
- Fix IndexOutOfBoundsException when running include/exclude on non-existent prefix in terms aggregations ([#19637](https://github.com/opensearch-project/OpenSearch/pull/19637))
50+
- Fixed assertion unsafe use of ClusterService.state() in ResourceUsageCollectorService ([#19775])(https://github.com/opensearch-project/OpenSearch/pull/19775))
51+
- Add S3Repository.LEGACY_MD5_CHECKSUM_CALCULATION to list of repository-s3 settings ([#19788](https://github.com/opensearch-project/OpenSearch/pull/19788))
3852

3953
### Dependencies
4054
- Update to Gradle 9.1 ([#19575](https://github.com/opensearch-project/OpenSearch/pull/19575))
@@ -49,9 +63,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4963
- Bump `org.apache.avro:avro` from 1.12.0 to 1.12.1 ([#19692](https://github.com/opensearch-project/OpenSearch/pull/19692))
5064
- Bump `com.github.spotbugs:spotbugs-annotations` from 4.9.6 to 4.9.8 ([#19691](https://github.com/opensearch-project/OpenSearch/pull/19691))
5165
- Bump `stefanzweifel/git-auto-commit-action` from 6 to 7 ([#19689](https://github.com/opensearch-project/OpenSearch/pull/19689))
66+
- Bump ch.qos.logback modules from 1.5.18 to 1.5.20 in HDFS test fixture ([#19763](https://github.com/opensearch-project/OpenSearch/pull/19763))
67+
- Bump `github/codeql-action` from 3 to 4 ([#19785](https://github.com/opensearch-project/OpenSearch/pull/19785))
68+
- Bump `gradle/actions` from 4 to 5 ([#19781](https://github.com/opensearch-project/OpenSearch/pull/19781))
5269

5370
### Deprecated
54-
- Deprecated existing constructors in ThreadPoolStats.Stats in favor of the new Builder ([#19306](https://github.com/opensearch-project/OpenSearch/pull/19306))
71+
- Deprecated existing constructors in ThreadPoolStats.Stats in favor of the new Builder ([#19317](https://github.com/opensearch-project/OpenSearch/pull/19317))
5572
- Deprecated existing constructors in IndexingStats.Stats in favor of the new Builder ([#19306](https://github.com/opensearch-project/OpenSearch/pull/19306))
5673

5774
### Removed

build.gradle

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ apply from: 'gradle/run.gradle'
7171
apply from: 'gradle/missing-javadoc.gradle'
7272
apply from: 'gradle/code-coverage.gradle'
7373

74+
// Apply FIPS configuration to all projects
75+
allprojects {
76+
apply from: "$rootDir/gradle/fips.gradle"
77+
}
78+
7479
// common maven publishing configuration
7580
allprojects {
7681
group = 'org.opensearch'
@@ -421,8 +426,12 @@ gradle.projectsEvaluated {
421426
dependsOn(project(':libs:agent-sm:agent').prepareAgent)
422427
jvmArgs += ["-javaagent:" + project(':libs:agent-sm:agent').jar.archiveFile.get()]
423428
}
424-
if (BuildParams.inFipsJvm) {
425-
task.jvmArgs += ["-Dorg.bouncycastle.fips.approved_only=true"]
429+
if (BuildParams.isInFipsJvm()) {
430+
def fipsSecurityFile = project.rootProject.file('distribution/src/config/fips_java.security')
431+
task.jvmArgs += [
432+
"-Dorg.bouncycastle.fips.approved_only=true",
433+
"-Djava.security.properties=${fipsSecurityFile}"
434+
]
426435
}
427436
}
428437
}
@@ -693,14 +702,6 @@ allprojects {
693702
plugins.withId('lifecycle-base') {
694703
checkPart1.configure { dependsOn 'check' }
695704
}
696-
697-
plugins.withId('opensearch.testclusters') {
698-
testClusters.configureEach {
699-
if (BuildParams.inFipsJvm) {
700-
keystorePassword 'notarealpasswordphrase'
701-
}
702-
}
703-
}
704705
}
705706

706707
subprojects {

buildSrc/build.gradle

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ dependencies {
133133
integTestImplementation('org.spockframework:spock-core:2.4-M6-groovy-4.0') {
134134
exclude module: "groovy"
135135
}
136+
// Integration with JUnit 4 features for Spock 2+ (which internally uses JUnit Platform -
137+
// part of JUnit 5) - https://spockframework.org/spock/docs/2.4-M6/modules.html
138+
integTestImplementation('org.spockframework:spock-junit4:2.4-M6-groovy-4.0') {
139+
exclude module: "groovy"
140+
}
141+
integTestImplementation(platform("org.junit:junit-bom:${props.getProperty('junit5')}"))
142+
integTestRuntimeOnly("org.junit.platform:junit-platform-launcher")
143+
integTestRuntimeOnly("org.junit.vintage:junit-vintage-engine")
136144
}
137145

138146
configurations.all {
@@ -185,7 +193,7 @@ if (project != rootProject) {
185193
disableTasks('forbiddenApisMain', 'forbiddenApisTest', 'forbiddenApisIntegTest', 'forbiddenApisTestFixtures')
186194
jarHell.enabled = false
187195
thirdPartyAudit.enabled = false
188-
if (org.opensearch.gradle.info.BuildParams.inFipsJvm) {
196+
if (org.opensearch.gradle.info.BuildParams.isInFipsJvm()) {
189197
// We don't support running gradle with a JVM that is in FIPS 140 mode, so we don't test it.
190198
// WaitForHttpResourceTests tests would fail as they use JKS/PKCS12 keystores
191199
test.enabled = false
@@ -253,9 +261,10 @@ if (project != rootProject) {
253261
}
254262

255263
tasks.register("integTest", Test) {
264+
useJUnitPlatform()
256265
inputs.dir(file("src/testKit")).withPropertyName("testkit dir").withPathSensitivity(PathSensitivity.RELATIVE)
257266
systemProperty 'test.version_under_test', version
258-
onlyIf { org.opensearch.gradle.info.BuildParams.inFipsJvm == false }
267+
onlyIf { org.opensearch.gradle.info.BuildParams.isInFipsJvm() == false }
259268
maxParallelForks = System.getProperty('tests.jvms', org.opensearch.gradle.info.BuildParams.defaultParallel.toString()) as Integer
260269
testClassesDirs = sourceSets.integTest.output.classesDirs
261270
classpath = sourceSets.integTest.runtimeClasspath

buildSrc/src/integTest/groovy/org/opensearch/gradle/DistributionDownloadPluginFuncTest.groovy

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ class DistributionDownloadPluginFuncTest extends AbstractGradleFuncTest {
5656
where:
5757
version | platform | distType
5858
VersionProperties.getOpenSearch() | OpenSearchDistribution.Platform.LINUX | "current"
59-
"8.1.0-SNAPSHOT" | OpenSearchDistribution.Platform.LINUX | "bwc"
60-
"7.0.0" | OpenSearchDistribution.Platform.WINDOWS | "released"
59+
"2.19.0-SNAPSHOT" | OpenSearchDistribution.Platform.LINUX | "bwc"
60+
"3.3.0" | OpenSearchDistribution.Platform.WINDOWS | "released"
6161
}
6262

6363

@@ -72,7 +72,8 @@ class DistributionDownloadPluginFuncTest extends AbstractGradleFuncTest {
7272
"""
7373

7474
when:
75-
def runner = gradleRunner('clean', 'setupDistro', '-i')
75+
def customGradleUserHome = testProjectDir.newFolder().absolutePath;
76+
def runner = gradleRunner('clean', 'setupDistro', '-i', '-g', customGradleUserHome)
7677
def result = withMockedDistributionDownload(version, platform, runner) {
7778
// initial run
7879
build()
@@ -82,7 +83,8 @@ class DistributionDownloadPluginFuncTest extends AbstractGradleFuncTest {
8283

8384
then:
8485
result.task(":setupDistro").outcome == TaskOutcome.SUCCESS
85-
assertOutputContains(result.output, "Skipping ${SymbolicLinkPreservingUntarTransform.class.simpleName}")
86+
result.output.count("Unpacking opensearch-${version}-linux-x64.tar.gz " +
87+
"using SymbolicLinkPreservingUntarTransform.") == 0
8688
}
8789

8890
def "transforms are reused across projects"() {
@@ -91,6 +93,7 @@ class DistributionDownloadPluginFuncTest extends AbstractGradleFuncTest {
9193
def platform = OpenSearchDistribution.Platform.LINUX
9294

9395
3.times {
96+
testProjectDir.newFolder("sub-$it")
9497
settingsFile << """
9598
include ':sub-$it'
9699
"""

buildSrc/src/integTest/groovy/org/opensearch/gradle/JdkDownloadPluginFuncTest.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class JdkDownloadPluginFuncTest extends AbstractGradleFuncTest {
108108
def mockRepoUrl = urlPath(jdkVendor, jdkVersion, platform)
109109
def mockedContent = filebytes(jdkVendor, platform)
110110
3.times {
111+
testProjectDir.newFolder("sub-$it")
111112
settingsFile << """
112113
include ':sub-$it'
113114
"""
@@ -193,7 +194,7 @@ class JdkDownloadPluginFuncTest extends AbstractGradleFuncTest {
193194
}
194195

195196
then:
196-
assertOutputContains(result.output, "Skipping $transformType")
197+
result.output.count("Unpacking ${platform}-12.0.2-x64.tar.gz using ${transformType}.") == 0
197198

198199
where:
199200
platform | transformType
@@ -246,6 +247,7 @@ class JdkDownloadPluginFuncTest extends AbstractGradleFuncTest {
246247
p.repositories.all { repo ->
247248
if(repo.name == "jdk_repo_${jdkVendor}_${jdkVersion}") {
248249
repo.setUrl('${server.baseUrl()}')
250+
repo.setAllowInsecureProtocol(true)
249251
}
250252
}
251253
}"""

buildSrc/src/integTest/groovy/org/opensearch/gradle/internal/InternalDistributionArchiveSetupPluginFuncTest.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ class InternalDistributionArchiveSetupPluginFuncTest extends AbstractGradleFuncT
9898
given:
9999
file('someFile.txt') << "some content"
100100

101+
testProjectDir.newFolder("consumer")
102+
testProjectDir.newFolder("producer-tar")
103+
101104
settingsFile << """
102105
include ':consumer'
103106
include ':producer-tar'

buildSrc/src/integTest/groovy/org/opensearch/gradle/internal/InternalDistributionDownloadPluginFuncTest.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest
122122
internalBuild()
123123
bwcMinorProjectSetup()
124124
buildFile << """
125+
import org.opensearch.gradle.JavaPackageType
126+
125127
apply plugin: 'opensearch.internal-distribution-download'
126128
127129
opensearch_distributions {
@@ -130,7 +132,7 @@ class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest
130132
type = "archive"
131133
platform = "linux"
132134
architecture = Architecture.current();
133-
bundledJdk = false
135+
bundledJdk = JavaPackageType.NONE
134136
}
135137
}
136138
tasks.register("createExtractedTestDistro") {

0 commit comments

Comments
 (0)