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

Fix typo, improve destination validations #832

Merged
merged 4 commits into from
Oct 31, 2024
Merged

Conversation

petewall
Copy link
Collaborator

No description provided.

Signed-off-by: Pete Wall <pete.wall@grafana.com>
@petewall petewall self-assigned this Oct 31, 2024
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows for invalid types to pass schema validation... only to be caught by the template validation. It greatly improves the quality of the error message if you're missing a type or use an invalid type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing the destination validation before feature validation to catch these issues earlier.
For example, if your values file had this:

destinations:
  - name: prom
    type: prom   # invalid type
clusterMetrics:
  enabled: true

The error message will say that Cluster Metrics requires a metrics destination, not that "prom" is not a valid destination type.

Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
@petewall petewall requested review from a team, skl, nevermind89x and jewbetcha and removed request for a team October 31, 2024 17:01
… is empty

Signed-off-by: Pete Wall <pete.wall@grafana.com>
@petewall petewall merged commit eafe32e into main Oct 31, 2024
21 checks passed
@petewall petewall deleted the fix/typos-and-validation branch October 31, 2024 17:18
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.

2 participants