Skip to content

Conversation

@pd-redis
Copy link
Contributor

@pd-redis pd-redis commented Nov 27, 2025

What

Fixed semantic version display for Redis modules that are not explicitly supported in the backend mapping. The issue occurred when modules like redisgears_2 would display raw numeric versions instead of properly formatted semantic versions (e.g., "20000" instead of "2.0.0").

Technical decisions:

  • Frontend-only solution: Instead of adding backend support for specific modules, implemented a generic solution that ensures all modules get proper semantic version formatting
  • Utility function approach: Created ensureSemanticVersion utility that converts numeric versions to semantic format when semanticVersion is missing
  • Applied at data layer: Integrated the conversion in the instances Redux slice to ensure consistent formatting across the entire application
  • Preserved existing behavior: Maintains existing semantic versions when already provided by the backend

Testing

Load standalone redis v7.4 in RI, open the instance, hover over the info icon in top left corner.

Resolves: RI-7831


Note

Adds utilities to convert module versions to semantic format and applies them when loading/connecting instances, with accompanying tests.

  • Utilities:
    • Add ensureSemanticVersion and convertToSemanticVersion in utils/instance/instanceModules.ts to normalize numeric module versions to semantic format; enhance getModule.
  • Instances Slice (slices/instances/instances.ts):
    • Apply ensureSemanticVersion to instance data in loadInstancesSuccess and setConnectedInstanceSuccess.
    • Update imports accordingly.
  • Tests:
    • Add comprehensive tests in utils/instance/instanceModules.spec.ts for module lookup and version normalization.
    • Update instances.spec.ts expectations for setConnectedInstanceSuccess to reflect normalized instance shape.

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

…Modules

- Add convertToSemanticVersion function to convert numeric versions to semantic format
- Add ensureSemanticVersion function with null safety checks for instance modules
- Create comprehensive test suite using DBInstanceFactory and it.each patterns
valkirilov
valkirilov previously approved these changes Nov 28, 2025
@valkirilov
Copy link
Member

It's not related to the introduced changes, but it looks like there are some issues on the backend as well, because it's reporting weird versions.

image image

Update test to include properties that reducer sets:
loading, isRediStack, isFreeDb, and db.

References: #RI-7831
@github-actions
Copy link
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 82.88% 20963/25293
🟡 Branches 68.11% 8848/12990
🟡 Functions 77.93% 5725/7346
🟢 Lines 83.3% 20530/24647

Test suite run success

5447 tests passing in 704 suites.

Report generated by 🧪jest coverage report action from e8c90fe

@pd-redis
Copy link
Contributor Author

It's not related to the introduced changes, but it looks like there are some issues on the backend as well, because it's reporting weird versions.

image image

I am not sure it is the backend that reports this, but for sure you can issue an INFO command and check what actual version is. If there is difference, then definitely this is a bug

@pd-redis pd-redis merged commit 82a8e53 into main Nov 28, 2025
19 checks passed
@pd-redis pd-redis deleted the fe/bugfix/RI-7831-modules-sem-ver branch November 28, 2025 08:41
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.

4 participants