Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot move dashboard to another folder #580

Open
dmanc opened this issue Feb 3, 2025 · 0 comments
Open

[Bug]: Cannot move dashboard to another folder #580

dmanc opened this issue Feb 3, 2025 · 0 comments

Comments

@dmanc
Copy link
Contributor

dmanc commented Feb 3, 2025

Grizzly Version

v0.7.1

Expected Behavior

grr apply grr.jsonnet
Applying 2 resources
DashboardFolder.sample updated
Dashboard.prod-overview updated
2 resource updated

Actual Behavior

grr apply grr.jsonnet
Applying 2 resources
DashboardFolder.sample updated
Dashboard.prod-overview unchanged
1 resource updated, 1 resource unchanged

Steps to Reproduce

Using dashboard-simple.libsonnet, folder-simple.libsonnet, and grizzly/grizzly.libsonnet from the examples directory.

local dashboard = import 'dashboard-simple.libsonnet';
local folder = import 'folder-simple.libsonnet';
local grr = import 'grizzly/grizzly.libsonnet';
{
  folders: [
    grr.folder.new('sample', 'Sample'),
  ],
  dashboards: [
    grr.dashboard.new('prod-overview', dashboard)
  ],
}

Running grr apply grr.jsonnet creates a folder called Sample and a dashboard in the default location.

Changing grr.jsonnet to

local dashboard = import 'dashboard-simple.libsonnet';
local folder = import 'folder-simple.libsonnet';
local grr = import 'grizzly/grizzly.libsonnet';
local encoder = import 'eigenda/encoder/main.libsonnet';
{
  folders: [
    grr.folder.new('sample', 'Sample'),
  ],
  dashboards: [
    grr.dashboard.new('prod-overview', dashboard)
    + grr.resource.addMetadata('folder', 'sample'),
  ],
}

Shows the following diff


Dashboard.prod-overview changes detected:
--- Remote
+++ Local
@@ -1,7 +1,7 @@
 apiVersion: grizzly.grafana.com/v1alpha1
 kind: Dashboard
 metadata:
-    folder: general
+    folder: sample
     name: prod-overview
 spec:
     schemaVersion: 17

but applying it leaves the dashboard unchanged.

grr apply grr.jsonnet
Applying 2 resources
DashboardFolder.sample updated
Dashboard.prod-overview unchanged
1 resource updated, 1 resource unchanged

Is this type of action supported?

@dmanc dmanc added the bug label Feb 3, 2025
@Duologic Duologic removed the bug label Feb 13, 2025
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

No branches or pull requests

2 participants