Skip to content

Commit 9625e56

Browse files
committed
master merged
2 parents 16735f3 + e2af664 commit 9625e56

3,934 files changed

Lines changed: 167615 additions & 188719 deletions

File tree

Some content is hidden

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

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ updates:
55
schedule:
66
interval: "daily"
77
open-pull-requests-limit: 20
8+
cooldown:
9+
# Protect against not-yet-discovered regressions or security issues in new releases of dependencies
10+
# https://github.blog/changelog/2025-07-01-dependabot-supports-configuration-of-a-minimum-package-age/
11+
default-days: 14
812
ignore:
913
# pin ZooKeeper dependencies to 3.5.x
1014
- dependency-name: "org.apache.zookeeper"

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
'Area - Batch Ingestion':
2424
- changed-files:
2525
- any-glob-to-any-file:
26-
- 'indexing-hadoop/**'
2726
- 'multi-stage-query/**'
2827

2928
'Area - Dependencies':

.github/scripts/analyze_dependencies_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#!bin/bash
1717

18-
${MVN} ${MAVEN_SKIP} dependency:analyze -DoutputXML=true -DignoreNonCompile=true -DfailOnWarning=true ||
18+
mvn -B dependency:analyze -DoutputXML=true -DignoreNonCompile=true -DfailOnWarning=true ||
1919
{ echo "
2020
The dependency analysis has found a dependency that is either:
2121
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/bin/bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
set -e
19+
20+
get_milestone_number() {
21+
local milestone_title="$1"
22+
local number=$(gh api "repos/$REPOSITORY/milestones" --jq ".[] | select(.title==\"$milestone_title\") | .number")
23+
24+
if [ -z "$number" ]; then
25+
echo "Creating milestone: $milestone_title"
26+
number=$(gh api "repos/$REPOSITORY/milestones" -f title="$milestone_title" --jq '.number')
27+
fi
28+
29+
echo "$number"
30+
}
31+
32+
create_backport_issue() {
33+
local pr_number="$1"
34+
local pr_title="$2"
35+
local target_milestone="$3"
36+
37+
local milestone_number=$(get_milestone_number "$target_milestone")
38+
local message="Backport #$pr_number to release branch for version $target_milestone"
39+
local note="Add the \`approved\` label to start the automatic backport process."
40+
local body=$(jq -n --arg source_pr "$pr_number" --arg target_version "$target_milestone" --arg message "$message" --arg note "$note" '$ARGS.named')
41+
42+
gh api "repos/$REPOSITORY/issues" \
43+
-f title="[$target_milestone] $pr_title" \
44+
-f body="$body" \
45+
-f milestone="$milestone_number" \
46+
-f labels[]="backport" \
47+
--jq '.number'
48+
}
49+
50+
if [ "$#" -ne 2 ]; then
51+
echo "Usage: $0 <pr_number> <repository>"
52+
echo "Example: $0 12345 apache/druid"
53+
exit 1
54+
fi
55+
56+
PR_NUMBER="$1"
57+
REPOSITORY="$2"
58+
59+
VERSION=$(xmllint --xpath "/*[local-name()='project']/*[local-name()='version']/text()" pom.xml | sed 's/-SNAPSHOT//')
60+
61+
if [ -z "$VERSION" ]; then
62+
echo "Error: Could not extract version from pom.xml"
63+
exit 1
64+
fi
65+
66+
echo "Extracted version: $VERSION"
67+
68+
EXISTING_MILESTONE=$(gh api "repos/$REPOSITORY/issues/$PR_NUMBER" --jq '.milestone.title // empty')
69+
70+
if [ -n "$EXISTING_MILESTONE" ] && [ "$EXISTING_MILESTONE" != "$VERSION" ]; then
71+
echo "PR #$PR_NUMBER has milestone $EXISTING_MILESTONE, but should be $VERSION"
72+
73+
PR_TITLE=$(gh api "repos/$REPOSITORY/issues/$PR_NUMBER" --jq '.title')
74+
BACKPORT_ISSUE=$(create_backport_issue "$PR_NUMBER" "$PR_TITLE" "$EXISTING_MILESTONE")
75+
76+
echo "Created backport issue #$BACKPORT_ISSUE for milestone $EXISTING_MILESTONE"
77+
elif [ -n "$EXISTING_MILESTONE" ]; then
78+
echo "PR #$PR_NUMBER already has correct milestone: $EXISTING_MILESTONE"
79+
exit 0
80+
fi
81+
82+
MILESTONE_NUMBER=$(get_milestone_number "$VERSION")
83+
84+
echo "Adding PR #$PR_NUMBER to milestone $VERSION"
85+
gh api "repos/$REPOSITORY/issues/$PR_NUMBER" -f milestone="$MILESTONE_NUMBER" -X PATCH
86+
echo "Successfully added PR #$PR_NUMBER to milestone $VERSION"

.github/scripts/backport-pr.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
set -e
19+
20+
if [ "$#" -lt 3 ] || [ "$#" -gt 4 ]; then
21+
echo "Usage: $0 <commit_hash> <target_branch> <pr_title> [body]"
22+
echo "Example: $0 abc123def456 37.0.0 'Fix bug in query engine' '{\"backport_issue\": \"12345\"}'"
23+
exit 1
24+
fi
25+
26+
COMMIT_HASH="$1"
27+
TARGET_BRANCH="$2"
28+
PR_TITLE="$3"
29+
BODY="${4:-Automatic backport to $TARGET_BRANCH}"
30+
31+
BACKPORT_BRANCH="backport-$COMMIT_HASH-to-$TARGET_BRANCH"
32+
33+
git fetch origin "$TARGET_BRANCH"
34+
git checkout -b "$BACKPORT_BRANCH" "origin/$TARGET_BRANCH"
35+
git cherry-pick -x "$COMMIT_HASH"
36+
git push origin "$BACKPORT_BRANCH"
37+
38+
gh pr create \
39+
--base "$TARGET_BRANCH" \
40+
--head "$BACKPORT_BRANCH" \
41+
--title "$PR_TITLE" \
42+
--body "$BODY" \
43+
--label "backport"

.github/scripts/collect_jstacks

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#--------------------------------------------------------------------
18+
19+
echo "@ capturing jvm diagnostics every minute for all java processes" >&2
20+
21+
mkdir -p target/ci-debug
22+
23+
while :;do
24+
sleep 60
25+
t=`date +%s`
26+
echo "@ capturing jvm diagnostics $t" >&2
27+
pgrep java | while read pid;do
28+
jstack $pid > target/ci-debug/jstack.$pid.$t
29+
jcmd $pid GC.heap_info > target/ci-debug/heap.$pid.$t 2>&1
30+
done
31+
done

.github/scripts/license_checks_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
set -e
1919

2020
./.github/scripts/setup_generate_license.sh
21-
${MVN} apache-rat:check -Prat --fail-at-end \
21+
mvn -B apache-rat:check -Prat --fail-at-end \
2222
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
2323
-Drat.consoleOutput=true
2424
# Generate dependency reports and checks they are valid.

.github/scripts/openrewrite.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
set -e
19+
set -x
20+
21+
export MAVEN_OPTS=-Xmx8g
22+
23+
echo 'Running Maven install...'
24+
mvn -B clean install -q -ff -pl '!distribution' -P skip-tests -Dweb.console.skip=true -T1C
25+
mvn -B install -q -ff -pl 'distribution' -P skip-tests -Dweb.console.skip=true
26+
27+
mvn -B rewrite:dryRun -Dweb.console.skip=true

.github/scripts/packaging-check.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
set -e
19+
set -x
20+
21+
./.github/scripts/setup_generate_license.sh
22+
mvn -B clean install -Prat --fail-at-end \
23+
-pl '!benchmarks, !distribution' -P skip-tests -Dweb.console.skip=false -T1C
24+
mvn -B install -Prat -Pdist -Pbundle-contrib-exts --fail-at-end \
25+
-pl 'distribution' -P skip-tests -Dweb.console.skip=false -T1C

0 commit comments

Comments
 (0)