-
Notifications
You must be signed in to change notification settings - Fork 1
PersesDashboard annotations (folder-path, sharing, source) lost during conversion #103
Description
Problem
When creating or updating dashboards from a PersesDashboard CRD (either via apply or dashboards create), user-settable annotations (dash0.com/folder-path, dash0.com/sharing, dash0.com/source) are silently dropped.
The ConvertToDashboard() function in internal/asset/persesdashboard.go copies dash0.com/id from labels into dash0Extensions.id, but does not copy any annotations from the Perses CRD metadata into the typed DashboardAnnotations struct.
This only affects the PersesDashboard code path — regular kind: Dashboard definitions work correctly because their typed Annotations struct is deserialized directly.
Expected behavior
Annotations set on a PersesDashboard CRD should be carried through to the API request, just as they are for regular Dashboard definitions.
Steps to reproduce
- Create a PersesDashboard YAML with a
dash0.com/folder-pathannotation:apiVersion: perses.dev/v1alpha1 kind: PersesDashboard metadata: name: my-dashboard annotations: dash0.com/folder-path: /my/folder spec: display: name: My Dashboard
- Run
dash0 apply -f dashboard.yamlordash0 dashboards create -f dashboard.yaml - Retrieve the dashboard — the
folder-pathannotation is missing