Skip to content

Conversation

ankitakinger
Copy link
Contributor

@ankitakinger ankitakinger commented Jul 7, 2025

Description

Adding an additional check to show correct cyclic dependency errors in the Reactive flow

Fixes #41070

Automation

/ok-to-test tags="@tag.All"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/16123657082
Commit: 278e7c4
Cypress dashboard.
Tags: @tag.All
Spec:


Mon, 07 Jul 2025 18:39:20 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Bug Fixes
    • Improved error detection for reactive dependency misuse, ensuring errors are only raised when trigger and data paths originate from the same entity.

Copy link
Contributor

coderabbitai bot commented Jul 7, 2025

Walkthrough

The change updates detectReactiveDependencyMisuse to pass configTree to getAllTransitiveDependencies, which now filters dependencies to only traverse entities present in configTree and of types ActionConfig or JSActionConfig. The error condition is refined to only throw if trigger and data paths share the same entity name.

Changes

File(s) Change Summary
app/client/src/entities/DependencyMap/DependencyMapUtils.ts Added configTree parameter to getAllTransitiveDependencies for filtering; refined error condition in detectReactiveDependencyMisuse to check entity name equality between trigger and data paths

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant DependencyMapUtils

    Caller->>DependencyMapUtils: detectReactiveDependencyMisuse(node, configTree)
    DependencyMapUtils->>DependencyMapUtils: getAllTransitiveDependencies(node, configTree)
    DependencyMapUtils->>DependencyMapUtils: Filter dependencies by configTree and entity type
    DependencyMapUtils->>DependencyMapUtils: Check for trigger and data paths
    DependencyMapUtils->>DependencyMapUtils: Compare entity names of paths
    alt Same entity for trigger and data
        DependencyMapUtils-->>Caller: Throw misuse error
    else
        DependencyMapUtils-->>Caller: No error
    end
Loading

Possibly related PRs

Suggested labels

IDE Product, Core Query Execution, IDE Pod, Medium, Query Widgets & IDE Pod

Suggested reviewers

  • sneha122
  • ApekshaBhosale

Poem

When dependencies tangle and cross the line,
Now we check if their roots align.
Only if they share the same name,
Will we call out the misuse game.
With logic refined and errors precise,
The code grows ever more concise!
🌱✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b906cab and 278e7c4.

📒 Files selected for processing (1)
  • app/client/src/entities/DependencyMap/DependencyMapUtils.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/src/entities/DependencyMap/DependencyMapUtils.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-unit-tests / client-unit-tests
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ankitakinger ankitakinger self-assigned this Jul 7, 2025
@ankitakinger ankitakinger added the ok-to-test Required label for CI label Jul 7, 2025
@github-actions github-actions bot added the Bug Something isn't working label Jul 7, 2025
@ankitakinger
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Jul 7, 2025

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/16125536298.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 41090.
recreate: .

Copy link

github-actions bot commented Jul 7, 2025

Deploy-Preview-URL: https://ce-41090.dp.appsmith.com

@github-actions github-actions bot added Core Query Execution Issues related to the execution of all queries High This issue blocks a user from building or impacts a lot of users Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage PR blocker Critical issues raised during feature testing & need to be fixed before PR is pushed to master Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Release labels Jul 8, 2025
@ankitakinger ankitakinger merged commit 5bc92d0 into release Jul 8, 2025
87 checks passed
@ankitakinger ankitakinger deleted the fix/reactive-cyclic-dependencies branch July 8, 2025 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Core Query Execution Issues related to the execution of all queries High This issue blocks a user from building or impacts a lot of users Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI PR blocker Critical issues raised during feature testing & need to be fixed before PR is pushed to master Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: An error toast appears every time a user creates a CRUD page
2 participants