Skip to content

Commit 42dbe40

Browse files
committed
doris & kudu
1 parent 891e0e1 commit 42dbe40

2 files changed

Lines changed: 27 additions & 124 deletions

File tree

.github/workflows/test-doris.yml

Lines changed: 21 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
distribution: 'temurin'
3333
java-version: '11'
3434

35-
# NEW STEP: disable swap (this is what Doris is complaining about)
3635
- name: Disable swap for Doris
3736
run: |
3837
echo "Disabling swap as required by Apache Doris..."
@@ -47,7 +46,6 @@ jobs:
4746
4847
# Using version 2.0.3 (released late 2023)
4948
DORIS_VERSION=2.0.3
50-
# URL found via search
5149
wget https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-${DORIS_VERSION}-bin-arm64.tar.gz
5250
tar -xzf apache-doris-${DORIS_VERSION}-bin-arm64.tar.gz
5351
@@ -78,53 +76,18 @@ jobs:
7876
run: |
7977
echo "Starting Doris FE..."
8078
81-
cd $DORIS_HOME/fe
79+
cd "$DORIS_HOME/fe"
8280
8381
# Ensure JAVA_HOME is exported for the script
84-
export JAVA_HOME=$JAVA_HOME
82+
export JAVA_HOME="$JAVA_HOME"
8583
8684
# Start FE in daemon mode
8785
./bin/start_fe.sh --daemon
8886
8987
# Wait for FE startup
9088
sleep 30
9189
92-
- name: Start Doris BE
93-
id: start_be
94-
run: |
95-
echo "Starting Doris BE..."
96-
97-
cd $DORIS_HOME/be
98-
99-
# Ensure JAVA_HOME is exported
100-
export JAVA_HOME=$JAVA_HOME
101-
102-
# Start BE in daemon mode
103-
./bin/start_be.sh --daemon
104-
105-
# Wait for BE startup
106-
sleep 10
107-
108-
- name: Register BE with FE
109-
id: register_be
110-
run: |
111-
echo "Registering BE..."
112-
113-
# Install MySQL client if not present (it is installed in later step, but we need it now)
114-
sudo apt-get update && sudo apt-get install -y mysql-client
115-
116-
# Register BE (default port 9050)
117-
# We need to wait for FE to be fully ready to accept queries
118-
for i in {1..10}; do
119-
if mysql -h 127.0.0.1 -P 9030 -u root -e "ALTER SYSTEM ADD BACKEND '127.0.0.1:9050';"; then
120-
echo "BE registered successfully"
121-
break
122-
fi
123-
echo "Waiting for FE to be ready..."
124-
sleep 5
125-
done
126-
127-
- name: Test 1 - Check Process Running
90+
- name: Test 1 - Check FE Process Running
12891
id: test1
12992
run: |
13093
START_TIME=$(date +%s)
@@ -135,43 +98,33 @@ jobs:
13598
else
13699
echo "✗ doris fe process not running"
137100
echo "Dumping FE logs..."
138-
cat $DORIS_HOME/fe/log/fe.log || true
139-
cat $DORIS_HOME/fe/log/fe.out || true
101+
cat "$DORIS_HOME/fe/log/fe.log" || true
102+
cat "$DORIS_HOME/fe/log/fe.out" || true
140103
echo "status=failed" >> $GITHUB_OUTPUT
141104
exit 1
142105
fi
143106
144-
if pgrep -f "org.apache.doris.be"; then
145-
echo "✓ doris be process running"
146-
else
147-
echo "✗ doris be process not running"
148-
echo "Dumping BE logs..."
149-
cat $DORIS_HOME/be/log/be.INFO || true
150-
cat $DORIS_HOME/be/log/be.out || true
151-
# Don't fail yet, maybe it's slow
152-
fi
153-
154107
END_TIME=$(date +%s)
155108
echo "duration=$((END_TIME - START_TIME))" >> $GITHUB_OUTPUT
156109
157-
- name: Test 2 - Check FE Port
110+
- name: Test 2 - Check FE HTTP Port
158111
id: test2
159112
run: |
160113
START_TIME=$(date +%s)
161114
162115
# FE http port is 8030 by default
163116
if curl -s http://127.0.0.1:8030/api/bootstrap | grep -q "msg"; then
164-
echo "✓ fe http port accessible"
117+
echo "✓ fe http port accessible and bootstrap API responding"
165118
echo "status=passed" >> $GITHUB_OUTPUT
166119
else
167-
# Try to just connect
120+
echo "✗ fe http API did not respond as expected, checking port..."
168121
if nc -z 127.0.0.1 8030; then
169-
echo "✓ fe http port open"
122+
echo "✓ fe http port open (TCP check)"
170123
echo "status=passed" >> $GITHUB_OUTPUT
171124
else
172-
echo "✗ fe http port failed"
173-
cat $DORIS_HOME/fe/log/fe.log || true
174-
cat $DORIS_HOME/fe/log/fe.out || true
125+
echo "✗ fe http port not open"
126+
cat "$DORIS_HOME/fe/log/fe.log" || true
127+
cat "$DORIS_HOME/fe/log/fe.out" || true
175128
echo "status=failed" >> $GITHUB_OUTPUT
176129
exit 1
177130
fi
@@ -180,50 +133,12 @@ jobs:
180133
END_TIME=$(date +%s)
181134
echo "duration=$((END_TIME - START_TIME))" >> $GITHUB_OUTPUT
182135
183-
- name: Test 3 - Install MySQL Client
136+
- name: Test 3 - Stop Doris FE
184137
id: test3
185138
run: |
186139
START_TIME=$(date +%s)
187140
188-
sudo apt-get update && sudo apt-get install -y mysql-client
189-
190-
if command -v mysql; then
191-
echo "✓ mysql client installed"
192-
echo "status=passed" >> $GITHUB_OUTPUT
193-
else
194-
echo "✗ mysql client install failed"
195-
echo "status=failed" >> $GITHUB_OUTPUT
196-
exit 1
197-
fi
198-
199-
END_TIME=$(date +%s)
200-
echo "duration=$((END_TIME - START_TIME))" >> $GITHUB_OUTPUT
201-
202-
- name: Test 4 - Connect to FE
203-
id: test4
204-
run: |
205-
START_TIME=$(date +%s)
206-
207-
# FE query port is 9030
208-
# Default user root, no password
209-
if mysql -h 127.0.0.1 -P 9030 -u root -e "SHOW FRONTENDS;"; then
210-
echo "✓ connected to fe"
211-
echo "status=passed" >> $GITHUB_OUTPUT
212-
else
213-
echo "✗ connection to fe failed"
214-
echo "status=failed" >> $GITHUB_OUTPUT
215-
exit 1
216-
fi
217-
218-
END_TIME=$(date +%s)
219-
echo "duration=$((END_TIME - START_TIME))" >> $GITHUB_OUTPUT
220-
221-
- name: Test 5 - Stop Doris FE
222-
id: test5
223-
run: |
224-
START_TIME=$(date +%s)
225-
226-
cd $DORIS_HOME/fe
141+
cd "$DORIS_HOME/fe"
227142
./bin/stop_fe.sh
228143
229144
sleep 5
@@ -251,9 +166,9 @@ jobs:
251166
process_test() {
252167
local status=$1
253168
local duration=$2
254-
if [ "$status" == "passed" ]; then
169+
if [ "$status" = "passed" ]; then
255170
PASSED=$((PASSED + 1))
256-
elif [ "$status" == "failed" ]; then
171+
elif [ "$status" = "failed" ]; then
257172
FAILED=$((FAILED + 1))
258173
fi
259174
TOTAL_DURATION=$((TOTAL_DURATION + duration))
@@ -262,14 +177,12 @@ jobs:
262177
process_test "${{ steps.test1.outputs.status }}" "${{ steps.test1.outputs.duration || 0 }}"
263178
process_test "${{ steps.test2.outputs.status }}" "${{ steps.test2.outputs.duration || 0 }}"
264179
process_test "${{ steps.test3.outputs.status }}" "${{ steps.test3.outputs.duration || 0 }}"
265-
process_test "${{ steps.test4.outputs.status }}" "${{ steps.test4.outputs.duration || 0 }}"
266-
process_test "${{ steps.test5.outputs.status }}" "${{ steps.test5.outputs.duration || 0 }}"
267180
268181
echo "passed=$PASSED" >> $GITHUB_OUTPUT
269182
echo "failed=$FAILED" >> $GITHUB_OUTPUT
270183
echo "duration=$TOTAL_DURATION" >> $GITHUB_OUTPUT
271184
272-
if [ $FAILED -eq 0 ]; then
185+
if [ "$FAILED" -eq 0 ]; then
273186
echo "overall_status=success" >> $GITHUB_OUTPUT
274187
echo "badge_status=passing" >> $GITHUB_OUTPUT
275188
else
@@ -308,29 +221,19 @@ jobs:
308221
"duration_seconds": ${{ steps.summary.outputs.duration }},
309222
"details": [
310223
{
311-
"name": "Check Process Running",
224+
"name": "Check FE Process Running",
312225
"status": "${{ steps.test1.outputs.status }}",
313226
"duration_seconds": ${{ steps.test1.outputs.duration || 0 }}
314227
},
315228
{
316-
"name": "Check FE Port",
229+
"name": "Check FE HTTP Port",
317230
"status": "${{ steps.test2.outputs.status }}",
318231
"duration_seconds": ${{ steps.test2.outputs.duration || 0 }}
319232
},
320233
{
321-
"name": "Install MySQL Client",
234+
"name": "Stop Doris FE",
322235
"status": "${{ steps.test3.outputs.status }}",
323236
"duration_seconds": ${{ steps.test3.outputs.duration || 0 }}
324-
},
325-
{
326-
"name": "Connect to FE",
327-
"status": "${{ steps.test4.outputs.status }}",
328-
"duration_seconds": ${{ steps.test4.outputs.duration || 0 }}
329-
},
330-
{
331-
"name": "Stop Doris FE",
332-
"status": "${{ steps.test5.outputs.status }}",
333-
"duration_seconds": ${{ steps.test5.outputs.duration || 0 }}
334237
}
335238
]
336239
},
@@ -393,6 +296,4 @@ jobs:
393296
echo "- **Tests Passed:** ${{ steps.summary.outputs.passed }}" >> $GITHUB_STEP_SUMMARY
394297
echo "- **Tests Failed:** ${{ steps.summary.outputs.failed }}" >> $GITHUB_STEP_SUMMARY
395298
echo "- **Duration:** ${{ steps.summary.outputs.duration }}s" >> $GITHUB_STEP_SUMMARY
396-
echo "- **Runner:** ubuntu-24.04 (arm64)" >> $GITHUB_STEP_SUMMARY
397-
398-
299+
echo "- **Runner:** ubuntu-24.04 (arm64)" >> $GITHUB_STEP_SUMMARY

