Skip to content

Commit

Permalink
Merge remote-tracking branch 'apache/main' into feature/SOLR-17602/pe…
Browse files Browse the repository at this point in the history
…r-module-dependency-locking

# Conflicts:
#	versions.lock
  • Loading branch information
malliaridis committed Jan 11, 2025
2 parents 0783610 + 440e70d commit 69240ad
Show file tree
Hide file tree
Showing 121 changed files with 733 additions and 500 deletions.
4 changes: 2 additions & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"enabled": true,
"dependencyDashboard": false,
"enabledManagers": ["gradle", "github-actions"],
"includePaths": ["versions.*", "build.gradle", ".github/workflows/*"],
"includePaths": ["gradle/libs.versions.toml", "versions.*", "build.gradle", ".github/workflows/*"],
"postUpgradeTasks": {
"commands": ["./gradlew updateLicenses"],
"commands": ["./gradlew writeLocks", "./gradlew updateLicenses"],
"fileFilters": ["solr/licenses/*.sha1"],
"executionMode": "branch"
},
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==============================================================
Apache Solr
Copyright 2006-2024 The Apache Software Foundation
Copyright 2006-2025 The Apache Software Foundation
==============================================================

This product includes software developed at
Expand Down
4 changes: 2 additions & 2 deletions dev-docs/lucene-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Create a new branch locally e.g. `git checkout -b lucene940 -t origin/main` for

## Build

### `versions.props` update
### `gradle/libs.versions.toml` update

