OBSINTA-1397: fix(perses): fall back to metadata.name when dashboard display name is missing#998
Conversation
…s missing Newly created PersesDashboard CRs show blank names in the list page until the Perses operator reconciles them. Fall back to metadata.name so dashboards are identifiable immediately. This matches the pattern already used in useDashboardsData.ts and dashboard-import-dialog.tsx. Signed-off-by: Raj Zalavadia <[email protected]> Co-Authored-By: Claude Opus 4.6 <[email protected]>
WalkthroughIn ChangesDashboard Display Name Fallback
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jgbernalp, rajusem The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@rajusem: This pull request references OBSINTA-1397 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/label qe-approved |
|
/hold for COO 1.5.0 release |
|
/cherry-pick release-coo-ocp-4.22 release-coo-ocp-4.19 release-coo-ocp-4.15 |
|
@jgbernalp: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@rajusem: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/unhold |
|
@jgbernalp: new pull request created: #1005 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |

Summary
Fall back to
metadata.namewhenspec.display.nameis missing in the Perses dashboard listtable.Problem
When new PersesDashboard CRs are created (e.g. during an MCO→MCOA right-sizing mode switch), thedashboard list page shows blank names until the Perses operator reconciles them.
Screenshot shows: 4 right-sizing dashboards with blank names in
observability-analytics,while 2 pre-existing COO dashboards inopenshift-cluster-observability-operatordisplay names correctly.Data flow
Creator (e.g. MCOA) → PersesDashboard CR (has spec.config.display.name) → Perses operatorreconciles → Perses server API → monitoring-plugin reads /api/v1/dashboards
The CRs have the display name set correctly from the start. The issue is that themonitoring-plugin reads from the Perses server API, not from the CRs. Before the Perses operator reconciles the CR into the server,
spec.displaynameis not available in the API response — resulting in blank rows.Root Cause
dashboard-list.tsxline 229 reads onlyboard?.spec?.display?.namewith no fallback:Existing pattern
The same fallback is already used elsewhere in this codebase:
Summary by CodeRabbit