Skip to content

Commit ffc030a

Browse files
authored
Merge branch 'apache:main' into bkd-prefetch-optimization
2 parents 4f650d7 + d3bd7c7 commit ffc030a

File tree

195 files changed

+32828
-30646
lines changed

Some content is hidden

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

195 files changed

+32828
-30646
lines changed

.devcontainer/devcontainer.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json",
3+
"name": "Apache Lucene",
4+
"service": "lucene",
5+
"features": {
6+
"ghcr.io/devcontainers/features/java:1": {
7+
"version": "25",
8+
"installMaven": "false",
9+
"installGradle": "false"
10+
}
11+
},
12+
"customizations": {
13+
"vscode": {
14+
"extensions": [
15+
"redhat.java",
16+
"editorconfig.editorconfig"
17+
],
18+
"settings": {
19+
"extensions.allowed": {
20+
"vscjava.vscode-java-pack": false,
21+
"vscjava.vscode-gradle": false,
22+
"*": true
23+
}
24+
}
25+
}
26+
},
27+
"updateContentCommand": "cd ${containerWorkspaceFolder} && ./gradlew eclipse"
28+
}

.github/actions/prepare-for-build/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ inputs:
1515
default: "temurin"
1616
description: "The default JDK distribution type"
1717

18+
use-cache:
19+
required: false
20+
default: true
21+
description: "Use setup-gradle for dependency caching"
22+
1823
runs:
1924
using: "composite"
2025
steps:
@@ -26,13 +31,15 @@ runs:
2631
java-package: jdk
2732

2833
- name: Cache gradle-wrapper.jar
34+
if: ${{ fromJSON(inputs.use-cache) }}
2935
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
3036
with:
3137
path: gradle/wrapper/gradle-wrapper.jar
3238
key: gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.jar.sha256') }}
3339

3440
# This includes "smart" caching of gradle dependencies.
3541
- name: Set up Gradle
42+
if: ${{ fromJSON(inputs.use-cache) }}
3643
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
3744
with:
3845
# increase expiry time for the temp. develocity token.

.github/workflows/actions.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ on:
1111
- main
1212
paths:
1313
- '.github/**'
14+
schedule:
15+
- cron: '22 2 * * *'
1416

1517
permissions: {}
1618

1719
jobs:
1820
actionlint:
1921
name: Run actionlint
2022
runs-on: ubuntu-latest
23+
timeout-minutes: 15
2124
steps:
2225
- name: Checkout repository
2326
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -30,6 +33,7 @@ jobs:
3033
zizmor:
3134
name: Run zizmor
3235
runs-on: ubuntu-latest
36+
timeout-minutes: 15
3337
permissions:
3438
security-events: write # integration with github advanced security
3539
steps:
@@ -43,8 +47,8 @@ jobs:
4347
run: uvx zizmor --pedantic --format=sarif . > results.sarif
4448
env:
4549
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
# TODO: offline checks only to avoid any rate-limiting issues, maybe enable nightly?
47-
ZIZMOR_OFFLINE: true
50+
# run offline for branches and PRs to avoid rate limits
51+
ZIZMOR_OFFLINE: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
4852
- name: Upload SARIF file
4953
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
5054
with:

.github/workflows/auto-format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
if: ${{ steps.initial-validation.outcome == 'failure' }}
125125
run: |
126126
echo "Fixing formatting issues and updating lock file..."
127-
./gradlew tidy writeLocks updateLicenses
127+
./gradlew tidy writeLocks writeChecksums
128128
129129
- name: Check if formatting fixes were made
130130
if: ${{ steps.initial-validation.outcome == 'failure' }}

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
name: Analyze (${{ matrix.language }})
1919
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
2020
runs-on: ubuntu-24.04
21+
timeout-minutes: 15
2122
permissions:
2223
security-events: write # integrate with Github Advanced Security
2324

