Skip to content

Commit 714d252

Browse files
committed
fix(action): Increase default wait timeout and improve logging
The default wait timeout for the test node to become ready has been increased from 90 seconds to 150 seconds to address intermittent failures due to slow startup times. The logging has also been improved to include the HTTP status code in the connection failure message and to show the final 500 lines of container logs after successful startup. This provides more detailed information for debugging and troubleshooting.
1 parent 5ad3678 commit 714d252

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

action.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ inputs:
2424
wait-timeout:
2525
description: 'Timeout in seconds to wait for test node to be ready'
2626
required: false
27-
default: '90'
27+
default: '150'
2828

2929
registry:
3030
description: 'Container registry to use'
@@ -190,15 +190,15 @@ runs:
190190
http_code=$(echo "$response" | grep -o "HTTP_CODE:[0-9]*" | cut -d: -f2)
191191
response_body=$(echo "$response" | sed "s/HTTP_CODE:[0-9]*//")
192192
193-
if [ -n "$http_code" ]; then
193+
if [ -n "$http_code" ] && [ "$http_code" != "000" ]; then
194194
echo "Response: HTTP $http_code"
195195
if [ -n "$response_body" ]; then
196196
echo "Body: $response_body"
197197
fi
198198
echo "✅ DeviceLab test node is ready!"
199199
break
200200
else
201-
echo "❌ Connection failed - test node not responding yet"
201+
echo "❌ Connection failed - test node not responding yet (HTTP $http_code)"
202202
fi
203203
204204
echo "Still waiting... ($(( $(date +%s) - '"$start_time"' ))s elapsed)"
@@ -224,6 +224,11 @@ runs:
224224
echo "- Check container logs above for specific error messages"
225225
exit 1
226226
}
227+
228+
# Show final container logs after successful startup
229+
echo ""
230+
echo "📋 DeviceLab test node startup logs:"
231+
docker logs --tail 500 "$CONTAINER_NAME" || echo "Failed to get container logs"
227232
228233
- name: Set test node information
229234
id: test-node-info
@@ -233,7 +238,6 @@ runs:
233238
echo "container-name=$CONTAINER_NAME" >> $GITHUB_OUTPUT
234239
echo "✅ DeviceLab test node is running at http://localhost:${{ inputs.test-node-port }}"
235240
236-
237241
branding:
238242
icon: 'smartphone'
239243
color: 'blue'

0 commit comments

Comments
 (0)