chore: add local-debug config overlays for host-process debugging - #3063
chore: add local-debug config overlays for host-process debugging#3063renuka-fernando wants to merge 2 commits into
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughChangesThe PR adds TOML debug overlays for host-run services. It updates VS Code launches, the AI Workspace BFF Makefile, and gateway debug documentation to use layered configurations. It also updates the PetStore example and gateway-controller version metadata. Local debug configuration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.vscode/launch.json:
- Around line 86-115: Remove the committed admin/admin bootstrap credentials and
require operator-provided values with no default fallback. In
.vscode/launch.json lines 86-115, use a locally generated gitignored hash or
required environment variable; apply the same generated/operator-supplied
approach in platform-api/config/config-debug.toml lines 36-42, using
APIP_CP_ADMIN_USERNAME and APIP_CP_ADMIN_PASSWORD_HASH; update the credential
usage example in gateway/DEBUG_GUIDE.md lines 270-279 to match the new setup.
In `@gateway/DEBUG_GUIDE.md`:
- Line 191: Correct the environment variable reference in the Gateway Builder
debugging instructions by changing APIP_GW_CONTROLLER_POLICIES_DEFINITIONS__PATH
to APIP_GW_CONTROLLER_POLICIES_DEFINITIONS_PATH, matching the name configured in
the VS Code launch settings.
In `@platform-api/config/config-debug.toml`:
- Around line 22-27: Replace the inline encryption_key value in the
platform_api.security configuration with file interpolation referencing
./data/keys/encryption.key, following the existing debug-secret pattern. Ensure
the key file is generated as a 32-byte hex key and added to gitignore so no
secret remains committed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: d0e2787b-b543-49e5-99ac-26da676bfbc4
📒 Files selected for processing (8)
.vscode/launch.jsongateway/DEBUG_GUIDE.mdgateway/configs/config-debug.tomlgateway/examples/petstore-api.yamlgateway/gateway-controller/pkg/version/version.goplatform-api/config/config-debug.tomlportals/ai-workspace/Makefileportals/ai-workspace/configs/config-debug.toml
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@gateway/DEBUG_GUIDE.md`:
- Around line 270-272: Update the curl example in the DEBUG_GUIDE management API
instructions to avoid embedding a reusable Basic Auth password: read the
password from an environment variable or interactive prompt, clearly label the
credential as local-only, and warn against using it with non-local control
planes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 749dd8ed-8391-4b2b-a25e-9e1ad4cf6dcb
📒 Files selected for processing (8)
.vscode/launch.jsongateway/DEBUG_GUIDE.mdgateway/configs/config-debug.tomlgateway/examples/petstore-api.yamlgateway/gateway-controller/pkg/version/version.goplatform-api/config/config-debug.tomlportals/ai-workspace/Makefileportals/ai-workspace/configs/config-debug.toml
🚧 Files skipped from review as they are similar to previous changes (7)
- gateway/gateway-controller/pkg/version/version.go
- portals/ai-workspace/configs/config-debug.toml
- portals/ai-workspace/Makefile
- gateway/examples/petstore-api.yaml
- platform-api/config/config-debug.toml
- .vscode/launch.json
- gateway/configs/config-debug.toml
Introduce configs/config-debug.toml, a small overlay layered on the shipped config.toml via a second repeatable -config flag (merged last-wins), so host-process debug settings stay out of the distributed config.toml: - policy-engine ext_proc + ALS + python-executor TCP modes and host.docker.internal, plus the dev AES-GCM key path - wire the overlay into the Gateway Controller and Policy Engine (xDS / File) launch configs; drop the dead double-underscore env vars - DEBUG_GUIDE.md: run the builder before the controller, document the overlay + one-time AES key provisioning, and remove the config.toml edit/revert dance Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
Mirror the gateway config-debug.toml pattern for the Platform API and AI Workspace BFF — a repeatable -config overlay merged last-wins over the shipped config.toml, keeping debug-only values out of the config that ships in the distribution (config.toml files left untouched): - platform-api/config/config-debug.toml: dev encryption key, admin login, host JWT keypair paths, debug logging; launch.json env emptied - ai-workspace config-debug.toml: :8081 listener + host cert/key, local control-plane URL + tls_skip_verify, debug logging - ai-workspace Makefile bff-run now loads the overlay instead of env vars, fixing the dead APIP_AIW_SERVER_* names (no config.toml token) Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
Purpose
The shipped
config.tomlfiles (gateway-controller, policy-engine, Platform API, AI Workspace BFF) carry container-shaped defaults — UDS sockets and/etc/...paths — that do not work when the components run as host processes under the VS Code debugger. Debug-only overrides were leaking intoconfig.toml(which ships in the distribution) or relied onlaunch.json/Makefile env vars that no longer take effect, since env values reach config only through explicit{{ env }}tokens. This PR keeps every shippedconfig.tomluntouched and moves host-debug overrides into a separate, overlay-onlyconfig-debug.tomlper component. Resolves N/A.Goals
Keep the distributed
config.tomlfiles production-clean while giving developers a single, discoverable place for host-process debug settings, and repair the broken VS Code andmake bff-rundebug flows.Approach
config-debug.tomloverlays for the gateway (gateway/configs/), Platform API (platform-api/config/) and AI Workspace BFF (portals/ai-workspace/configs/), layered on top of the shippedconfig.tomlvia a second repeatable-configflag that merges last-wins..vscode/launch.json, and drop dead or misnamed env vars.make bff-runtarget to load the overlay instead of env vars that had no matching{{ env }}token (which left the BFF on the wrong port with unusable cert paths).gateway/DEBUG_GUIDE.mdwith the builder-before-controller ordering, the overlay mechanism, and one-time key/cert provisioning.petstore-api.yamlsample and bump the gateway-controller dev version.User stories
N/A — developer tooling and configuration only.
Documentation
gateway/DEBUG_GUIDE.md, updated in this PR.Automation tests
Security checks
admin/admin, a dummy dev key) live in the overlay/launch.json, never in a shippedconfig.toml; the control-plane token field is empty.Samples
gateway/examples/petstore-api.yaml— updated example API definition.Related PRs
N/A
Test environment
macOS, Go (multi-module workspace), Docker and Docker Compose, VS Code — local host-process debugging of the gateway, Platform API and AI Workspace BFF.