feat(apps/service-manager): Add logging output for service uptime checks (#23252)

This commit is contained in:
Yehonal
2025-10-16 11:30:04 +02:00
committed by GitHub
parent de9ef86a20
commit 4c3eab650c
2 changed files with 6 additions and 1 deletions

View File

@@ -131,7 +131,7 @@ function serialize_exec_definition() {
done
local args_json
args_json=$(printf '%s\0' "${rel_args[@]}" "__AC_SENTINEL__" | jq -R -s 'split("\u0000")[:-1]')
args_json=$(printf '%s\0' "${rel_args[@]}" | jq -R -s 'split("\u0000")[:-1]')
jq -n --arg command "$rel_command" --argjson args "$args_json" '{command: $command, args: $args}'
}
@@ -2291,6 +2291,9 @@ function wait_service_uptime() {
sleep 1
waited=$((waited + 1))
done
# show service logs for debugging
echo -e "${YELLOW}Service logs for '$service_name':${NC}"
service_logs "$service_name" true
echo -e "${RED}Timeout: $service_name did not reach ${min_seconds}s uptime within ${timeout}s${NC}" >&2
return 1
}