.github/workflows/dependency-submission.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
dependency-submission:
1616
name: Submit gradle dependencies
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 15
1819
permissions:
1920
contents: write # see action's documentation
2021
steps:

.github/workflows/label-pull-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
pull-requests: write # manipulate existing labels
2727

2828
runs-on: ubuntu-latest
29+
timeout-minutes: 15
2930

3031
steps:
3132
- name: Run Labeler action

.github/workflows/mark-stale-PRs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
pull-requests: write # must comment/label PRs
2222
actions: write # must manipulate actions cache to split workload across multiple runs
2323

24+
timeout-minutes: 15
25+
2426
steps:
2527
- name: Run stale PR action
2628
uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10.1.0

.github/workflows/run-checks-gradle-upgrade.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,38 @@ env:
2525
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
2626

2727
jobs:
28+
gradleScriptBootstrapCheck:
29+
name: "Check gradle boostrap script sanity on old JVMs."
30+
timeout-minutes: 30
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
34+
with:
35+
distribution: 'temurin'
36+
java-version: 11
37+
java-package: jdk
38+
39+
- name: Checkout repository
40+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
41+
with:
42+
persist-credentials: false
43+
44+
- shell: bash
45+
run: |
46+
set +e
47+
output=$(./gradlew 2>&1)
48+
if [[ "$output" == *"ERROR: java version must be"* ]]; then
49+
echo "Passed."
50+
else
51+
echo "Something is not right: gradlew command returned suspicious output or status code on JDK 11"
52+
echo -e "gradlew output echoed below:\n\n$output\n\n---(end of output)"
53+
exit 1
54+
fi
55+
2856
gradleSanityCheck:
2957
name: "Run tasks (java: ${{ matrix.java-version }}, alt-java: ${{ matrix.uses-alt-java }})"
3058
timeout-minutes: 30
59+
needs: gradleScriptBootstrapCheck
3160

3261
strategy:
3362
matrix:
@@ -49,6 +78,7 @@ jobs:
4978
- uses: ./.github/actions/prepare-for-build
5079
with:
5180
java-version: ${{ matrix.java-version }}
81+
use-cache: false
5282

5383
- name: Set up RUNTIME_JAVA_HOME variable
5484
if: ${{ matrix.uses-alt-java }}
@@ -84,7 +114,7 @@ jobs:
84114
run: |
85115
# add this package for generateEmojiTokenizationTestChecksumLoad.
86116
sudo apt-get install libwww-perl
87-
./gradlew regenerate -x generateUAX29URLEmailTokenizerInternal --rerun-tasks
117+
./gradlew regenerate -x regenerateUAX29URLEmailTokenizer --rerun-tasks
88118
if [ ! -z "$(git status --porcelain)" ]; then
89119
echo ":warning: **regenerate left local checkout in modified state**" >> "$GITHUB_STEP_SUMMARY"
90120
echo '```' >> "$GITHUB_STEP_SUMMARY"
@@ -95,7 +125,7 @@ jobs:
95125
96126
- run: ./gradlew allOptions
97127
- run: ./gradlew helpWorkflow
98-
- run: ./gradlew licenses updateLicenses
128+
- run: ./gradlew licenses writeChecksums
99129
- run: ./gradlew check -x test
100130
- run: ./gradlew assembleRelease mavenToLocal
101131
- run: ./gradlew eclipse

.github/workflows/run-nightly-smoketester.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
java-version: [ '25' ]
2626

2727
runs-on: ${{ matrix.os }}
28+
timeout-minutes: 30
2829

2930
env:
3031
LUCENE_RELEASE_DIR: /tmp/lucene-release-dir
@@ -79,7 +80,7 @@ jobs:
7980
8081
- name: "Store smoke tester logs"
8182
if: ${{ always() }}
82-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
83+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
8384
with:
8485
name: smoke-tester-logs-jdk-${{ matrix.java-version }}
8586
path: |

0 commit comments

Comments
 (0)