Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/gc-configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
malliaridis authored Nov 7, 2024
2 parents 0fca30f + 76cf62e commit 41ada76
Show file tree
Hide file tree
Showing 271 changed files with 3,929 additions and 6,065 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Solr is the blazing-fast, open source, multi-modal search platform built on [Apa
It powers full-text, vector, and geospatial search at many of the world's largest organizations.

[![Build Status](https://ci-builds.apache.org/job/Solr/job/Solr-Artifacts-main/badge/icon?subject=Solr%20Artifacts)](https://ci-builds.apache.org/job/Solr/job/Solr-Artifacts-main/)
[![Build Status](https://ci-builds.apache.org/job/Solr/job/Solr-Check-main/badge/icon?subject=Solr%20Check)](https://ci-builds.apache.org/job/Solr/job/Solr-Check-main/)
[![Build Status](https://ci-builds.apache.org/job/Solr/job/Solr-Lint-main/badge/icon?subject=Solr%20Lint)](https://ci-builds.apache.org/job/Solr/job/Solr-Lint-main/)

For a complete description of the Solr project, team composition, source
code repositories, and other details, please see the Solr web site at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public static void main(String[] args) {

public static void checkVersion() {
int major = Runtime.getRuntime().version().feature();
if (major < 11 || major > 21) {
if (major < 21 || major > 23) {
throw new IllegalStateException(
"java version must be between 11 and 21, your version: " + major);
"java version must be between 21 and 23, your version: " + major);
}
}

Expand Down
2 changes: 1 addition & 1 deletion build-tools/scriptDepVersions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ext {
"min-solrj-java-version" : "17",
"apache-rat": "0.15",
"commons-codec": "1.16.0",
"ecj": "3.36.0",
"ecj": "3.39.0",
"javacc": "7.0.12",
"jgit": "6.7.0.202309050840-r",
"flexmark": "0.64.8",
Expand Down
2 changes: 0 additions & 2 deletions crave.yaml

This file was deleted.

7 changes: 4 additions & 3 deletions dev-docs/asf-jenkins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ This file aims to document our [ASF Jenkins](https://ci-builds.apache.org/job/So
We run a number of jobs on Jenkins, each validating an overlapping set of concerns:

* `Solr-Artifacts-*` - daily jobs that run `./gradlew assemble` to ensure that build artifacts (except docker images) can be created successfully
* `Solr-check-*` - "hourly" jobs that run all project tests and static analysis (i.e. `test`, `integrationTest`, and `check`)
* `Solr-Lint-*` - daily jobs that run static analysis (i.e. `precommit` and `check -x test`) on a branch
* `Solr-Test-*` - "hourly" jobs that run all (non-integration) tests (i.e. `./gradlew test`)
* `Solr-TestIntegration-*` - daily jobs that run project integration tests (i.e. `./gradlew integrationTests`)
* `Solr-Docker-Nightly-*` - daily jobs that `./gradlew testDocker dockerPush` to validate docker image packaging. Snapshot images are pushed to hub.docker.com
* `Solr-reference-guide-*` - hourly jobs that build the Solr reference guide via `./gradlew checkSite` and push the resulting artifact to the staging/preview site `nightlies.apache.org`
* `Solr-reference-guide-*` - daily jobs that build the Solr reference guide via `./gradlew checkSite` and push the resulting artifact to the staging/preview site `nightlies.apache.org`
* `Solr-Smoketest-*` - daily jobs that produce a snapshot release (via the `assembleRelease` task) and run the release smoketester

Most jobs that validate particular build artifacts are run "daily", which is sufficient to prevent any large breaks from creeping into the build.

On the other hand, jobs that run tests are triggered "hourly" in order to squeeze as many test runs as possible out of our Jenkins hardware.
This is a necessary consequence of Solr's heavy use of randomization in its test-suite.
"Hourly" scheduling ensures that a test run is either currently running or in the build queue at all times, and enables us to get the maximum data points from our hardware.
Expand Down
2 changes: 1 addition & 1 deletion gradle/documentation/render-javadoc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ allprojects {
missingdoclet "org.apache.solr.tools:missing-doclet"
}

ext {
project.ext {
relativeDocPath = project.path.replaceFirst(/:\w+:/, "").replace(':', '/')
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/globals.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ allprojects {
// so :solr:core will have solr-core.jar, etc.
project.archivesBaseName = project.path.replaceAll("^:", "").replace(':', '-')

ext {
project.ext {
// Utility method to support passing overrides via -P or -D.
propertyOrDefault = { propName, defValue ->
def result
Expand Down
2 changes: 1 addition & 1 deletion gradle/node.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ configure([project(":solr:packaging"), project(":solr:solr-ref-guide"), project(
}
}

ext {
project.ext {
rootNodeDir = "$rootDir/.gradle/node"
nodeProjectDir = file("$rootNodeDir/$project.name")
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/solr/packaging.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

configure(allprojects.findAll {project -> project.path.startsWith(":solr:modules:") || project.path == ":solr:prometheus-exporter" || project.path == ":solr:cross-dc-manager" }) {
plugins.withType(JavaPlugin) {
ext {
project.ext {
packagingDir = file("${buildDir}/packaging")
if (project.path.startsWith(":solr:prometheus-exporter") || project.path.startsWith(":solr:cross-dc-manager")) {
deps = packagingDir
Expand Down
2 changes: 1 addition & 1 deletion gradle/testing/alternative-jdk-support.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ if (jvmGradle != jvmCurrent) {

// Set up root project's properties.
rootProject.ext.runtimeJavaHome = jvmCurrent.javaHome
rootProject.ext.runtimeJavaVersion = jvmDetector.getMetadata(new InstallationLocation(jvmCurrent.javaHome, "specific path")).getLanguageVersion()
rootProject.ext.runtimeJavaVersion = jvmDetector.getMetadata(InstallationLocation.userDefined(jvmCurrent.javaHome, "specific path")).getLanguageVersion()
rootProject.ext.usesAltJvm = (jvmGradle != jvmCurrent);

2 changes: 1 addition & 1 deletion gradle/testing/beasting.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def beastingMode = gradle.startParameter.taskNames.any{ name -> name == 'beast'

allprojects {
plugins.withType(JavaPlugin) {
ext {
project.ext {
testOptions += [
[propName: 'tests.dups', value: 0, description: "Reiterate runs of entire test suites ('beast' task)."]
]
Expand Down
2 changes: 1 addition & 1 deletion gradle/testing/profiling.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def recordings = files()

allprojects {
plugins.withType(JavaPlugin) {
ext {
project.ext {
testOptions += [
[propName: 'tests.profile', value: false, description: "Enable java flight recorder profiling."]
]
Expand Down
8 changes: 4 additions & 4 deletions gradle/testing/randomization.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ allprojects {
// Configure test property defaults and their descriptions.
allprojects {
plugins.withType(JavaPlugin) {
ext {
project.ext {
testOptions += [
// seed, repetition and amplification.
[propName: 'tests.seed', value: { -> rootSeed }, description: "Sets the master randomization seed."],
Expand Down Expand Up @@ -124,7 +124,7 @@ allprojects {
// Add Solr-specific test configs settings.
configure(allprojects.findAll {project -> project.path.startsWith(":solr") }) {
plugins.withType(JavaPlugin) {
ext {
project.ext {
testOptions += [
[propName: 'tests.src.home', value: null, description: "See SOLR-14023."],
[propName: 'solr.tests.use.numeric.points', value: null, description: "Point implementation to use (true=numerics, false=trie)."],
Expand All @@ -137,14 +137,14 @@ configure(allprojects.findAll {project -> project.path.startsWith(":solr") }) {
allprojects {
plugins.withType(JavaPlugin) {
afterEvaluate {
ext.testOptionsResolved = testOptions.findAll { opt ->
project.ext.testOptionsResolved = testOptions.findAll { opt ->
propertyOrDefault(opt.propName, opt.value) != null
}.collectEntries { opt ->
[(opt.propName): Objects.toString(resolvedTestOption(opt.propName))]
}

// Compute the "reproduce with" string.
ext.testOptionsForReproduceLine = testOptions.findAll { opt ->
project.ext.testOptionsForReproduceLine = testOptions.findAll { opt ->
if (opt["includeInReproLine"] == false) {
return false
}
Expand Down
2 changes: 2 additions & 0 deletions gradle/testing/randomization/policies/solr-tests.policy
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ grant {
permission java.net.SocketPermission "127.0.0.1:4", "connect,resolve";
permission java.net.SocketPermission "127.0.0.1:6", "connect,resolve";
permission java.net.SocketPermission "127.0.0.1:8", "connect,resolve";
// Used as an invalid ZK host
permission java.net.SocketPermission "----------:33332", "connect,resolve";

// Basic permissions needed for Lucene to work:
permission java.util.PropertyPermission "*", "read,write";
Expand Down
2 changes: 1 addition & 1 deletion gradle/testing/slowest-tests-at-end.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def allSuites = []

allprojects {
plugins.withType(JavaPlugin) {
ext {
project.ext {
testOptions += [
[propName: 'tests.slowestTests', value: true, description: "Print the summary of the slowest tests."],
[propName: 'tests.slowestSuites', value: true, description: "Print the summary of the slowest suites."]
Expand Down
2 changes: 1 addition & 1 deletion gradle/validation/check-environment.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.gradle.util.GradleVersion

configure(rootProject) {
ext {
expectedGradleVersion = '8.4'
expectedGradleVersion = '8.10'
}

wrapper {
Expand Down
6 changes: 3 additions & 3 deletions gradle/validation/ecj-lint/ecj.javadocs.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nonnullisdefault=disabled
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
Expand Down Expand Up @@ -93,4 +93,4 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
org.eclipse.jdt.core.compiler.source=11
org.eclipse.jdt.core.compiler.source=17
22 changes: 16 additions & 6 deletions gradle/validation/jar-checks.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.util.stream.Collectors

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
Expand Down Expand Up @@ -74,14 +76,14 @@ subprojects {
// Configure jarValidation configuration for all projects. Any dependency
// declared on this configuration (or any configuration it extends from) will
// be verified.
configurations {
project.configurations {
jarValidation
}

// For Java projects, add all dependencies from the following configurations
// to jar validation
plugins.withType(JavaPlugin) {
configurations {
project.configurations {
jarValidation {
extendsFrom runtimeClasspath
extendsFrom compileClasspath
Expand All @@ -107,16 +109,24 @@ subprojects {
}

def excludeRules = configurations.jarValidation.excludeRules
List<Map<String, String>> excludeRuleMaps;
if (excludeRules && excludeRules.size() > 0) {
excludeRuleMaps = excludeRules.stream().map {rule ->
if (rule.module != null) {
Map.of("group", rule.group, "module", rule.module)
} else {
Map.of("group", rule.group)
}
}.collect(Collectors.toList())
}

ArrayDeque<ResolvedDependency> queue = new ArrayDeque<>()
configurations.jarValidation.extendsFrom.each { conf ->
if (excludeRules) {
if (excludeRules && excludeRules.size() > 0) {
conf = conf.copyRecursive()
conf.canBeResolved = true
conf.canBeConsumed = true
def newConfExcludeRules = new HashSet<>(conf.excludeRules)
newConfExcludeRules.addAll(excludeRules)
conf.excludeRules = newConfExcludeRules
excludeRuleMaps.forEach {conf.exclude(it)}
}
if (conf.canBeResolved) {
queue.addAll(conf.resolvedConfiguration.firstLevelModuleDependencies)
Expand Down
2 changes: 1 addition & 1 deletion gradle/validation/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ configure(allprojects) { prj ->
plugins.withType(JavaPlugin) {
prj.apply plugin: 'com.diffplug.spotless'

ext {
project.ext {
spotlessJavaSetup = (Action){
it.toggleOffOn() // obviously, only to be used sparingly.
// TODO: Work out how to support multiple different header files (we have
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.jar.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0336f591bc0ec9aa0c9988929b93ecc916b3c1d52aed202c7381db144aa0ef15
2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.jar.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.4.0
8.10.2
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 6 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -161,7 +164,7 @@ if [ ! -e "$GRADLE_WRAPPER_JAR" ]; then
"$JAVACMD" $JAVA_OPTS "$APP_HOME/build-tools/build-infra/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java" "$GRADLE_WRAPPER_JAR"
WRAPPER_STATUS=$?
if [ "$WRAPPER_STATUS" -eq 1 ]; then
echo "ERROR: Something went wrong. Make sure you're using Java version between 11 and 21."
echo "ERROR: Something went wrong. Make sure you're using Java version between 21 and 23."
exit $WRAPPER_STATUS
elif [ "$WRAPPER_STATUS" -ne 0 ]; then
exit $WRAPPER_STATUS
Expand Down
24 changes: 13 additions & 11 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -48,11 +50,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -62,11 +64,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down Expand Up @@ -108,7 +110,7 @@ goto fail

:failWithJvmMessage
@rem https://github.com/apache/lucene/pull/819
echo Error: Something went wrong. Make sure you're using Java version between 11 and 21.
echo Error: Something went wrong. Make sure you're using Java version between 21 and 23.

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pluginManagement {
}

plugins {
id 'com.gradle.develocity' version '3.17.6'
id 'com.gradle.develocity' version '3.18.1'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0.2'
}

Expand Down
Loading

0 comments on commit 41ada76

Please sign in to comment.