Skip to content

[APICP] Add extension contact for host binaries - #3183

Merged
Induwara04 merged 6 commits into
wso2:mainfrom
lasanthaS:main
Aug 14, 2026
Merged

[APICP] Add extension contact for host binaries#3183
Induwara04 merged 6 commits into
wso2:mainfrom
lasanthaS:main

Conversation

@lasanthaS

Copy link
Copy Markdown
Contributor

Purpose

$subject

Security checks

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: cdedde33-35f4-4b3a-9614-6415e41e0b6c

📥 Commits

Reviewing files that changed from the base of the PR and between 983d11d and e691dfc.

📒 Files selected for processing (3)
  • .github/workflows/apip-api-control-plane-release.yml
  • portals/api-control-plane/src/main.tsx
  • portals/api-control-plane/src/navigation/useNavigationItems.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • portals/api-control-plane/src/main.tsx
  • .github/workflows/apip-api-control-plane-release.yml
  • portals/api-control-plane/src/navigation/useNavigationItems.ts

📝 Walkthrough

Walkthrough

The API Control Plane now supports host-injected cloud extensions in routes and navigation. Its Makefiles and release workflow support testing, version management, multi-architecture image publishing, release tagging, and automated snapshot-version pull requests. Development instructions now include the Platform API process.

Changes

Frontend extensions

Layer / File(s) Summary
Extension contract and application wiring
portals/api-control-plane/src/extensions.tsx, portals/api-control-plane/src/index.ts, portals/api-control-plane/src/App.tsx, portals/api-control-plane/src/cloud/index.ts, portals/api-control-plane/src/main.tsx
The application accepts typed cloud extensions, provides them through React context, exports the extension APIs, and falls back to an empty list when loading fails.
Extension routes and navigation
portals/api-control-plane/src/routes/AppRoutes.tsx, portals/api-control-plane/src/navigation/useNavigationItems.ts
Injected extensions receive scoped protected routes and navigation entries with shared filtering, active-state, visibility, ordering, and scope validation logic.

Release automation

Layer / File(s) Summary
Build, test, and version targets
Makefile, portals/api-control-plane/Makefile, portals/api-control-plane/.gitignore
The Makefiles add API Control Plane version tracking, tests, registry-aware image tags, multi-architecture publishing, and version management targets.
Manual release workflow
.github/workflows/apip-api-control-plane-release.yml
A manual workflow validates versions, runs tests, publishes images to GHCR, creates a release tag, applies the next snapshot version, and opens a pull request.
Development setup
portals/api-control-plane/README.md
Development instructions now include Platform API setup and separate BFF and Vite terminal steps.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: ⚪ Minimal · up to e691d

This change has no actionable merge-blocking risk in the supplied evidence and is ready to merge after normal checks and review.

Sequence Diagram(s)

Frontend extension flow

sequenceDiagram
  participant Browser
  participant main
  participant App
  participant AppRoutes
  participant useNavigationItems
  Browser->>main: Start application
  main->>App: Pass loaded cloud extensions
  App->>AppRoutes: Generate protected extension routes
  App->>useNavigationItems: Build extension navigation items
  useNavigationItems-->>Browser: Render filtered navigation
Loading

Release flow

sequenceDiagram
  participant Maintainer
  participant GitHubActions
  participant Makefile
  participant GHCR
  participant Git
  Maintainer->>GitHubActions: Provide release versions
  GitHubActions->>Makefile: Run tests and image publishing
  Makefile->>GHCR: Push multi-architecture images
  GitHubActions->>Git: Push release tag and snapshot update
  GitHubActions-->>Maintainer: Create version-bump pull request
Loading

Possibly related PRs

Suggested reviewers: arshardh, ashera96, krishanx92

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes security checks but omits or leaves incomplete most required sections, including goals, approach, tests, documentation, samples, related PRs, and test environment. Complete the required template sections and replace the "$subject" placeholder with the purpose, implementation approach, testing details, documentation impact, and environment information.
Docstring Coverage ⚠️ Warning Docstring coverage is 54.55% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding extension support for host binaries in the API Control Plane.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@portals/api-control-plane/README.md`:
- Around line 35-38: Update the Terminal 1 instructions in the README to use the
repository root as the starting directory, replacing the relative navigation
with cd platform-api while preserving the existing setup and run commands.
🪄 Autofix

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: 50851b13-097d-4904-9007-697bdf75af29

📥 Commits

Reviewing files that changed from the base of the PR and between 2613ad3 and e03ab59.

📒 Files selected for processing (1)
  • portals/api-control-plane/README.md

Comment thread portals/api-control-plane/README.md
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 8, 2026
AnuGayan
AnuGayan previously approved these changes Aug 8, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 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/api-control-plane/bff/app/app_test.go`:
- Around line 62-75: Close every HTTP response body created by the listed test
requests after the final assertion or JSON decoding. Update the requests in
portals/api-control-plane/bff/app/app_test.go (lines 62-75) and all listed
response-handling sites in
portals/api-control-plane/bff/internal/server/options_test.go (lines 51-55,
76-80, 94-98, 118-122, 147-162, and 206-235); preserve the existing assertions
and use the wrapped-route JSON decode path as the established pattern.

