cube icon indicating copy to clipboard operation
cube copied to clipboard

BUG: Fix QueryBuilder to AVOID Maximum recursive updates exceeded

Open nsandroni opened this issue 1 year ago • 3 comments

fix: Maximum recursive updates exceeded

Check List

  • [x] Tests has been run in packages where changes made if available
  • [x] Linter has been run for changed code
  • [x] Tests for the changes have been added if not covered yet
  • [x] 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

nsandroni avatar Aug 08 '24 14:08 nsandroni

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

vercel[bot] avatar Aug 08 '24 14:08 vercel[bot]

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

Thanks

ovr avatar Aug 09 '24 07:08 ovr

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 avatar Aug 27 '24 10:08 nsandroni

with (from?) the version 0.35.23 the bug is not visible...

nsandroni avatar Sep 20 '24 12:09 nsandroni

@nsandroni Do you mean that the bug does not reproduce on the latest version anymore?

igorlukanin avatar Sep 24 '24 11:09 igorlukanin

@nsandroni Do you mean that the bug does not reproduce on the latest version anymore?

No, currently i'm not experiencing this bug anymore... I'm closing this PR for now, if i'll see again in the future i'll open another one

nsandroni avatar Sep 24 '24 12:09 nsandroni