Add merged configs for devportal and AIW distributions#2799
Conversation
📝 WalkthroughWalkthroughPlatform API and AI Workspace now interpolate only their own configuration sections. Distribution builds produce unified TOML files, and optional Developer Portal or AI Workspace services use shared configuration through Compose profiles. ChangesUnified configuration and optional services
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Compose
participant PlatformAPI
participant OptionalComponent
Compose->>PlatformAPI: Start shared Platform API
PlatformAPI-->>Compose: Healthcheck succeeds
Compose->>OptionalComponent: Start enabled profile service
OptionalComponent->>PlatformAPI: Use shared configuration and API
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
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 `@portals/ai-workspace/Makefile`:
- Around line 185-189: Guard the DEVPORTAL_VERSION assignment in
portals/ai-workspace/Makefile lines 185-189 by verifying
../developer-portal/VERSION exists and is non-empty before applying sed,
otherwise use 0.0.0. Apply the same guarded fallback to the corresponding
version assignment in portals/developer-portal/Makefile lines 139-145 for
../ai-workspace/VERSION.
In `@portals/developer-portal/distribution/README.md`:
- Line 120: Update the JWT configuration documentation in the table to use the
actual platform API fields public_key_file and private_key_file instead of
public_key and private_key, preserving the existing keypair description and
setup.sh default reference.
In `@portals/developer-portal/docker-compose.yaml`:
- Around line 58-63: Update the comment immediately above the ai-workspace
service to identify AI Workspace rather than Developer Portal, while preserving
the existing --profile with-ai-workspace usage.
🪄 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: b83512cd-ad74-4bd9-beae-98349ede0034
📒 Files selected for processing (12)
platform-api/config/config-template.tomlplatform-api/config/config.goplatform-api/config/config_test.goportals/ai-workspace/Makefileportals/ai-workspace/bff/internal/config/config_test.goportals/ai-workspace/bff/internal/config/settings.goportals/ai-workspace/distribution/README.mdportals/ai-workspace/docker-compose.yamlportals/developer-portal/Makefileportals/developer-portal/distribution/README.mdportals/developer-portal/docker-compose.yamlportals/developer-portal/scripts/setup.sh
Purpose
Fix #2730
Summary
Unified configuration model
[developer_portal.*],[platform_api.*],[ai_workspace.*]— so their keys never collide in one file.{{ env }}/{{ file }}tokens, so a shared multi-component file never forces one service to resolve another component's tokens (which would fail closed).Unified distribution packaging (
make dist)config.tomlcarrying every bundled component's section; the same file is mounted into every container and each service reads only its own table.config-template.tomldocuments all bundled components, with any optional component (e.g. Developer Portal) appended at the bottom.AI Workspace: optional Developer Portal (and vise-versa)
docker-compose.yamlbehind an opt-indeveloper-portalCompose profile, sharing the single Platform API (no second instance).docker compose --profile with-developer-portal up -dplus a documented config/secret step. (docker compose --profile with-ai-workspace up -dfor devportal)Related doc
https://docs.google.com/document/d/1ymKUVmLAdXkNVIi3ynRGMXJySUWnmc2glmtZru9KJ9A/edit?tab=t.0