Skip to content

Feature/ri 7632 rdi api v2 support#5433

Open
ArtemHoruzhenko wants to merge 18 commits intomainfrom
feature/RI-7632-rdi-api-v2-support
Open

Feature/ri 7632 rdi api v2 support#5433
ArtemHoruzhenko wants to merge 18 commits intomainfrom
feature/RI-7632-rdi-api-v2-support

Conversation

@ArtemHoruzhenko
Copy link
Contributor

@ArtemHoruzhenko ArtemHoruzhenko commented Feb 3, 2026

What

This PR adds support for RDI API v2 with automatic version detection and graceful fallback to v1.

Key Changes

  • API v2 Client: New ApiV2RdiClient that extends v1 client with automatic version detection
  • Statistics Rework: Unified statistics model supporting both v1 and v2 API responses with new transformers
  • Status Rework: Unified RdiPipelineStatus model with proper Start/Stop button logic for v2 statuses
  • Components Statistics: Support for fetching and transforming component-level statistics from v2 endpoints

Included PRs

Testing

All changes were reviewed and tested in individual PRs before merging to feature branch.


Note

Medium Risk
Introduces a new API v2 code path with runtime version detection and reshapes status/statistics responses, which can affect UI rendering and pipeline control behavior if mappings or transformers are wrong.

Overview
Adds RDI API v2 support by introducing ApiV2RdiClient and updating RdiClientFactory to probe api/v2/info, then auto-select a pipeline and fall back to v1 when v2 isn’t available.

Reworks pipeline status and statistics to return unified, typed models: v1 status responses are transformed into RdiPipelineStatus, statistics now return a sections[] array (table/blocks/info) produced by new v1/v2 transformers (including a v2-only Component Status section) and shared column-generation utilities.

Updates controllers/services/tests to drop the sections query param, add getVersion() to the client contract, adjust RDI version discovery, and refactors the UI to render statistics dynamically from sections[] plus updated start/stop button logic for v2 statuses.

Written by Cursor Bugbot for commit 673f7fb. This will update automatically on new commits. Configure here.

ArtemHoruzhenko and others added 16 commits December 11, 2025 11:50
…e-initial

RI-7632: initial implementation of v2 api client
…2-rdi-api-v2-statistics-rework

# Conflicts:
#	redisinsight/ui/src/pages/rdi/statistics/status/styles.ts
#	redisinsight/ui/src/pages/rdi/statistics/styles.ts
…tics-rework

RI-7632: rework API for RDI statistics
* RI-7632: rework statistics for api/v2 client

* capitalize enum

* change component name type
# Conflicts:
#	redisinsight/ui/src/pages/rdi/statistics/clients/Clients.tsx
#	redisinsight/ui/src/pages/rdi/statistics/data-streams/DataStreams.tsx
#	redisinsight/ui/src/pages/rdi/statistics/processing-performance/ProcessingPerformance.tsx
#	redisinsight/ui/src/pages/rdi/statistics/target-connections/TargetConnections.spec.tsx
#	redisinsight/ui/src/pages/rdi/statistics/target-connections/TargetConnections.tsx
* RI-7632: rework statistics for api/v2 client

* RI-7632: RDI API V2 Status Rework

* RI7632: fix typer

* RI-7632: fix tests after removing debug v1 get status call

* consider deploy loading to disable action buttons

* change icon for stopped status

* consider reset/deploy on action buttons

* fix integration tests

* address PR comments

* remove leftovers after merge

* fix section after redis-ui update

* fix tables
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 92.55% 14443/15606
🟡 Branches 74.78% 4534/6063
🟢 Functions 86.35% 2239/2593
🟢 Lines 92.36% 13800/14942

Test suite run success

3153 tests passing in 297 suites.

Report generated by 🧪jest coverage report action from 673f7fb

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.86% 21207/25595
🟡 Branches 68.18% 8970/13157
🟡 Functions 78.07% 5804/7434
🟢 Lines 83.25% 20766/24945

Test suite run success

5628 tests passing in 707 suites.

Report generated by 🧪jest coverage report action from 673f7fb

* RI-7632: rework statistics for api/v2 client

* RI-7632: RDI API V2 Status Rework

* RI7632: fix typer

* RI-7632: add components statistics

* add back removed tests by mistake
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Code Coverage - Integration Tests

Status Category Percentage Covered / Total
🟢 Statements 80.74% 16665/20638
🟡 Branches 63.54% 7567/11908
🟡 Functions 69.4% 2330/3357
🟢 Lines 80.35% 15668/19499

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

KrumTy
KrumTy previously approved these changes Feb 4, 2026
Copy link
Contributor

@KrumTy KrumTy left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just some minor suggestions that now I see AI has also caught apparently:

- Change let to const for variables that aren't reassigned
- Move v2 client instantiation inside try block to avoid waste on fallback
- Add Logger for version detection fallback visibility
- Remove unused StatisticsColumnFactory from test factories

References: #RI-7632
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.

2 participants