Skip to content

Validate dashboard YAML before deploy (#60) - #70

Merged
JohanLorenzo merged 1 commit into
mozilla:mainfrom
JohanLorenzo:worktree-create-dashboards
Oct 9, 2026
Merged

JohanLorenzo merged 1 commit into
mozilla:mainfrom
JohanLorenzo:worktree-create-dashboards

Conversation

@JohanLorenzo

Copy link
Copy Markdown
Collaborator

A new widget with no id, or with id: null, used to fail with a generic "Failed to parse dashboard YAML" error. Dashboards now fail before any API call, and the message names the widget and says to write id: 0. Both inputs stay rejected, so a typo in an existing ID still surfaces as an error.

Validation deserializes into the existing dashboard structs, so each error carries the widget path. A second check reports every widget without content in one run.

Evidence, dashboards deploy repro with a one-widget dashboard:

Before:

⚠ Dashboard 'repro' failed to deploy: Failed to parse dashboard YAML

After, with no id:

⚠ Dashboard 'repro' failed to deploy: Failed to parse dashboards/0-repro.yaml: widgets[0].id: missing or null id (use `id: 0` for a new widget)

With id: 0, validation passes and the request reaches the API.

Fixes #60

@JohanLorenzo
JohanLorenzo marked this pull request as ready for review October 9, 2026 13:52
@JohanLorenzo
JohanLorenzo merged commit 069a081 into mozilla:main Oct 9, 2026
6 checks passed
@JohanLorenzo
JohanLorenzo deleted the worktree-create-dashboards branch October 9, 2026 13:52
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

Successfully merging this pull request may close these issues.

Add more instructions for creating dashboards

1 participant