feat(IOP): add IOP mode support with custom routes - #2695
Merged
Merged
Conversation
Reviewer's GuideAdds an IOP (Insights on Premises) development mode that proxies a local vulnerability-ui build through a dedicated dev proxy to a Satellite/Foreman IOP instance, wired via a new npm script, webpack config flag, and custom proxy routing configuration. Sequence diagram for start:proxy:iop IOP development workflowsequenceDiagram
actor Developer
participant npm
participant fec_dev_proxy
participant webpack_dev_server
participant IOP_instance
Developer->>npm: npm run start:proxy:iop
npm->>fec_dev_proxy: PROXY=true IOP=true HCC_ENV=iop HCC_ENV_URL=$IOP_URL FEC_IOP_CUSTOM_ROUTES_PATH=custom_routes.json fec dev-proxy --iop
fec_dev_proxy->>webpack_dev_server: start webpack in watch mode on port 8003
fec_dev_proxy->>webpack_dev_server: apply fec.config SPAFallback with IOP=true
fec_dev_proxy->>IOP_instance: establish proxy to IOP_URL
Developer->>IOP_instance: access https://iop.foo.redhat.com:1337 via proxy
IOP_instance-->>webpack_dev_server: requests for /assets/apps/vulnerability/*
IOP_instance-->>Developer: responses combining IOP data and local vulnerability-ui assets
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
start:proxy:iopnpm script relies on shell-specific syntax like$(pwd)and inline env vars, which may not work on non-POSIX environments; consider using a cross-platform approach (e.g.,cross-envand avoiding subshells) if this needs to run on macOS/Windows as well. - The
SPAFallback: process.env.IOP !== 'true'condition inversely couples SPA behavior to a string-valued env var, which may be brittle; you might want to centralize and normalize IOP mode detection (e.g., a small helper that handles absence, case, and non-'true' values) to avoid subtle misconfigurations.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `start:proxy:iop` npm script relies on shell-specific syntax like `$(pwd)` and inline env vars, which may not work on non-POSIX environments; consider using a cross-platform approach (e.g., `cross-env` and avoiding subshells) if this needs to run on macOS/Windows as well.
- The `SPAFallback: process.env.IOP !== 'true'` condition inversely couples SPA behavior to a string-valued env var, which may be brittle; you might want to centralize and normalize IOP mode detection (e.g., a small helper that handles absence, case, and non-'true' values) to avoid subtle misconfigurations.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This was referenced Jun 24, 2026
Merged
Siasurai
approved these changes
Jun 25, 2026
Siasurai
left a comment
Contributor
There was a problem hiding this comment.
lgtm, thank you so much!
adonispuente
force-pushed
the
iop
branch
3 times, most recently
from
June 25, 2026 21:13
9f6fc69 to
b19611a
Compare
Add IOP (Insights on Premises) development mode configuration: - Created custom_routes.json defining vulnerability asset and API route mappings - Added start:proxy:iop npm script for launching IOP development proxy - Routes /assets/apps/vulnerability/* to local webpack dev server (port 8002) with path stripping - Routes /api/vulnerability/* to local backend API (port 8000) This enables local vulnerability-ui development against IOP/Satellite instances, building on existing IOP support in fec.config.js and patchFederationForIop.js. Requires frontend-components IOP branch for fec dev-proxy --iop command. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a long summary but I wanted to catch all pain points. Essentially the goal is for iop branches to just be able to run npm run start:proxy:iop on appropriate branches and thats it.
Adds IOP (Insights on Premises) mode support for local development against Satellite/Foreman instances.
Changes
Testing (Before Dependencies Merge)
Build local frontend-components package:
cd frontend-components
git checkout IOP
npm install && npm run build
cd packages/config
npm pack # Creates .tgz file
Build local proxy image:
cd frontend-development-proxy
git checkout config
Comment out test lines 23-28 in Dockerfile (local Docker build issue)
podman build -t ghcr.io/redhatinsights/frontend-development-proxy:latest .
cd vulnerability-ui
npm install /path/to/redhat-cloud-services-frontend-components-config-*.tgz
IOP_URL="https://your-iop-instance.example.com" npm run start:proxy:iop:local
Access at: https://iop.foo.redhat.com:1337/insights/vulnerability
After Dependencies Merge
Just run:
IOP_URL="https://your-iop-instance.example.com" npm run start:proxy:iop
-proxy: chore(config): update base configuration set up frontend-development-proxy#131