Skip to content

fix: disallows page load to automatic transition in run behaviour for older actions#40755

Merged
sneha122 merged 3 commits intoreleasefrom
fix/disallow-page-load-to-automatic-transition
May 27, 2025
Merged

fix: disallows page load to automatic transition in run behaviour for older actions#40755
sneha122 merged 3 commits intoreleasefrom
fix/disallow-page-load-to-automatic-transition

Conversation

@sneha122
Copy link
Contributor

@sneha122 sneha122 commented May 26, 2025

Description

This PR updates run behaviour logic so that it does not transition from page load to automatic for older actions. This allows users to be intentional about their choice to be automatic with older actions.

Fixes #40752
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/15271052226
Commit: 1aaa575
Cypress dashboard.
Tags: @tag.Sanity
Spec:


Tue, 27 May 2025 09:39:01 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Tests

    • Added a new test to verify that executables with "ON_PAGE_LOAD" run behavior are not incorrectly updated when a specific feature flag is enabled.
  • Refactor

    • Simplified internal logic for checking run behavior, making the code more concise without changing functionality.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 26, 2025

Walkthrough

The update refactors the updateExecutablesRunBehaviour method by replacing a local variable with direct inline condition checks, simplifying the control flow. Additionally, a new test is introduced to verify that executables with ON_PAGE_LOAD run behavior are not updated to AUTOMATIC when a specific feature flag is enabled.

Changes

File(s) Change Summary
.../OnLoadExecutablesUtilCEImpl.java Refactored updateExecutablesRunBehaviour to use inline conditionals instead of a local variable.
.../OnLoadExecutablesUtilCEImplTest.java Added a test to confirm no update occurs from ON_PAGE_LOAD to AUTOMATIC when the feature flag is enabled.

Sequence Diagram(s)

sequenceDiagram
    participant Test as OnLoadExecutablesUtilCEImplTest
    participant Util as OnLoadExecutablesUtilCEImpl
    participant FeatureFlag as FeatureFlagService

    Test->>Util: updateExecutablesRunBehaviour(existing, updated, ...)
    Util->>FeatureFlag: isEnabled("release_reactive_actions_enabled")
    FeatureFlag-->>Util: true
    Util-->>Test: true (no update to run behavior)
Loading

Possibly related PRs

  • appsmithorg/appsmith#40671: Introduced feature flag and AUTOMATIC run behavior enum used in the updated method logic.
  • appsmithorg/appsmith#40726: Simplified conditional checks in updateExecutablesRunBehaviour with feature-flag-driven dynamic behavior and messaging.

Suggested labels

Core Query Execution, Task, ok-to-test

Suggested reviewers

  • NilanshBansal

Poem

Refactored lines, concise and neat,
Inline checks make logic fleet.
A test arrives to guard the way,
Ensuring flags don’t lead astray.
Behaviors run, but only when told—
In code’s embrace, precision unfolds!
🎉🧑‍💻


📜 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 7f7c130 and 1aaa575.

📒 Files selected for processing (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCEImpl.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/server/appsmith-server/src/main/java/com/appsmith/server/onload/internal/OnLoadExecutablesUtilCEImpl.java
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: server-unit-tests / server-unit-tests
  • GitHub Check: server-spotless / spotless-check
✨ 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.

@github-actions github-actions bot added the Bug Something isn't working label May 26, 2025
@sneha122 sneha122 requested a review from subrata71 May 26, 2025 13:36
subrata71
subrata71 previously approved these changes May 27, 2025
@sneha122 sneha122 added the ok-to-test Required label for CI label May 27, 2025
@github-actions github-actions bot added High This issue blocks a user from building or impacts a lot of users Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Pod Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Release labels May 27, 2025
@sneha122 sneha122 merged commit 4f6b1e6 into release May 27, 2025
50 checks passed
@sneha122 sneha122 deleted the fix/disallow-page-load-to-automatic-transition branch May 27, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Pod Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI 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]: We should not update run behaviour to automatic for older actions on any layout update api call

2 participants