fix(ci): point KOMODO_HOST to public/internal url and add wait_for_update
Deploy OpenHands Agent Canvas / Deploy to Komodo (push) Failing after 10s

This commit is contained in:
gitea committed 2026-10-24 00:11:13 +00:00
1 parent 5dc53d1a66
commit f594304721
2 files changed
+70 -18

No files matched your search

+21 -13
View File
@@ -12,7 +12,7 @@ jobs:
name: Deploy to Komodo
runs-on: hp
env:
KOMODO_HOST: ${{ secrets.KOMODO_HOST || 'http://localhost:9120' }}
KOMODO_HOST: ${{ secrets.KOMODO_HOST || 'https://komodo.nickmalik.dev' }}
KOMODO_API_KEY: ${{ secrets.KOMODO_API_KEY }}
KOMODO_API_SECRET: ${{ secrets.KOMODO_API_SECRET }}
steps:
@@ -32,16 +32,24 @@ jobs:
echo "=== Deploying OpenHands Agent Canvas ==="
python3 scripts/deploy.py
- name: Verify Health
- name: Check Stack Status
run: |
echo "=== Checking health endpoint on port 18000 ==="
sleep 10
for i in 1 2 3 4 5 6; do
if curl -fsSL -o /dev/null "http://127.0.0.1:18000/" 2>/dev/null || curl -fsSL -o /dev/null "http://127.0.0.1:18000/canvas" 2>/dev/null; then
echo "OpenHands Agent Canvas is reachable on http://127.0.0.1:18000/ !"
exit 0
fi
echo "Waiting for container startup (attempt $i/6)..."
sleep 5
done
echo "Container is deploying in background. Check status in Komodo Web UI."
echo "=== Stack deployment completed. Verifying stack info via Komodo API ==="
python3 -c "
import urllib.request, json, os
host = os.getenv('KOMODO_HOST', 'https://komodo.nickmalik.dev').rstrip('/')
key = os.getenv('KOMODO_API_KEY')
secret = os.getenv('KOMODO_API_SECRET')
if key and secret:
req = urllib.request.Request(
f'{host}/read/GetStack',
data=json.dumps({'stack': 'openhands-agent-canvas'}).encode(),
headers={'Content-Type': 'application/json', 'x-api-key': key, 'x-api-secret': secret},
method='POST'
)
try:
res = json.loads(urllib.request.urlopen(req, timeout=30).read().decode())
print('Stack Status:', res.get('state', 'N/A'))
except Exception as e:
print('Note:', e)
"