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

show error message in GrafanaDashboard CR when json in CR is invalid #1021

Open
czchen opened this issue Apr 28, 2023 · 2 comments
Open

show error message in GrafanaDashboard CR when json in CR is invalid #1021

czchen opened this issue Apr 28, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on. v5 A v5 specifc issue/feature

Comments

@czchen
Copy link

czchen commented Apr 28, 2023

Is your feature request related to a problem? Please describe.

When json in GrafanaDashboard CR is invalid, the error message is only available in grafana-operator, but not CR itself. The GrafanaDashboard CR has no indicator that the json is invalid, and user does not know what's wrong until checking grafana-operator log.

(If applicable)If your feature request solves a bug please provide a link to the community issue
N/A

Describe the solution you'd like

When json in GrafanaDashboard CR is invalid, the error message shall be available in GrafanaDashboard CR itself so that user knows there is problem in json.

Describe alternatives you've considered
N/A

Additional context
N/A

Existing solutions
N/A

@czchen czchen added enhancement New feature or request needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 28, 2023
@NissesSenap NissesSenap added triage/accepted Indicates an issue or PR is ready to be actively worked on. v5 A v5 specifc issue/feature and removed needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 28, 2023
@bukovjanmic
Copy link

The same is valid for other CRs as well.

For example, one of our users defined a GrafanaDatasource with a reference to a Secret, but with a key in Secret missing.

The error is logged in operator logs, where users do not have access. The CR itself was left intact, with no change in status field, so from users perspective it seems the GrafanaDatasource is just ignored by the operator.

What should happen is that the error message that is logged in operator logs should also appear in the status section of the CR as well.

@theSuess
Copy link
Member

We recently introduced status conditions for the dashboard resource and are tracking conditions implementation in #1450.

Keeping this open to make sure the specific use case of invalid json is correctly reported.

Now that status.conditions is implemented for the dashboard resource, this would be a good first contribution to the project

@theSuess theSuess added the good first issue Good for newcomers label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers triage/accepted Indicates an issue or PR is ready to be actively worked on. v5 A v5 specifc issue/feature
Projects
None yet
Development

No branches or pull requests

4 participants