forked from molecule-ai/molecule-core
fix(e2e): poll instance_status not status in staging harness
/cp/admin/orgs exposes `instance_status` (COALESCE'd from org_instances.status), NOT a top-level `status` field. The harness polled the wrong field and always read empty → timed out at 15min on a tenant that had actually provisioned successfully (confirmed 2026-04-21T14:22Z: EC2 launched, canary ok, but harness never saw status=running). No code change to the admin API — the field has never been named `status`. The harness just had a typo that happened to type-check (the Go struct hasn't changed, only the sh/py polling was wrong). Now the harness correctly reads `instance_status` and the main provision poll loop terminates on the expected transition. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6bd674e412
commit
a510573172
@ -142,12 +142,17 @@ while true; do
|
||||
fail "Tenant provisioning timed out after ${PROVISION_TIMEOUT_SECS}s (last: $LAST_STATUS)"
|
||||
fi
|
||||
LIST_JSON=$(admin_call GET /cp/admin/orgs 2>/dev/null || echo '{"orgs":[]}')
|
||||
# NOTE: /cp/admin/orgs exposes 'instance_status' (from org_instances.status),
|
||||
# NOT 'status'. Field was bug-fixed 2026-04-21 after harness timed out on a
|
||||
# fully-provisioned tenant because the polled field was always ''. The
|
||||
# admin handler struct intentionally has no top-level `status` — the org
|
||||
# row's status is derivable via instance_status for ops.
|
||||
STATUS=$(echo "$LIST_JSON" | python3 -c "
|
||||
import json, sys
|
||||
d = json.load(sys.stdin)
|
||||
for o in d.get('orgs', []):
|
||||
if o.get('slug') == '$SLUG':
|
||||
print(o.get('status', ''))
|
||||
print(o.get('instance_status', ''))
|
||||
sys.exit(0)
|
||||
print('')
|
||||
" 2>/dev/null || echo "")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user