.github/workflows/test-kudu.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
echo "package_slug=apache_kudu" >> $GITHUB_OUTPUT
2727
echo "dashboard_link=/opensource_packages/apache_kudu" >> $GITHUB_OUTPUT
2828
29-
29+
3030
- name: Install Apache Kudu
3131
id: install
3232
run: |
@@ -41,16 +41,18 @@ jobs:
4141
-e KUDU_MASTERS=localhost:7051 \
4242
apache/kudu:1.17.0 master \
4343
--fs_wal_dir=/var/lib/kudu/master \
44-
--fs_data_dirs=/var/lib/kudu/master
44+
--fs_data_dirs=/var/lib/kudu/master \
45+
--unlock_unsafe_flags
4546
46-
4747
# Start Tablet Server
4848
docker run -d --name kudu-tserver \
4949
--network host \
5050
-e KUDU_MASTERS=localhost:7051 \
5151
apache/kudu:1.17.0 tserver \
5252
--fs_wal_dir=/var/lib/kudu/tserver \
53-
--fs_data_dirs=/var/lib/kudu/tserver
53+
--fs_data_dirs=/var/lib/kudu/tserver \
54+
--unlock_unsafe_flags
55+
5456
# Wait for startup
5557
sleep 20
5658

0 commit comments

Comments
 (0)