-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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(sqllab): flaky json explore modal due to over-rendering #26156
fix(sqllab): flaky json explore modal due to over-rendering #26156
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #26156 +/- ##
==========================================
+ Coverage 69.10% 69.13% +0.03%
==========================================
Files 1940 1942 +2
Lines 75869 75886 +17
Branches 8445 8452 +7
==========================================
+ Hits 52427 52462 +35
+ Misses 21267 21250 -17
+ Partials 2175 2174 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(cherry picked from commit f30f685)
…pache#26156)" This reverts commit 77c73b6.
…pache#26156)" This reverts commit 77c73b6.
…ing (apache#26156)" (apache#26284) (cherry picked from commit 8450cca)
SUMMARY
The queries state contains the status and results of running and completed queries, making it fragile. Since the SouthPane observes the entire queries state, it often causes over-rendering. This means that the current result panel will trigger rendering at each interval of checking pending queries.
This causes the visibility of the JSON modal to be flaky because the modal disappears when it is re-rendered.
This commit reduces the observation of queries properties to resolve the over-rendering issue. (As a result, the completed result panel component will not be disturbed by the status updates of other pending queries.)
In addition, this commit enhances the queriesLastUpdate timestamp by incrementally updating it only when its query result remains unchanged.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
before--overrendering.mov
After:
Issue is gone
after--overrendering.mov
TESTING INSTRUCTIONS
Go to SQL Lab and run a query contains a json blob
Select a table in order to execute a table preview query
Click
Results
tab before the table preview query ends and then click the JSON column to open the JSON modalCheck the JSON modal persists while the async query status is updating
ADDITIONAL INFORMATION