fix: white screen crash for custom Docker tags
Description
Problem
Configuration page crashed when users configured Docker images with custom tags not in the predefined dockerImagesConfig list (PostgreSQL versions 9.6-17 with specific tags like 0.5.3, 0.5.2, 0.5.1).
Root cause: formatConfig() only extracted dockerTag for SE images, causing currentDockerImage to be undefined for Generic Postgres images.
Solution
-
Fixed dockerTag extraction - Now extracts tags for all images with
: - Enhanced image handling - Auto-adds custom images to predefined list
- Added safety checks - Prevents crashes on undefined objects
-
Performance optimization - Added
useMemoto avoid array recreation
Result
| Image | Before | After |
|---|---|---|
postgresai/extended-postgres:16-0.5.4 |
|
|
postgresai/extended-postgres:18-0.6.0 |
|
|
Predefined tags (16-0.5.3) |
|
|
config.yaml and it will automatically appear in the UI dropdown without requiring frontend updates.
Related issue
bug: white screen when user uses postgres image... (#633)
Examples
Checklist
-
MR description has been reviewed -
MR changes are functionally tested -
MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed & DOCS ARE ADJUSTED (reference doc, etc) -
MR does NOT have UI changes OR there are UI changes and they have been reviewed & UX IS REVIEWED