Skip to content

Commit 1a22bda

Browse files
committed
debug loggign
1 parent 7a243db commit 1a22bda

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

step.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,28 @@ if [ -n "$UPLOAD_ID" ]; then
121121

122122
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
123123
echo "Fetching test status (attempt $((RETRY_COUNT + 1))/$MAX_RETRIES)..."
124+
echo "Running command: npx --yes \"$DCD_VERSION\" status --json --upload-id \"$UPLOAD_ID\" --api-key \"$api_key\" ${api_url:+--api-url \"$api_url\"}"
124125
STATUS_OUTPUT=$(npx --yes "$DCD_VERSION" status --json --upload-id "$UPLOAD_ID" --api-key "$api_key" ${api_url:+--api-url "$api_url"})
126+
STATUS_CODE=$?
125127

126-
if [ $? -eq 0 ] && [ -n "$STATUS_OUTPUT" ]; then
127-
# Status command succeeded and returned output
128+
echo "Status command exit code: $STATUS_CODE"
129+
echo "Status command output: $STATUS_OUTPUT"
130+
131+
if [ $STATUS_CODE -eq 0 ] && [ -n "$STATUS_OUTPUT" ]; then
132+
echo "Status command succeeded with valid output"
128133
break
134+
else
135+
if [ $STATUS_CODE -ne 0 ]; then
136+
echo "Status command failed with exit code $STATUS_CODE"
137+
fi
138+
if [ -z "$STATUS_OUTPUT" ]; then
139+
echo "Status command returned empty output"
140+
fi
129141
fi
130142

131143
RETRY_COUNT=$((RETRY_COUNT + 1))
132144
if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
133-
echo "Status not available yet, waiting ${RETRY_DELAY} seconds..."
145+
echo "Status not available yet, waiting ${RETRY_DELAY} seconds... ($RETRY_COUNT/$MAX_RETRIES attempts made)"
134146
sleep $RETRY_DELAY
135147
fi
136148
done

0 commit comments

Comments
 (0)