Skip to content

Commit e1cb86f

Browse files
committed
Merge remote-tracking branch 'apache/main'
2 parents c8d2a07 + 2f302e0 commit e1cb86f

File tree

367 files changed

+7494
-2508
lines changed

Some content is hidden

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

367 files changed

+7494
-2508
lines changed

.github/workflows/bin-solr-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
restore-keys: |
3535
${{ runner.os }}-gradle-binsolr-
3636
${{ runner.os }}-gradle-
37-
- name: Initialize gradle settings
38-
run: ./gradlew localSettings
3937
- name: Test the bin/solr script
4038
run: ./gradlew integrationTests
4139
- name: Archive logs

.github/workflows/docker-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ jobs:
4242
restore-keys: |
4343
${{ runner.os }}-gradle-docker-
4444
${{ runner.os }}-gradle-
45-
- name: Initialize gradle settings
46-
run: ./gradlew localSettings
4745
- name: Build Docker image with Gradle
4846
run: ./gradlew solr:docker:docker
4947
- name: Run tests on Docker image

.github/workflows/gradle-precommit.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ jobs:
3434
${{ runner.os }}-gradle-precommit-
3535
${{ runner.os }}-gradle-
3636
37-
- name: Initialize gradle settings
38-
run: ./gradlew localSettings
39-
4037
- name: Run gradle check (without tests)
4138
run: ./gradlew check -x test -Ptask.times=true
4239

.github/workflows/solrj-test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,5 @@ jobs:
3333
restore-keys: |
3434
${{ runner.os }}-gradle-solrj-
3535
${{ runner.os }}-gradle-
36-
- name: Initialize gradle settings
37-
run: ./gradlew localSettings
3836
- name: Test the SolrJ Package
3937
run: ./gradlew solr:solrj:test
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Solr Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'main'
7+
8+
jobs:
9+
test:
10+
name: Run Solr Tests using Crave.io resources
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- name: Get the Crave binary
19+
run: curl -s https://raw.githubusercontent.com/accupara/crave/master/get_crave.sh | bash -s --
20+
- name: Initialize, build, test
21+
run: ./crave run --clean

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ __pycache__
3737
*~
3838

3939
# Ignore lucene included build
40-
lucene/
40+
/lucene
4141

4242
# Ignore gradle wrapper
4343
gradle/wrapper/gradle-wrapper.jar
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.lucene.gradle;
18+
19+
import java.io.IOException;
20+
import java.nio.charset.StandardCharsets;
21+
import java.nio.file.Files;
22+
import java.nio.file.Path;
23+
import java.nio.file.Paths;
24+
import java.nio.file.StandardOpenOption;
25+
import java.util.Map;
26+
27+
/**
28+
* Standalone class that generates a populated gradle.properties from a template.
29+
*
30+
* <p>Has no dependencies outside of standard java libraries
31+
*/
32+
public class GradlePropertiesGenerator {
33+
public static void main(String[] args) {
34+
if (args.length != 2) {
35+
System.err.println("Usage: java GradlePropertiesGenerator.java <source> <destination>");
36+
System.exit(2);
37+
}
38+
39+
try {
40+
new GradlePropertiesGenerator().run(Paths.get(args[0]), Paths.get(args[1]));
41+
} catch (Exception e) {
42+
System.err.println("ERROR: " + e.getMessage());
43+
System.exit(3);
44+
}
45+
}
46+
47+
public void run(Path source, Path destination) throws IOException {
48+
if (!Files.exists(source)) {
49+
throw new IOException("template file not found: " + source);
50+
}
51+
if (Files.exists(destination)) {
52+
System.out.println(destination + " already exists, skipping generation.");
53+
return;
54+
}
55+
56+
// Approximate a common-sense default for running gradle/tests with parallel
57+
// workers: half the count of available cpus but not more than 12.
58+
var cpus = Runtime.getRuntime().availableProcessors();
59+
var maxWorkers = (int) Math.max(1d, Math.min(cpus * 0.5d, 12));
60+
var testsJvms = (int) Math.max(1d, Math.min(cpus * 0.5d, 12));
61+
62+
var replacements = Map.of("@MAX_WORKERS@", maxWorkers, "@TEST_JVMS@", testsJvms);
63+
64+
System.out.println("Generating gradle.properties");
65+
String fileContent = Files.readString(source, StandardCharsets.UTF_8);
66+
for (var entry : replacements.entrySet()) {
67+
fileContent = fileContent.replace(entry.getKey(), String.valueOf(entry.getValue()));
68+
}
69+
Files.writeString(
70+
destination, fileContent, StandardCharsets.UTF_8, StandardOpenOption.CREATE_NEW);
71+
}
72+
}

dev-docs/how-to-contribute.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ In order to make a new contribution to Solr you will use the fork you have creat
1717
1. Create a new Jira issue in the Solr project: https://issues.apache.org/jira/projects/SOLR/issues
1818
2. Create a new branch in your Solr fork to provide a PR for your contribution on the newly created issue. Make any necessary changes for the given bug/feature in that branch. You can use additional information in these dev-docs to build and test your code as well as ensure it passes code quality checks.
1919
3. Once you are satisfied with your changes, get your branch ready for a PR by running `./gradlew tidy updateLicenses check -x test`. This will format your source code, update licenses of any dependency version changes and run all pre-commit tests. Commit the changes.
20+
* Note: the `check` command requires `perl` and `python3` to be present on your `PATH` to validate documentation.
2021
4. Open a PR of your branch against the `main` branch of the apache/solr repository. When you open a PR on your fork, this should be the default option.
2122
* The title of your PR should include the Solr Jira issue that you opened, i.e. `SOLR-12345: New feature`.
2223
* The PR description will automatically populate with a pre-set template that you will need to fill out.

dev-docs/solr-source-code.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ If you want to build the documentation, type `./gradlew -p solr documentation`.
3838

3939
`./gradlew check` will assemble Solr and run all validation tasks unit tests.
4040

41+
NOTE: the `check` command requires `perl` and `python3` to be present on your `PATH` to validate documentation.
42+
4143
To build the final Solr artifacts run `./gradlew assemble`.
4244

4345
Lastly, there is developer oriented documentation in `./dev-docs/README.adoc` that

dev-tools/doap/solr.rdf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@
6868
</maintainer>
6969

7070
<!-- NOTE: please insert releases in numeric order, NOT chronologically. -->
71+
<release>
72+
<Version>
73+
<name>solr-9.1.1</name>
74+
<created>2023-01-25</created>
75+
<revision>9.1.1</revision>
76+
</Version>
77+
</release>
7178
<release>
7279
<Version>
7380
<name>solr-9.1.0</name>

0 commit comments

Comments
 (0)