fix(ci): split E2E SPA host from API host, derive msp-api.<rest> #95

Merged
nrupard merged 1 commit from fix/e2e-runner-toolcache into main 2026-06-05 16:41:53 +02:00
Owner

The canonical staging deploy serves the SPA at msp.a8n.systems and the API at msp-api.a8n.systems (see mokosh-clients/src/hooks/fetch.rs:170). The previous config used a single E2E_BASE_URL for both, so wait-for-deploy.mjs and the api project hit the SPA host for /api/v1/version, got an HTML index back, and failed to parse JSON.

Split the env:

  • E2E_BASE_URL stays as the SPA host; only the auth-ui project navigates here.
  • New E2E_API_BASE_URL carries the API host (/api/v1, /oauth2, /.well-known). Defaults to deriving msp-api.<rest> from E2E_BASE_URL using the same rule the SPA itself uses, so the canonical deploys keep working without any new secret. Override explicitly for non-msp.* hosts.

The api project, teardown, wait-for-deploy, and OIDC discovery all switch to the API base. Auth-ui keeps the SPA base.

Move dotenv loading into lib/env.ts so consumers see the populated process.env regardless of import order (the previous playwright.config.ts called dotenv after import { env } had already run, so .env-only values were lost).

#PMS-140

The canonical staging deploy serves the SPA at `msp.a8n.systems` and the API at `msp-api.a8n.systems` (see `mokosh-clients/src/hooks/fetch.rs:170`). The previous config used a single E2E_BASE_URL for both, so wait-for-deploy.mjs and the api project hit the SPA host for `/api/v1/version`, got an HTML index back, and failed to parse JSON. Split the env: - `E2E_BASE_URL` stays as the SPA host; only the auth-ui project navigates here. - New `E2E_API_BASE_URL` carries the API host (`/api/v1`, `/oauth2`, `/.well-known`). Defaults to deriving `msp-api.<rest>` from E2E_BASE_URL using the same rule the SPA itself uses, so the canonical deploys keep working without any new secret. Override explicitly for non-`msp.*` hosts. The api project, teardown, wait-for-deploy, and OIDC discovery all switch to the API base. Auth-ui keeps the SPA base. Move dotenv loading into lib/env.ts so consumers see the populated process.env regardless of import order (the previous playwright.config.ts called dotenv after import { env } had already run, so .env-only values were lost). #PMS-140
fix(ci): split E2E SPA host from API host, derive msp-api.<rest>
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + compile + tests (pull_request) Successful in 1m33s
3883fc8bfd
The canonical staging deploy serves the SPA at `msp.a8n.systems` and the API at `msp-api.a8n.systems` (see `mokosh-clients/src/hooks/fetch.rs:170`). The previous config used a single E2E_BASE_URL for both, so wait-for-deploy.mjs and the api project hit the SPA host for `/api/v1/version`, got an HTML index back, and failed to parse JSON.

Split the env:

- `E2E_BASE_URL` stays as the SPA host; only the auth-ui project navigates here.
- New `E2E_API_BASE_URL` carries the API host (`/api/v1`, `/oauth2`, `/.well-known`). Defaults to deriving `msp-api.<rest>` from E2E_BASE_URL using the same rule the SPA itself uses, so the canonical deploys keep working without any new secret. Override explicitly for non-`msp.*` hosts.

The api project, teardown, wait-for-deploy, and OIDC discovery all switch to the API base. Auth-ui keeps the SPA base.

Move dotenv loading into lib/env.ts so consumers see the populated process.env regardless of import order (the previous playwright.config.ts called dotenv after import { env } had already run, so .env-only values were lost).

#PMS-140
nrupard deleted branch fix/e2e-runner-toolcache 2026-06-05 16:41:53 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!95
No description provided.