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

BUG: Fix QueryBuilder to AVOID Maximum recursive updates exceeded #8556

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nsandroni
Copy link

@nsandroni nsandroni commented Aug 8, 2024

fix: Maximum recursive updates exceeded

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue Reference this PR resolves

Passing a dynamic query to the query builder, can cause "Maximum recursive updates exceeded"

Description of Changes Made (if issue reference is not provided)

Avoiding the preValidatedQuery mutation inside the computed block, the error is no loger thronw

fix: Maximum recursive updates exceeded
@nsandroni nsandroni requested a review from a team as a code owner August 8, 2024 14:14
Copy link

vercel bot commented Aug 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-angular-dashboard ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 2:32pm
examples-react-d3 ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 2:32pm
examples-react-dashboard ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 2:32pm
examples-react-data-table ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 2:32pm
examples-react-highcharts ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 2:32pm
examples-react-material-ui ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 2:32pm
examples-react-pivot-table ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 2:32pm
examples-vue-query-builder ⬜️ Ignored (Inspect) Visit Preview Aug 27, 2024 2:32pm

@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Aug 8, 2024
@nsandroni nsandroni changed the title Fix QueryBuilder to AVOID Maximum recursive updates exceeded BUG: Fix QueryBuilder to AVOID Maximum recursive updates exceeded Aug 8, 2024
@ovr
Copy link
Member

ovr commented Aug 9, 2024

@nsandroni, Could you please write a unit test for it?

Thanks

@nsandroni nsandroni marked this pull request as draft August 26, 2024 11:08
@nsandroni
Copy link
Author

it turned out that not only prevValidatedQuery can cause a computed loop, but also pivotConfig and every parameter of the query saved inside copyQueryFromProps (that are used inside the validation), i added a check before the update to prevent computed loop with the same values

@nsandroni nsandroni marked this pull request as ready for review August 27, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:community Contribution from Cube.js community members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants