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

ServiceScene: Retain loading state when query parser was incorrect #710

Conversation

gtk-grafana
Copy link
Contributor

@gtk-grafana gtk-grafana commented Aug 21, 2024

Fixes: #705

Currently the change of the service variable triggers a query, the response changes the format variable, which triggers another logsPanel query with the correct parser. We don't want to set the initial fields state with the query with the invalid parser, so we set a flag when the parser changes to tell the service scene that the next response will be invalid.

A flag feels kinda icky, a better solution might be run the query explicitly like proposed in #709, which might give us more control over when these queries are run? That would allow us to prevent running the first query on change of the service, and instead we could run another query without any parser solely to determine what the parser should be for the subsequent logsPanelQuery.

Also detected_fields might make this unnecessary as well, as we would use that api call to get the count of the fields, instead of parsing the logsPanelQuery.

@gtk-grafana gtk-grafana requested a review from a team as a code owner August 21, 2024 15:56
@gtk-grafana gtk-grafana marked this pull request as draft August 21, 2024 16:01
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.

1 participant