Fix E2E Playwright CI failures: gateway HTTP routing and missing service initialization#60
Draft
Fix E2E Playwright CI failures: gateway HTTP routing and missing service initialization#60
Conversation
…atabase setup Co-authored-by: fabriziosalmi <1569108+fabriziosalmi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix action job error without breaking functionality
Fix E2E Playwright CI failures: gateway HTTP routing and missing service initialization
Feb 21, 2026
Integration Test Results1 tests ±0 0 ✅ ±0 0s ⏱️ ±0s For more details on these errors, see this check. Results for commit 3346d4b. ± Comparison against base commit 49b04a5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
28 E2E tests fail in CI because login never succeeds — the gateway's port 80 redirects all non-health requests to HTTPS (breaking browser API calls), and no admin user is ever created because required env vars aren't set.
Root causes
NEXT_PUBLIC_GATEWAY_URL=http://localhost:80sends browser calls to the port 80 server block, which only serves/healthand redirects everything else tohttps://api.wildbox.local/...— unresolvable in CI. Port 8080 (the actual HTTP API server) was not exposed to the host.INITIAL_ADMIN_EMAIL/INITIAL_ADMIN_PASSWORDnot set → identity service skips creation. Tests hardcodesuperadmin@wildbox.com/wildbox123.DATABASE_URL,JWT_SECRET_KEY,POSTGRES_PASSWORD, and secondary DB URLs all unset in CI → identity can't connect or sign tokens; data/guardian/responder services start before their databases exist.Changes
docker-compose.yml8080(the HTTP API server block with actual routes)NEXT_PUBLIC_GATEWAY_URL=http://localhost:8080andINTERNAL_GATEWAY_URL=http://open-security-gateway:8080so both browser and SSR requests use the working HTTP gateway.github/workflows/test.yml(E2E job only).envbeforedocker compose up:data,guardian,responder) viapsqlbefore launching remaining services — eliminating the race condition where services attempt DB connections before their databases exist✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.