appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Bug]: Incorrect Cyclic Dependency

Open Nikhil-Nandagopal opened this issue 2 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

We've introduced a new cyclic dependency issue with the AST parsing. We're incorrectly detecting cyclic dependency when a query is trying to perform cursor pagination.

Steps To Reproduce

  1. Drag a table
  2. Connect to firestore
  3. Create a select query
  4. bind the query to the table {{fetchData.data}}
  5. Bind the table to the query to fetch data after {{Table1.tableData[Table1.tableData.length - 1]}}

Public Sample App

https://release.app.appsmith.com/app/crud-app-templates/firestore-61764fbeba7e887d03bc3641/edit#8o4npzin85

Issue video log

No response

Version

Cloud

Nikhil-Nandagopal avatar Dec 27 '22 14:12 Nikhil-Nandagopal

We have downgraded the level of severity to High as it is not impacting many users and we haven't heard about it from a-force as well. Moreover, we haven't seen any cyclical dependency if we bind the table in the query through this binding {{Table1.tableData.length - 1}}. Hence, we have added the label Cannot Reproduce Issue.

The dynamic binding used for pagination also doesn't seem to be an intended one. This {{Table1.tableData[Table1.tableData.length - 1]}} will resolve into the entire table row but it's expected to pass numbers in pagination.

However, if we see more users reporting such cases we will take this up with priority.

cc: @riteshkew

subrata71 avatar Dec 29 '22 11:12 subrata71

@subrata71 it is critical because it used to work before. So this means we've actually regressed in this case and potentially even broken users apps. My CRUD app used to work before and is now broken. The binding is intended because it's a cursor-based pagination and not an offset based one.

Nikhil-Nandagopal avatar Dec 29 '22 12:12 Nikhil-Nandagopal

@Nikhil-Nandagopal Can you please share the app?

subrata71 avatar Dec 29 '22 13:12 subrata71