```
- org.apache.lucene:*=9.3.0
Expand All @@ -37,7 +37,7 @@ Create a new branch locally e.g. `git checkout -b lucene940 -t origin/main` for
### `versions.lock` update

```
gradlew --write-locks
gradlew :writeLocks
```

### `solr/licenses` update
Expand Down
63 changes: 63 additions & 0 deletions dev-tools/scripts/parseContributorsFromChanges.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
import re
from collections import defaultdict

# Read data from standard input
data = sys.stdin.read()

# Replace all carriage return line feed (Windows) with line feed
data = data.replace('\r\n', '\n')

# Replace all carriage return (Mac OS before X) with line feed
data = data.replace('\r', '\n')

# Split data at blank lines
paras = data.split('\n\n')

# Initialize a default dictionary to store contributors and their counts
contributors = defaultdict(int)

# Regular expression to find the attribution in parentheses at the end of a line
pattern = re.compile(r"\(([^()]*)\)$")

for para in paras:
# Normalize whitespace (replace all whitespace with a single space)
para = re.sub('\s+', ' ', para).strip()
#print(f'> {para}')

# Find all contributors in the line
match = pattern.search(para.strip())
if match:
attribution = match.group(1)
# might have a "via" committer; we only want the author here
attribution = attribution.split(" via ")[0] # keep left side
# Split the contributors by comma and strip whitespace
for contributor in attribution.split(','):
contributor = contributor.strip()
contributors[contributor] += 1

del contributors['solrbot']

sorted_contributors = sorted(contributors.items(), key=lambda item: item[1], reverse=True)

# Print the contributors and their counts
for contributor, count in sorted_contributors:
print(f'{contributor}: {count}')

print('\n\nThanks to all contributors!: ')
print(', '.join([contributor for contributor, count in sorted_contributors]))
26 changes: 15 additions & 11 deletions dev-tools/scripts/smokeTestRelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs):
java.run_java11('./gradlew --no-daemon integrationTest -Dversion.release=%s' % version, '%s/itest.log' % unpackPath)
print(" build binary release w/ Java 11")
java.run_java11('./gradlew --no-daemon dev -Dversion.release=%s' % version, '%s/assemble.log' % unpackPath)
testSolrExample("%s/solr/packaging/build/dev" % unpackPath, java.java11_home)
testSolrExample("%s/solr/packaging/build/dev" % unpackPath, java.java11_home, False)

if java.run_java17:
print(" run tests w/ Java 17 and testArgs='%s'..." % testArgs)
Expand All @@ -677,7 +677,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs):
java.run_java17('./gradlew --no-daemon integrationTest -Dversion.release=%s' % version, '%s/itest-java17.log' % unpackPath)
print(" build binary release w/ Java 17")
java.run_java17('./gradlew --no-daemon dev -Dversion.release=%s' % version, '%s/assemble-java17.log' % unpackPath)
testSolrExample("%s/solr/packaging/build/dev" % unpackPath, java.java17_home)
testSolrExample("%s/solr/packaging/build/dev" % unpackPath, java.java17_home, False)

else:
# Binary tarball
Expand All @@ -690,7 +690,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs):
shutil.copytree(unpackPath, java11UnpackPath)
os.chdir(java11UnpackPath)
print(' test solr example w/ Java 11...')
testSolrExample(java11UnpackPath, java.java11_home)
testSolrExample(java11UnpackPath, java.java11_home, isSlim)

if java.run_java17:
print(' copying unpacked distribution for Java 17 ...')
Expand All @@ -700,7 +700,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs):
shutil.copytree(unpackPath, java17UnpackPath)
os.chdir(java17UnpackPath)
print(' test solr example w/ Java 17...')
testSolrExample(java17UnpackPath, java.java17_home)
testSolrExample(java17UnpackPath, java.java17_home, isSlim)

os.chdir(unpackPath)

Expand Down Expand Up @@ -742,7 +742,7 @@ def is_port_in_use(port):
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
return s.connect_ex(('localhost', port)) == 0

def testSolrExample(binaryDistPath, javaPath):
def testSolrExample(binaryDistPath, javaPath, isSlim):
# test solr using some examples it comes with
logFile = '%s/solr-example.log' % binaryDistPath
old_cwd = os.getcwd() # So we can back-track
Expand All @@ -754,6 +754,10 @@ def testSolrExample(binaryDistPath, javaPath):
env['JAVA_HOME'] = javaPath
env['PATH'] = '%s/bin:%s' % (javaPath, env['PATH'])

example = "techproducts"
if isSlim:
example = "films"

# Stop Solr running on port 8983 (in case a previous run didn't shutdown cleanly)
try:
if not cygwin:
Expand All @@ -763,20 +767,20 @@ def testSolrExample(binaryDistPath, javaPath):
except:
print(' Stop failed due to: '+sys.exc_info()[0])

print(' Running techproducts example on port 8983 from %s' % binaryDistPath)
print(' Running %s example on port 8983 from %s' % (example, binaryDistPath))
try:
if not cygwin:
runExampleStatus = subprocess.call(['bin/solr','start','-e','techproducts'])
runExampleStatus = subprocess.call(['bin/solr','start','-e',example])
else:
runExampleStatus = subprocess.call('env "PATH=`cygpath -S -w`:$PATH" bin/solr.cmd -e techproducts', shell=True)
runExampleStatus = subprocess.call('env "PATH=`cygpath -S -w`:$PATH" bin/solr.cmd -e ' + example, shell=True)

if runExampleStatus != 0:
raise RuntimeError('Failed to run the techproducts example, check log for previous errors.')
raise RuntimeError('Failed to run the %s example, check log for previous errors.' % example)

os.chdir('example')
print(' run query...')
s = load('http://localhost:8983/solr/techproducts/select/?q=video')
if s.find('"numFound":3,') == -1:
s = load('http://localhost:8983/solr/%s/select/?q=video' % example)
if s.find('"numFound":%d,' % (8 if isSlim else 3)) == -1:
print('FAILED: response is:\n%s' % s)
raise RuntimeError('query on solr example instance failed')
s = load('http://localhost:8983/api/cores')
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ apache-httpcomponents-httpcore = "4.4.16"
apache-httpcomponents-httpmime = "4.5.14"
apache-kafka = "3.7.1"
apache-log4j = "2.21.0"
apache-lucene = "9.11.1"
apache-lucene = "9.12.1"
apache-opennlp = "1.9.4"
apache-poi = "5.2.2"
apache-rat = "0.15"
Expand Down
7 changes: 3 additions & 4 deletions gradle/node.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ configure([project(":solr:packaging"), project(":solr:solr-ref-guide"), project(
}

project.ext {
rootNodeDir = "$rootDir/.gradle/node"
nodeProjectDir = file("$rootNodeDir/$project.name")
nodeProjectDir = layout.projectDirectory.dir(".gradle/node")
}

node {
Expand All @@ -49,10 +48,10 @@ configure([project(":solr:packaging"), project(":solr:solr-ref-guide"), project(
}

// The directory where Node.js is unpacked (when download is true)
workDir = file("${project.ext.rootNodeDir}/nodejs")
workDir = file("${project.ext.nodeProjectDir.getAsFile().path}/nodejs")

// The directory where npm is installed (when a specific version is defined)
npmWorkDir = file("${project.ext.rootNodeDir}/npm")
npmWorkDir = file("${project.ext.nodeProjectDir.getAsFile().path}/npm")

// The Node.js project directory location
// This is where the package.json file and node_modules directory are located
Expand Down
14 changes: 11 additions & 3 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ Other Changes
================== 9.9.0 ==================
New Features
---------------------
(No changes)
* SOLR-17582: The CLUSTERSTATUS API will now stream each collection's status to the response,
fetching and computing it on the fly. To avoid a backwards compatibilty concern, this won't work
for wt=javabin. (Matthew Biscocho, David Smiley)

Improvements
---------------------
Expand All @@ -164,17 +166,23 @@ Optimizations

Bug Fixes
---------------------
(No changes)
* SOLR-17587: Metrics: wt=prometheus fix for non-compliant exposition format containing duplicate TYPE lines.
(Matthew Biscocho via David Smiley)

Dependency Upgrades
---------------------
(No changes)
* SOLR-17471: Upgrade Lucene to 9.12.1. (Pierre Salagnac, Christine Poerschke)

Other Changes
---------------------
* SOLR-17579: Remove unused code and other refactorings in ReplicationHandler and tests. Removed unused public
LOCAL_ACTIVITY_DURING_REPLICATION variable. (Eric Pugh)

* GITHUB#2869: SolrTestCase now supports @LogLevel annotations (as SolrTestCaseJ4 has). Added LogLevelTestRule
for encapsulation and reuse. (David Smiley)

* GITHUB#2680: Improve reliablity of NpmTasks finding needed files/commands. (Tyler Bertrand via Eric Pugh)

================== 9.8.0 ==================
New Features
---------------------
Expand Down
9 changes: 9 additions & 0 deletions solr/bin/solr
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ if [ $# -gt 0 ]; then
fi

SOLR_HOME="$2"
PASS_TO_RUN_EXAMPLE+=("--solr-home" "$SOLR_HOME")
shift 2
;;
--data-home)
Expand All @@ -736,6 +737,14 @@ if [ $# -gt 0 ]; then
EXAMPLE="$2"
shift 2
;;
--example-dir)
if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
print_usage "$SCRIPT_CMD" "Example directory is required when using the $1 option!"
exit 1
fi
PASS_TO_RUN_EXAMPLE+=("--example-dir" "$2")
shift 2
;;
-f|--foreground)
FG="true"
shift
Expand Down
Loading

0 comments on commit 69240ad

Please sign in to comment.