-
Notifications
You must be signed in to change notification settings - Fork 4
Fix hardcoded localhost:8080 in startLocalContainers #100
Copy link
Copy link
Closed
Description
Problem
startLocalContainers() in deploy_local.go:532 hardcodes:
go backendURL := "http://localhost:8080"
This is used as the health-check target regardless of what ports the docker-compose file actually maps. If a user runs deploy local --source custom with a compose file mapping DevLake to port 8085 (or any non-8080 port), the health check polls the wrong URL and eventually reports:
DevLake not ready after 6 minutes — check: docker compose logs devlake
...even though the containers are healthy and responding on the correct port.
Fix Options
- Parse the compose file for the backend port mapping (most robust)
- Accept an optional
--backend-portflag (simplest) - Try both well-known ports (8080, 8085) like
Discoverdoes (pragmatic)
Option 3 is probably the best balance — it aligns with the existing discovery logic in discovery.go:43-59 which already checks both 8080 and 8085.
Acceptance Criteria
-
deploy local --source customwith a compose mapping port 8085 correctly detects the backend - Default port 8080 behavior unchanged for official and fork deploys
-
go build ./...andgo test ./...pass
Reactions are currently unavailable
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working