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(explore): Prevent infinite rerenders when editing dataset #22219

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Nov 24, 2022

SUMMARY

In some scenarios, editing dataset and then running chart query might lead to an infinite rerender loop (happens inconsistently) and Explore page crashing. Investigation proved that it's related to removing warnings about changed dataset in controls after a successful query. This PR makes updating Redux state conditional in order to run actions dispatch only when necessary and prevent infinite state updates.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@kgabryje
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

@kgabryje Container image not yet published for this PR. Please try again when build is complete.

@github-actions
Copy link
Contributor

@kgabryje Ephemeral environment creation failed. Please check the Actions logs for details.

@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Merging #22219 (137188e) into master (3bc0865) will increase coverage by 0.00%.
The diff coverage is 44.44%.

@@           Coverage Diff           @@
##           master   #22219   +/-   ##
=======================================
  Coverage   66.92%   66.92%           
=======================================
  Files        1835     1835           
  Lines       69988    69992    +4     
  Branches     7612     7614    +2     
=======================================
+ Hits        46839    46842    +3     
- Misses      21183    21184    +1     
  Partials     1966     1966           
Flag Coverage Δ
javascript 53.75% <44.44%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../src/explore/components/ControlPanelsContainer.tsx 75.34% <44.44%> (-0.01%) ⬇️
.../plugins/plugin-chart-echarts/src/utils/tooltip.ts 5.88% <0.00%> (ø)
...ns/plugin-chart-echarts/src/Tree/transformProps.ts 81.81% <0.00%> (ø)
...s/plugin-chart-echarts/src/Graph/transformProps.ts 72.36% <0.00%> (ø)
...plugin-chart-echarts/src/BoxPlot/transformProps.ts 55.00% <0.00%> (ø)
...gin-chart-echarts/src/Timeseries/transformProps.ts 52.27% <0.00%> (ø)
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% <0.00%> (ø)
...BigNumber/BigNumberWithTrendline/transformProps.ts 47.82% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

Tested locally. It appears the issue is fixed. Thanks!

@kgabryje kgabryje merged commit d1e576c into apache:master Nov 25, 2022
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Nov 28, 2022
@sadpandajoe
Copy link
Member

🏷️ preset:2022.47

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants