Local Development: Change VS Code to use Goreman#4929
Conversation
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
…and-auth-launch-configs Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Greptile SummaryThis PR consolidates VS Code local development to use Goreman with dlv-dap, aligning it with the existing
Confidence Score: 5/5This is a developer-tooling-only change with no production code paths modified; merging carries no risk to running services. All changes are confined to VS Code configs, shell scripts, procfiles, and the mage dev namespace. The core launch flow is well-structured with an explicit prebuild → goreman → dlv-readiness pipeline. The only notable quirk is that tasks.json passes "no-auth" as a profiles token when the doc comment recommends "", but this happens to work because no docker-compose profile with that name exists. No production code or migration files are touched. .vscode/tasks.json — the "no-auth" token passed to Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant VSCode as VS Code
participant Tasks as tasks.json
participant PB as prebuild-services.sh
participant Mage as mage dev:up
participant DC as Docker Compose
participant Goreman as Goreman (Procfile)
participant DLV as dlv dap (x8)
participant WaitDLV as wait-for-dlv.sh
VSCode->>Tasks: Launch compound (e.g. Armada no-auth)
Tasks->>PB: Pre-build Go services
PB->>PB: go build -o /dev/null (warm cache)
PB-->>Tasks: Cache warm complete
Tasks->>Tasks: Check for port conflicts
Tasks->>Mage: "mage kind && mage dev:up no-auth -dap"
Mage->>DC: docker compose up -d --wait (core services)
DC-->>Mage: postgres / redis / pulsar healthy
Mage->>Goreman: goreman -f no-auth-dap.Procfile start
Goreman->>DLV: "go build ... -o dist/armada-* && dlv dap --listen=PORT"
DLV-->>VSCode: DAP server listening at (first service)
VSCode->>Tasks: endsPattern matched, proceed
Tasks->>WaitDLV: wait-for-dlv.sh standard
WaitDLV->>WaitDLV: poll lsof for ports 2345-2352
WaitDLV-->>Tasks: All 8 dlv servers ready
VSCode->>DLV: DAP launch request per service
DLV->>DLV: "exec dist/armada-* --config _local/config.yaml"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant VSCode as VS Code
participant Tasks as tasks.json
participant PB as prebuild-services.sh
participant Mage as mage dev:up
participant DC as Docker Compose
participant Goreman as Goreman (Procfile)
participant DLV as dlv dap (x8)
participant WaitDLV as wait-for-dlv.sh
VSCode->>Tasks: Launch compound (e.g. Armada no-auth)
Tasks->>PB: Pre-build Go services
PB->>PB: go build -o /dev/null (warm cache)
PB-->>Tasks: Cache warm complete
Tasks->>Tasks: Check for port conflicts
Tasks->>Mage: "mage kind && mage dev:up no-auth -dap"
Mage->>DC: docker compose up -d --wait (core services)
DC-->>Mage: postgres / redis / pulsar healthy
Mage->>Goreman: goreman -f no-auth-dap.Procfile start
Goreman->>DLV: "go build ... -o dist/armada-* && dlv dap --listen=PORT"
DLV-->>VSCode: DAP server listening at (first service)
VSCode->>Tasks: endsPattern matched, proceed
Tasks->>WaitDLV: wait-for-dlv.sh standard
WaitDLV->>WaitDLV: poll lsof for ports 2345-2352
WaitDLV-->>Tasks: All 8 dlv servers ready
VSCode->>DLV: DAP launch request per service
DLV->>DLV: "exec dist/armada-* --config _local/config.yaml"
Reviews (25): Last reviewed commit: "fix: cache prebuilds" | Re-trigger Greptile |
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
…and-auth-launch-configs Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
…and-auth-launch-configs Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
…and-auth-launch-configs Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
…ersonal:d2burkhalter/armada into fix/add-prometheus-and-auth-launch-configs Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
| scrape_configs: | ||
| - job_name: "armada-server" | ||
| static_configs: | ||
| - targets: ["host.docker.internal:9000"] |
There was a problem hiding this comment.
host.docker.internal is a very OSX-specific feature, can we use something which would work on both Linux and OSX?
There was a problem hiding this comment.
I think the extra_hosts property here should allow it to work the same on osx and linux
prometheus:
container_name: prometheus
image: ${PROMETHEUS_IMAGE:-prom/prometheus:v3.11.3}
extra_hosts:
- "host.docker.internal:host-gateway"| We similarly provide run and debug configurations for VS Code users to run each Armada service and use the debugger (provided with VS Code). | ||
|
|
||
| The `Armada` configuration performs all required setup (setting up the Kind cluster, spinning up infrastructure services, performing database migrations) and then runs all services. | ||
| The following compound configurations are provided, each launching all relevant service debuggers at once: |
There was a problem hiding this comment.
We might have many sections in the README.md which could go in this docs/developer_guide.md, could you debloat the README also?
There was a problem hiding this comment.
I think we should have large doc changes in a separate PR. Want to try and get a consensus for what we want to do with README.md, docs/ and website/ and go from there
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
…ersonal:d2burkhalter/armada into fix/add-prometheus-and-auth-launch-configs Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
Signed-off-by: David.Burkhalter <d2.burkhalter@gmail.com>
What type of PR is this?
Enhancement for VS Code launch configurations that will align its debugger to use processes launched from Goreman with configs and docker compose in
/_localto consolidate how we do local development. Also adds launch configurations for starting Armada with authorization and prometheus.What this PR does / why we need it
/_local