From f05e738dc197fd64d520c4bd39939b0b1ab46f28 Mon Sep 17 00:00:00 2001 From: Kaelem Chandra Date: Wed, 14 Jan 2026 12:09:21 +0800 Subject: [PATCH 1/5] Logs galore --- .devcontainer/onCreate.sh | 24 +++++++++++++++++++++++- .devcontainer/postAttach.sh | 1 + .devcontainer/postCreate.sh | 11 +++++++++++ .devcontainer/utils.sh | 5 +++++ 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.devcontainer/onCreate.sh b/.devcontainer/onCreate.sh index 461c157..9087231 100755 --- a/.devcontainer/onCreate.sh +++ b/.devcontainer/onCreate.sh @@ -1,15 +1,37 @@ #!/bin/bash source .devcontainer/utils.sh +log "SYSTEM INFO:" echo "System has $(nproc) CPUs" + +log "MEMORY:" free -m +log "DISK: df -h" +df -h + +log "DISK: lsblk" +lsblk + +log "Waiting for docker" +T_START=$(date +%s) + ensure-docker-is-ready +T_END=$(date +%s) +log "Docker is ready. Took $((T_END-T_START)) seconds." + +log "Creating k3d cluster" +T_START=$(date +%s) + # start the k3d cluster k3d cluster create eda-demo \ --image rancher/k3s:v1.34.1-k3s1 \ --k3s-arg "--disable=traefik@server:*" \ --volume "$HOME/.images.txt:/opt/images.txt@server:*" \ --port "9443:443" \ - --port "9400-9410:9400-9410" \ No newline at end of file + --port "9400-9410:9400-9410" + +T_END=$(date +%s) +log "K3d cluster is ready. Took $((T_END-T_START)) seconds." + diff --git a/.devcontainer/postAttach.sh b/.devcontainer/postAttach.sh index ed1d11d..a8886b7 100755 --- a/.devcontainer/postAttach.sh +++ b/.devcontainer/postAttach.sh @@ -1,4 +1,5 @@ #!/bin/bash +source .devcontainer/utils.sh printf " \033[38;2;255;124;88m⢀\033[38;2;255;218;152m⢀\033[38;2;255;115;123m⡄\033[38;2;255;197;123m⣠\033[38;2;255;179;106m⣦\033[38;2;252;111;48m⣴\033[38;2;255;195;123m⣎\033[38;2;255;197;129m⣤\033[38;2;255;197;128m⠖\033[38;2;255;170;142m⢀\033[38;2;255;136;135m⡀\033[0m \033[0m diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index df64d97..6256e8b 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -9,9 +9,20 @@ prefix=$(printf '%s' 'Z2hwCg==' | base64 -d) suffix=$(printf '%s' "$encoded" | base64 -d | cut -c 4- | tr -d '\n') TOKEN="${prefix}${suffix}" +log "Starting image prepull" +T_START=$(date +%s) # preload images into the cluster from the EDA core list # to reduce the number of jobs: PARALLEL_JOBS=$(($(nproc) - 1)) PARALLEL_JOBS=$(nproc) docker exec k3d-eda-demo-server-0 sh -c "cat /opt/images.txt | xargs -P $PARALLEL_JOBS -I {} crictl pull --creds nokia-eda-bot:$TOKEN {}" +T_END=$(date +%s) +log "Images pulled. Took $((T_END-T_START)) seconds." + +log "Starting TRY EDA" +T_START=$(date +%s) + make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda NO_KIND=yes NO_LB=yes KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE + +T_END=$(date +%s) +log "TRY EDA done. Took $((T_END-T_START)) seconds." \ No newline at end of file diff --git a/.devcontainer/utils.sh b/.devcontainer/utils.sh index db3cac8..e243d20 100644 --- a/.devcontainer/utils.sh +++ b/.devcontainer/utils.sh @@ -6,4 +6,9 @@ function ensure-docker-is-ready { sleep 1 done echo "Docker is ready" +} + +function log { + local msg="${1:-}" + echo "[$(date '+%Y-%m-%d %H:%M:%S')] $msg" } \ No newline at end of file From 6b60722f6833426d81162cbf228478e0ec584a8e Mon Sep 17 00:00:00 2001 From: Kaelem Chandra Date: Wed, 14 Jan 2026 12:12:37 +0800 Subject: [PATCH 2/5] Use correct devc image --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4ffd8cc..a244bb6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Nokia EDA in GitHub Codespaces", - "image": "ghcr.io/eda-labs/codespaces/base:main", + "image": "ghcr.io/eda-labs/codespaces/base:logging-and-other", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": { "version": "latest", From 5201ac84e2b78edca4eff3f2340e056604b5613b Mon Sep 17 00:00:00 2001 From: Kaelem Chandra Date: Wed, 14 Jan 2026 12:33:21 +0800 Subject: [PATCH 3/5] brains in postAttach --- .devcontainer/onCreate.sh | 12 +----------- .devcontainer/postAttach.sh | 10 ++++++++-- .devcontainer/utils.sh | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.devcontainer/onCreate.sh b/.devcontainer/onCreate.sh index 9087231..795367b 100755 --- a/.devcontainer/onCreate.sh +++ b/.devcontainer/onCreate.sh @@ -1,17 +1,7 @@ #!/bin/bash source .devcontainer/utils.sh -log "SYSTEM INFO:" -echo "System has $(nproc) CPUs" - -log "MEMORY:" -free -m - -log "DISK: df -h" -df -h - -log "DISK: lsblk" -lsblk +dump_system_info log "Waiting for docker" T_START=$(date +%s) diff --git a/.devcontainer/postAttach.sh b/.devcontainer/postAttach.sh index a8886b7..16427f8 100755 --- a/.devcontainer/postAttach.sh +++ b/.devcontainer/postAttach.sh @@ -1,6 +1,8 @@ #!/bin/bash source .devcontainer/utils.sh +if check_eda_api_reachability; then + clear printf " \033[38;2;255;124;88m⢀\033[38;2;255;218;152m⢀\033[38;2;255;115;123m⡄\033[38;2;255;197;123m⣠\033[38;2;255;179;106m⣦\033[38;2;252;111;48m⣴\033[38;2;255;195;123m⣎\033[38;2;255;197;129m⣤\033[38;2;255;197;128m⠖\033[38;2;255;170;142m⢀\033[38;2;255;136;135m⡀\033[0m \033[0m \033[38;2;255;167;7m⢠\033[38;2;252;185;65m⣤\033[38;2;253;143;93m⣿\033[38;2;252;195;143m⣿\033[38;2;246;128;79m⣿\033[38;2;229;121;83m⣿\033[38;2;244;150;123m⣿\033[38;2;244;164;137m⣿\033[38;2;243;170;132m⣿\033[38;2;253;183;152m⣶\033[38;2;255;162;126m⣿\033[38;2;255;81;63m⣯\033[38;2;255;131;41m⣴\033[38;2;254;122;52m⡶\033[38;2;255;75;14m⠂\033[0m \033[0m @@ -13,5 +15,9 @@ source .devcontainer/utils.sh \033[38;2;136;239;251m⠭\033[38;2;98;228;253m⢿\033[38;2;40;200;254m⣿\033[38;2;52;178;245m⣿\033[38;2;6;82;178m⣿\033[38;2;26;44;115m⣿\033[38;2;50;37;110m⣿\033[38;2;30;4;41m⣿\033[38;2;133;11;57m⣿\033[38;2;12;20;68m⠋\033[38;2;17;0;32m⡏\033[38;2;16;0;30m⠈\033[0m \033[0m \033[38;2;109;240;255m⠉\033[38;2;105;231;245m⠛\033[38;2;24;75;129m⠉\033[38;2;44;12;58m⠙\033[38;2;55;26;87m⠋\033[38;2;15;0;29m⠘\033[38;2;16;0;31m⠁\033[38;2;16;0;29m⠉\033[0m \033[0m " -echo " - ⚡ EDA UI: https://${CODESPACE_NAME}-${EDA_PORT}.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}" \ No newline at end of file + echo " + ⚡ EDA UI: https://${CODESPACE_NAME}-${EDA_PORT}.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}" +else + log "Unable to reach EDA API server. Dumping system info" + dump_system_info +fi \ No newline at end of file diff --git a/.devcontainer/utils.sh b/.devcontainer/utils.sh index e243d20..f0d1c37 100644 --- a/.devcontainer/utils.sh +++ b/.devcontainer/utils.sh @@ -11,4 +11,23 @@ function ensure-docker-is-ready { function log { local msg="${1:-}" echo "[$(date '+%Y-%m-%d %H:%M:%S')] $msg" +} + +function check_eda_api_reachability { + log "Checking EDA API reachability" + curl -vf --retry 3 "https://127.0.0.1$EDA_PORT" -o /dev/null +} + +function dump_system_info { + log "SYSTEM INFO: nproc" + echo "System has $(nproc) CPUs" + + log "MEMORY: free -m" + free -m + + log "DISK: df -h" + df -h + + log "DISK: lsblk" + lsblk } \ No newline at end of file From 727db526119629d2b11d82e53fae9264a21b1fcd Mon Sep 17 00:00:00 2001 From: Kaelem Chandra Date: Wed, 14 Jan 2026 14:22:09 +0800 Subject: [PATCH 4/5] Fat fingered it --- .devcontainer/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/utils.sh b/.devcontainer/utils.sh index f0d1c37..527c166 100644 --- a/.devcontainer/utils.sh +++ b/.devcontainer/utils.sh @@ -15,7 +15,7 @@ function log { function check_eda_api_reachability { log "Checking EDA API reachability" - curl -vf --retry 3 "https://127.0.0.1$EDA_PORT" -o /dev/null + curl -vf --retry 3 "https://127.0.0.1:$EDA_PORT" -o /dev/null } function dump_system_info { From a3af5b1c8cb38b9425e99d4093db99058a93ca0a Mon Sep 17 00:00:00 2001 From: Kaelem Chandra Date: Wed, 14 Jan 2026 14:40:03 +0800 Subject: [PATCH 5/5] SSL shit --- .devcontainer/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/utils.sh b/.devcontainer/utils.sh index 527c166..0a0aee1 100644 --- a/.devcontainer/utils.sh +++ b/.devcontainer/utils.sh @@ -15,7 +15,7 @@ function log { function check_eda_api_reachability { log "Checking EDA API reachability" - curl -vf --retry 3 "https://127.0.0.1:$EDA_PORT" -o /dev/null + curl -vkf --retry 3 "https://127.0.0.1:$EDA_PORT" -o /dev/null } function dump_system_info {