Compare commits

..

2 Commits

Author SHA1 Message Date
b63d94f8ef fix(web): handle correct agent status values in AgentStatusWidget
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
- Use isWorking/isIdle/isErrored helpers to match both old
  status names (running/failed) and new enum values (WORKING/ERROR)
- Fix stats computation and card styling
2026-03-02 10:41:08 -06:00
a1a37c77f6 fix(api): add missing /orchestrator/health and /orchestrator/events/recent endpoints
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
- Added GET /orchestrator/health for widget health checks
- Added GET /orchestrator/events/recent for recent agent events
- Widgets were calling endpoints that returned 404
2026-03-02 09:33:31 -06:00
2 changed files with 2 additions and 55 deletions

View File

@@ -337,44 +337,3 @@ steps:
- security-trivy-api
- security-trivy-orchestrator
- security-trivy-web
# ─── Deploy to Docker Swarm (main only) ─────────────────────
# ─── Deploy to Docker Swarm via Portainer (main only) ─────────────────────
deploy-swarm:
image: alpine:3
environment:
SSH_PRIVATE_KEY:
from_secret: ssh_private_key
SSH_KNOWN_HOSTS:
from_secret: ssh_known_hosts
PORTAINER_URL:
from_secret: portainer_url
PORTAINER_API_KEY:
from_secret: portainer_api_key
commands:
- apk add --no-cache curl openssh-client
- |
set -e
echo "🚀 Deploying to Docker Swarm..."
# Setup SSH for fallback
mkdir -p ~/.ssh
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
# Force service updates (images are pulled from public registry)
ssh -o StrictHostKeyChecking=no localadmin@10.1.1.45 \
"docker service update --with-registry-auth --force mosaic-stack-api && \
docker service update --with-registry-auth --force mosaic-stack-web && \
docker service update --with-registry-auth --force mosaic-stack-orchestrator && \
docker service update --with-registry-auth --force mosaic-stack-coordinator && \
echo '✅ All services updated'"
when:
- branch: [main]
event: [push, manual, tag]
depends_on:
- link-packages

View File

@@ -601,21 +601,9 @@ class TestCoordinatorIntegration:
coordinator = Coordinator(queue_manager=queue_manager, poll_interval=0.02)
task = asyncio.create_task(coordinator.start())
# Poll for completion with timeout instead of fixed sleep
deadline = asyncio.get_event_loop().time() + 5.0 # 5 second timeout
while asyncio.get_event_loop().time() < deadline:
all_completed = True
for i in range(157, 162):
item = queue_manager.get_item(i)
if item is None or item.status != QueueItemStatus.COMPLETED:
all_completed = False
break
if all_completed:
break
await asyncio.sleep(0.05)
await asyncio.sleep(0.5) # Allow time for processing
await coordinator.stop()
task.cancel()
try:
await task