Skip to content

fix(deploy): target MIE Container Manager REST API at /api/v1#55

Merged
Taleef7 merged 1 commit into
mainfrom
fix/mieweb-deploy-api-v1-base
Jun 3, 2026
Merged

fix(deploy): target MIE Container Manager REST API at /api/v1#55
Taleef7 merged 1 commit into
mainfrom
fix/mieweb-deploy-api-v1-base

Conversation

@Taleef7

@Taleef7 Taleef7 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Problem

The Deploy TWH OS MIEWeb → Deploy twh backend container job started failing on the PR #54 merge to main (run 26887098773, failing after ~7s). The build jobs succeed; the deploy job aborts at its first API call:

Confirming site 1 exists...
##[error]GET /sites returned a non-JSON response from https://manager.os.mieweb.org/sites.
Response preview: <!doctype html> ... <title>MIE Container Manager</title>

Root cause

The MIE Container Manager changed its routing (this same script + secret deployed fine on May 22). Current layout:

URL Returns
…/sites SPA web UI (HTML)
…/api/sites Swagger UI (HTML)
…/api/v1/sites JSON REST API

deploy-mieweb-container.sh stripped a trailing /api to target the bare manager origin — which used to serve JSON but now serves the web app — so every request returned HTML and GET /sites failed the non-JSON guard.

Fix

Normalize LAUNCHPAD_API_URL down to the manager origin (stripping any /api, /v1, or /api/v1 suffix) and re-append /api/v1. Resilient to whichever form the secret is stored as. Also updated the now-misleading non-JSON error hint.

Verification

  • bash -n passes.
  • All secret forms (origin, /api, /v1, /api/v1, with/without trailing slash) normalize to https://manager.os.mieweb.org/api/v1.
  • GET /api/v1/sites returns application/json (401 unauthorized unauthenticated, as expected — the workflow sends the API key).

Merging this to main re-triggers the deploy workflow. No secret change required.

🤖 Generated with Claude Code

The MIE Container Manager changed its routing: the origin now serves the
SPA web UI (GET /sites returns index.html) and /api serves the Swagger UI,
while the JSON REST API moved to /api/v1. The deploy script stripped /api
to target the bare origin, so every request returned HTML and the first
GET /sites aborted with a non-JSON response, failing the backend deploy.

Normalize LAUNCHPAD_API_URL down to the manager origin (stripping any
/api, /v1, or /api/v1 suffix) and re-append /api/v1, so the value is
resilient to whichever form the secret is stored as. Update the non-JSON
error hint to reflect the new origin/Swagger/REST layout.

Verified: /api/v1/sites returns application/json; all secret forms
normalize to https://manager.os.mieweb.org/api/v1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workwell-measure-studio Ready Ready Preview, Comment Jun 3, 2026 1:32pm

@Taleef7 Taleef7 self-assigned this Jun 3, 2026
@Taleef7 Taleef7 merged commit 0470051 into main Jun 3, 2026
9 checks passed
@Taleef7 Taleef7 deleted the fix/mieweb-deploy-api-v1-base branch June 3, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant