Compare commits

..

11 Commits

Author SHA1 Message Date
Cian Johnston 1dbdad101d unset errexit 2026-01-07 16:35:29 +00:00
Cian Johnston 2ecdbddf8f also log elapsed time 2026-01-07 16:31:02 +00:00
Cian Johnston fa8147e1bb also check for boundary pid 2026-01-07 16:29:57 +00:00
Cian Johnston 4aa4448d81 check for agentapi pid 2026-01-07 16:29:23 +00:00
Cian Johnston 3829a20756 even more wait 2026-01-07 16:27:41 +00:00
Cian Johnston 15a16f279b bump agentapi start timeout 2026-01-07 16:21:04 +00:00
Cian Johnston a6aca54728 even more debug output 2026-01-07 16:16:13 +00:00
Cian Johnston b2c1ff0770 also debug agentapi-start.sh 2026-01-07 16:12:45 +00:00
Cian Johnston 41e86b8715 fixup! fixup agentapi module source 2026-01-07 15:57:15 +00:00
Cian Johnston 4f22907ed4 fixup agentapi module source 2026-01-07 15:56:37 +00:00
Cian Johnston 65ccc6ff48 agentapi: make agentapi-wait-for-start.sh noisy 2026-01-07 15:47:41 +00:00
5 changed files with 29 additions and 13 deletions
@@ -1,6 +1,7 @@
#!/bin/bash
set -o errexit
#set -o errexit
set -o pipefail
set -x
port=${1:-3284}
@@ -10,18 +11,30 @@ port=${1:-3284}
agentapi_started=false
echo "Waiting for agentapi server to start on port $port..."
for i in $(seq 1 150); do
for j in $(seq 1 3); do
sleep 0.1
if curl -fs -o /dev/null "http://localhost:$port/status"; then
echo "agentapi response received ($j/3)"
start=$(date +%s)
while true; do
if curl -f "http://localhost:$port/status"; then
agentapi_started=true
elapsed=$(($(date +%s) - start))
echo "$(date): agentapi server started after $elapsed seconds"
break
else
echo "agentapi server not responding ($i/15)"
continue 2
echo "$(date): agentapi server not responding"
agentapi_pid=$(pidof agentapi)
if [ -z "$agentapi_pid" ]; then
echo "$(date): agentapi process not found"
else
echo "$(date): agentapi pid: $agentapi_pid"
fi
boundary_pid=$(pidof boundary)
if [ -z "$boundary_pid" ]; then
echo "$(date): boundary process not found"
else
echo "$(date): boundary pid: $boundary_pid"
fi
sleep 1
continue
fi
done
agentapi_started=true
break
done
if [ "$agentapi_started" != "true" ]; then
@@ -1,6 +1,7 @@
#!/bin/bash
set -o errexit
set -o pipefail
set -x
use_prompt=${1:-false}
port=${2:-3284}
+2 -2
View File
@@ -338,8 +338,8 @@ locals {
}
module "agentapi" {
source = "registry.coder.com/coder/agentapi/coder"
version = "2.0.0"
source = "github.com/coder/registry//registry/coder/modules/agentapi?ref=cj%2Fagentapi%2Fdebug"
# version = "2.0.0"
agent_id = var.agent_id
web_app_slug = local.app_slug
@@ -1,6 +1,7 @@
#!/bin/bash
set -euo pipefail
set -x
BOLD='\033[0;1m'
@@ -1,6 +1,7 @@
#!/bin/bash
set -euo pipefail
set -x
command_exists() {
command -v "$1" > /dev/null 2>&1