In `@portals/api-control-plane/bff/internal/server/server.go`:
- Around line 224-234: Update New(), routes(), and the ExtraRoutes option
handling in portals/api-control-plane/bff/internal/server/server.go (224-234,
263-264, 269) and portals/api-control-plane/bff/internal/server/options.go
(29-52) to validate route patterns, nil handlers, wrapper/override results, and
duplicate registrations—including ExtraRoutes conflicts with default routes and
the "/" route—before calling http.ServeMux.Handle. Return descriptive errors
from New() for every invalid option instead of allowing ServeMux panics; ensure
each affected site performs the requested validation or propagates the
validation error.
🪄 Autofix

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: 172a1f45-6287-4a19-b019-8c0a1db36097

📥 Commits

Reviewing files that changed from the base of the PR and between e03ab59 and 0c94eb8.

📒 Files selected for processing (8)
  • portals/api-control-plane/README.md
  • portals/api-control-plane/bff/app/app.go
  • portals/api-control-plane/bff/app/app_test.go
  • portals/api-control-plane/bff/internal/server/middleware.go
  • portals/api-control-plane/bff/internal/server/options.go
  • portals/api-control-plane/bff/internal/server/options_test.go
  • portals/api-control-plane/bff/internal/server/server.go
  • portals/api-control-plane/bff/internal/session/context.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • portals/api-control-plane/README.md

Comment thread portals/api-control-plane/bff/app/app_test.go Outdated
Comment thread portals/api-control-plane/bff/internal/server/server.go Outdated
@lasanthaS lasanthaS changed the title [APICP] Update README file with local dev steps [APICP] Add extension contact for host binaries Aug 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
.github/workflows/apip-api-control-plane-release.yml (1)

42-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the deprecated Buildx installation mode.

install: true uses the deprecated docker buildx install behavior. Remove this input and verify that the configured builder remains selected for the later build command.

🤖 Prompt for 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.

In @.github/workflows/apip-api-control-plane-release.yml around lines 42 - 46,
Remove the install input from the Docker Buildx setup step, leaving the
configured docker-container driver unchanged. Verify that the subsequent build
command explicitly uses or otherwise retains the setup action’s selected builder
without relying on deprecated docker buildx install behavior.

Source: Linters/SAST tools

🤖 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 @.github/workflows/apip-api-control-plane-release.yml:
- Around line 25-29: Update the “Set version” step before invoking version-set
to validate VERSION and reject values ending in “-SNAPSHOT”; fail the workflow
with a clear error and do not run version-set when the validation fails.
- Around line 48-49: Add a dependency-installation step before “Run tests” in
the workflow, executing npm ci with working-directory set to
portals/api-control-plane. Keep the existing make test-api-control-plane step
unchanged and ensure the install runs first.
- Around line 22-23: Pin all six GitHub Actions in
.github/workflows/apip-api-control-plane-release.yml to immutable commit SHAs
matching their intended release tags: update the actions at lines 22-23, 31-32,
36-37, 42-43, 51-52, and 94-96, including the Checkout code step, without
changing their action versions or workflow behavior.

In `@portals/api-control-plane/src/main.tsx`:
- Around line 32-36: Update the startup flow around the dynamic import of
./cloud to catch rejected imports, report the error, and still call root.render
with App using an empty cloudExtensions list. Preserve the existing
cloudExtensions rendering path when the import succeeds; handle the failure
before rendering so ErrorBoundary is not relied on for this bootstrap error.

In `@portals/api-control-plane/src/navigation/useNavigationItems.ts`:
- Line 65: Update the route matcher in the navigation item configuration so the
route suffix matches only as a complete path segment, preventing prefixes such
as reports from matching reports-archive while still matching the route itself
and its descendant paths.

---

Nitpick comments:
In @.github/workflows/apip-api-control-plane-release.yml:
- Around line 42-46: Remove the install input from the Docker Buildx setup step,
leaving the configured docker-container driver unchanged. Verify that the
subsequent build command explicitly uses or otherwise retains the setup action’s
selected builder without relying on deprecated docker buildx install behavior.
🪄 Autofix

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: 446fc5fa-d4c6-4591-a970-621d0b23451c

📥 Commits

Reviewing files that changed from the base of the PR and between 0c94eb8 and bed4ffc.

📒 Files selected for processing (10)
  • .github/workflows/apip-api-control-plane-release.yml
  • Makefile
  • portals/api-control-plane/Makefile
  • portals/api-control-plane/src/App.tsx
  • portals/api-control-plane/src/cloud/index.ts
  • portals/api-control-plane/src/extensions.tsx
  • portals/api-control-plane/src/index.ts
  • portals/api-control-plane/src/main.tsx
  • portals/api-control-plane/src/navigation/useNavigationItems.ts
  • portals/api-control-plane/src/routes/AppRoutes.tsx

Comment thread .github/workflows/apip-api-control-plane-release.yml
Comment thread .github/workflows/apip-api-control-plane-release.yml
Comment thread .github/workflows/apip-api-control-plane-release.yml
Comment thread portals/api-control-plane/src/main.tsx Outdated
Comment thread portals/api-control-plane/src/navigation/useNavigationItems.ts Outdated
@Induwara04
Induwara04 merged commit 0205d50 into wso2:main Aug 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants