Skip to content

Commit 5d666b3

Browse files
committed
Merge remote-tracking branch 'upstream/master' into data-partition-config-by-database
2 parents b33725a + 7563ac8 commit 5d666b3

1,752 files changed

Lines changed: 53586 additions & 15060 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/workflows/cluster-it-1c1d.yml

Lines changed: 65 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,52 @@ env:
3030
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
3131

3232
jobs:
33-
Simple:
33+
# Ubuntu runs all ITs in a single job (already fast at ~49 min)
34+
Ubuntu:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- uses: actions/checkout@v5
39+
- name: Set up JDK
40+
uses: actions/setup-java@v5
41+
with:
42+
distribution: corretto
43+
java-version: 17
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
- name: Cache Maven packages
47+
uses: actions/cache@v5
48+
with:
49+
path: ~/.m2
50+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
51+
restore-keys: ${{ runner.os }}-m2-
52+
- name: Adjust Linux kernel somaxconn
53+
shell: bash
54+
run: sudo sysctl -w net.core.somaxconn=65535
55+
- name: IT/UT Test
56+
shell: bash
57+
run: |
58+
mvn clean verify \
59+
-P with-integration-tests \
60+
-DskipUTs \
61+
-DintegrationTest.forkCount=2 \
62+
-pl integration-test \
63+
-am
64+
- name: Upload Artifact
65+
if: failure()
66+
uses: actions/upload-artifact@v6
67+
with:
68+
name: standalone-log-Linux
69+
path: integration-test/target/cluster-logs
70+
retention-days: 1
71+
72+
# Windows is ~77% slower than Ubuntu, so split into 3 shards to parallelize
73+
Windows:
3474
strategy:
3575
fail-fast: false
36-
max-parallel: 15
3776
matrix:
38-
os: [ubuntu-latest, windows-latest]
39-
runs-on: ${{ matrix.os }}
77+
shard: [0, 1, 2]
78+
runs-on: windows-latest
4079

4180
steps:
4281
- uses: actions/checkout@v5
@@ -54,36 +93,47 @@ jobs:
5493
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
5594
restore-keys: ${{ runner.os }}-m2-
5695
- name: Adjust network dynamic TCP ports range
57-
if: ${{ runner.os == 'Windows' }}
5896
shell: pwsh
5997
run: |
6098
netsh int ipv4 set dynamicport tcp start=32768 num=32768
6199
netsh int ipv4 set dynamicport udp start=32768 num=32768
62100
netsh int ipv6 set dynamicport tcp start=32768 num=32768
63101
netsh int ipv6 set dynamicport udp start=32768 num=32768
64-
- name: Adjust Linux kernel somaxconn
65-
if: ${{ runner.os == 'Linux' }}
102+
- name: Build IT shard list
66103
shell: bash
67-
run: sudo sysctl -w net.core.somaxconn=65535
68-
# - name: Adjust Mac kernel somaxconn
69-
# if: ${{ runner.os == 'macOS' }}
70-
# shell: bash
71-
# run: sudo sysctl -w kern.ipc.somaxconn=65535
104+
# Distribute LocalStandaloneIT test classes across 3 shards using hash-mod assignment.
105+
# The list is written to a file so failsafe.includesFile can read it without command-line length limits.
106+
run: |
107+
set -euo pipefail
108+
SHARD=${{ matrix.shard }}
109+
TOTAL=3
110+
# Write outside the repo so Apache RAT (license check) doesn't flag the file.
111+
# Using a single grep -rl call instead of `find | xargs grep`: on Windows Git Bash,
112+
# ARG_MAX is small so xargs batches the file list, and any batch with no matches
113+
# makes grep exit 1, which makes xargs exit 123 and trips `set -o pipefail`.
114+
grep -rlE --include='*IT.java' '\bLocalStandaloneIT\b' integration-test/src/test/java \
115+
| awk -F'/' '{print $NF}' | sed 's/\.java$//' \
116+
| sort \
117+
| awk -v s=$SHARD -v t=$TOTAL 'NR%t==s' \
118+
> "$RUNNER_TEMP/it-shard.txt"
119+
echo "Shard $SHARD/$TOTAL contains $(wc -l < "$RUNNER_TEMP/it-shard.txt") test classes"
120+
head -5 "$RUNNER_TEMP/it-shard.txt"
72121
- name: IT/UT Test
73122
shell: bash
74-
# we do not compile client-cpp for saving time, it is tested in client.yml
75-
# we can skip influxdb-protocol because it has been tested separately in influxdb-protocol.yml
76123
run: |
77124
mvn clean verify \
78125
-P with-integration-tests \
79126
-DskipUTs \
80127
-DintegrationTest.forkCount=2 \
128+
-Dfailsafe.includesFile="$RUNNER_TEMP/it-shard.txt" \
129+
-DfailIfNoTests=false \
130+
-Dfailsafe.failIfNoSpecifiedTests=false \
81131
-pl integration-test \
82132
-am
83133
- name: Upload Artifact
84134
if: failure()
85135
uses: actions/upload-artifact@v6
86136
with:
87-
name: standalone-log-java${{ matrix.java }}-${{ runner.os }}
137+
name: standalone-log-Windows-shard${{ matrix.shard }}
88138
path: integration-test/target/cluster-logs
89139
retention-days: 1

.github/workflows/compile-check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,7 @@ jobs:
5353
shell: bash
5454
run: |
5555
mvn clean package -P with-integration-tests -DskipTests -ntp
56+
- name: Compiler Test (Chinese i18n)
57+
shell: bash
58+
run: |
59+
mvn clean package -P with-integration-tests,with-zh-locale -DskipTests -ntp

.github/workflows/multi-language-client.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
fail-fast: false
4646
max-parallel: 15
4747
matrix:
48-
os: [ubuntu-22.04, ubuntu-24.04, windows-2022, windows-latest, windows-2025-vs2026, macos-latest]
48+
os: [ubuntu-22.04, ubuntu-24.04, windows-2022, windows-2025-vs2026, macos-latest]
4949
runs-on: ${{ matrix.os}}
5050

5151
steps:

0 commit comments

Comments
 (0)