Skip to content

PersesDashboard annotations (folder-path, sharing, source) lost during conversion #103

@mmanciop

Description

@mmanciop

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

  1. Create a PersesDashboard YAML with a dash0.com/folder-path annotation:
    apiVersion: perses.dev/v1alpha1
    kind: PersesDashboard
    metadata:
      name: my-dashboard
      annotations:
        dash0.com/folder-path: /my/folder
    spec:
      display:
        name: My Dashboard
  2. Run dash0 apply -f dashboard.yaml or dash0 dashboards create -f dashboard.yaml
  3. Retrieve the dashboard — the folder-path annotation is missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions