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

Explore: Clear errors after running a new query #30367

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

ivanahuckova
Copy link
Member

@ivanahuckova ivanahuckova commented Jan 18, 2021

Issue:
Any query error creates the red box. Changing and re-submitting query does not clear the error nor does it indicate a query was submitted, only if the follow up comes back with a 200 does it clear the error. +cc @slim-bean

What this PR does / why we need it:
This PR fixes the issue on 2 levels:

  • It clears the red box if the queryResponse.state changes from Error to Loading, so we don't have to wait for the new queryResponse.
  • When processing query response, we don't assume that loading was finished, but rely on actual loading state.

Before:
before
After:
after

Fixes:
#29242

@ivanahuckova ivanahuckova requested review from a team, aocenas and zoltanbedi and removed request for a team January 18, 2021 18:10
@ivanahuckova ivanahuckova self-assigned this Jan 18, 2021
@ivanahuckova
Copy link
Member Author

ivanahuckova commented Jan 18, 2021

@davkal @aocenas Is there a reason why we were setting loading state to false in processQueryResponse and not to value based on LoadingState?

@zoltanbedi
Copy link
Member

Probably fixes #29242 as well

Copy link
Member

@aocenas aocenas left a comment

Choose a reason for hiding this comment

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

Looks good, I assume the reason was that we did not have the sates specified the same way as now, back then. For example I think we did not do partial responses at the time so when you got response we assumed it was the end of it.

@ivanahuckova ivanahuckova added this to the 7.4.0-beta1 milestone Jan 19, 2021
@ivanahuckova ivanahuckova merged commit 1cecc7f into master Jan 19, 2021
@ivanahuckova ivanahuckova deleted the ivana/remove-error-after-running-query branch January 19, 2021 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants