Add pipeline-management-v2 route and entry-point redirect - #6465
Add pipeline-management-v2 route and entry-point redirect#6465ArtemHoruzhenko wants to merge 2 commits into
Conversation
Code Coverage - Frontend unit tests
Test suite run success8092 tests passing in 874 suites. Report generated by 🧪jest coverage report action from c1dd540 |
52325d3 to
bc9b121
Compare
Registers a new pipeline-management-v2 placeholder page/route, to be wired up with the real rdi-ui component in a follow-up PR. The choice between the legacy pipeline management page and this new one is made once, when entering an RDI instance (RdiInstancePage), based on the dev-rdiUi flag and whether the instance version is above 1.16 - not inside the destination pages themselves, so a future manual v1/v2 switcher isn't fighting an automatic redirect on every render.
bc9b121 to
31990ea
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31990eaa78
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| history.push( | ||
| shouldUseRdiUi | ||
| ? Pages.rdiPipelineManagementV2(rdiInstanceId) | ||
| : Pages.rdiPipelineManagement(rdiInstanceId), |
There was a problem hiding this comment.
Route the Pipeline tab through the v1/v2 choice
For an eligible instance, this choice runs only on the bare /integrate/:id URL. The existing Pipeline tab in useNavigation.ts lines 145–153 still navigates directly to Pages.rdiPipelineManagement(...), so a user who enters Analytics— including one restored there by the lastPage branch above—and then clicks Pipeline always gets the legacy page, bypassing the enabled v2 experience. Apply the same flag/version choice to that navigation entry point.
Useful? React with 👍 / 👎.
| const isConnectedInstanceReady = connectedInstance.id === rdiInstanceId | ||
| if (!isConnectedInstanceReady && !connectedInstance.error) { | ||
| return |
There was a problem hiding this comment.
Ignore connection errors belonging to a previous instance
When a previous RDI instance fetch left connectedInstance.error populated, entering another instance at its bare URL reaches this condition with a mismatched ID and the stale error. Although fetchConnectedInstanceAction clears the store at the start of the new request, this effect has captured the prior render's value, so it immediately pushes the legacy route; the later successful fetch cannot select v2 because the pathname is no longer bare. Wait for the current instance's request to finish or otherwise associate the failure with rdiInstanceId before falling back.
Useful? React with 👍 / 👎.
- Gate the redirect decision on contextRdiInstanceId matching rdiInstanceId, not just connectedInstance.error - a stale error left over from a previously viewed instance was being treated as "this instance failed to load" and pushing to legacy before the real fetch ever got a chance to resolve. - Route the Pipeline nav tab through the same v1/v2 choice via a new shared shouldUseRdiUiPipeline() helper, instead of always linking to the legacy page. - Use isVersionHigherOrEquals instead of isVersionHigher, matching the rest of the codebase's min-version convention - an instance at exactly 1.16.0 now gets v2. Flagged by chatgpt-codex-connector and Cursor Bugbot on PR #6465.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c1dd540. Configure here.
| </S.PlaceholderContainer> | ||
| </Row> | ||
| ) | ||
| } |
There was a problem hiding this comment.
V2 page skips last-page restore
Medium Severity
PipelineManagementV2Page never records lastPage on unmount, unlike the legacy pipeline and statistics pages. After a user opens Analytics, lastPage stays rdiStatistics, so the bare-URL entry redirect in RdiInstancePage always sends them back to Analytics instead of the pipeline they actually left.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c1dd540. Configure here.


What
Second PR in the rdi-ui integration chain (stacked on #6464).
Registers a new
pipeline-management-v2placeholder page/route, to be wired up with the realrdi-uicomponent in a follow-up PR. The choice between the legacy pipeline management page and this new one is made once, when entering an RDI instance (RdiInstancePage), based on thedev-rdiUiflag and whether the instance version is above1.16— not inside the destination pages themselves, so a future manual v1/v2 switcher won't fight an automatic redirect on every render.Key points:
redisinsight/ui/src/config/default.ts:features.rdiUi.minSupportedVersion(env-overridable viaRI_FEATURES_RDI_UI_MIN_SUPPORTED_VERSION, default1.16.0), following the same pattern asfeatures.envDependent/features.cloudAds.RdiInstancePage: extended its existing bare-URL default-route effect to also decide legacy vs. v2, waiting for the connected instance to actually finish loading (checked viaconnectedInstance.id === rdiInstanceId, notloading, to avoid a stale-closure race) and falling back to legacy if the connect fetch fails.pipeline-management-v2page: an unconditional placeholder for now — no redirect/version logic lives in the page itself.rdi-uilibrary) — that's a separate follow-up PR.Testing
npm run lint:uiand relevant Jest suites pass (InstancePage.spec.tsx,PipelineManagementV2Page.spec.tsx,PipelineManagementPage.spec.tsx— the latter is untouched/reverted to its original state).No ticket yet.
Note
Low Risk
UI-only routing and feature-flag gating with safe fallback to legacy pipeline management on load failure; no auth or data-layer changes.
Overview
Introduces a
pipeline-management-v2route and placeholder page (ahead of wiring realrdi-ui), and centralizes legacy vs. new pipeline UI routing in one place.Routing & config: New page constants and lazy route registration sit alongside legacy pipeline management. Config adds
features.rdiUi.minSupportedVersion(default1.16.0, overridable viaRI_FEATURES_RDI_UI_MIN_SUPPORTED_VERSION).shouldUseRdiUiPipelineenables v2 only when thedev-rdiUiflag is on and the connected RDI instance version meets that minimum.Entry behavior:
RdiInstancePageno longer always sends bare/integrate/:idURLs to legacy pipeline management—it waits until the connected instance for that ID is ready (or a real load failure for that context), then redirects to v2 or legacy. Stale errors from a previous instance are ignored until context matches. Navigation uses the same helper so the Pipeline tab targets the matching URL.Tests: Expanded
InstancePagecoverage for v2 redirect, minimum version, loading deferral, stale errors, failed connect fallback, and Pipeline tab navigation; smoke test for the v2 placeholder.Reviewed by Cursor Bugbot for commit c1dd540. Bugbot is set up for automated code reviews on this repo. Configure here.