-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
chore: remove unevalTree #34605
chore: remove unevalTree #34605
Conversation
WalkthroughThe recent changes focus on refactoring how Changes
Sequence Diagram(s)sequenceDiagram
participant UI
participant Worker
participant DataTreeEvaluator
UI->>+Worker: Send eval request
Worker->>+DataTreeEvaluator: Get old unevalTree
DataTreeEvaluator-->>Worker: Return unevalTree
Worker-->>UI: Send eval response
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- app/client/src/sagas/EvalWorkerActionSagas.ts (2 hunks)
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts (3 hunks)
Files not summarized due to errors (2)
- app/client/src/sagas/EvalWorkerActionSagas.ts: Error: Server error. Please try again later.
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts: Error: Server error. Please try again later.
const { workerResponse } = data as UpdateDataTreeMessageData; | ||
const unEvalAndConfigTree: ReturnType<typeof getUnevaluatedDataTree> = | ||
yield select(getUnevaluatedDataTree); | ||
yield call(updateDataTreeHandler, { | ||
evalTreeResponse: workerResponse as EvalTreeResponseData, | ||
unevalTree, | ||
unevalTree: unEvalAndConfigTree.unEvalTree, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure consistency in the removal of unevalTree
.
The PR aims to remove the unevalTree
feature, but this segment still references unevalTree
. This may lead to inconsistencies or errors if the feature is indeed removed elsewhere.
- unevalTree: unEvalAndConfigTree.unEvalTree,
+ // Removed the unevalTree reference as part of the feature removal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- app/client/src/sagas/EvalWorkerActionSagas.ts (2 hunks)
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts (3 hunks)
Files not summarized due to errors (2)
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts: Error: Server error. Please try again later.
- app/client/src/sagas/EvalWorkerActionSagas.ts: Error: Server error. Please try again later.
Additional comments not posted (2)
app/client/src/sagas/EvalWorkerActionSagas.ts (1)
142-147
: Ensure proper error handling forgetUnevaluatedDataTree
selector.The
getUnevaluatedDataTree
selector is used without error handling. Ensure it always returns the expected structure.#!/bin/bash # Description: Verify the `getUnevaluatedDataTree` selector always returns the expected structure. # Test: Search for the `getUnevaluatedDataTree` selector implementation. Expect: Proper error handling and return structure. ast-grep --lang typescript --pattern $'export const getUnevaluatedDataTree = $_ => { $$$ }'app/client/src/workers/Evaluation/evalTreeWithChanges.ts (1)
Line range hint
142-147
: EnsureUpdateDataTreeMessageData
structure is correctly populated.The function now returns an
UpdateDataTreeMessageData
object. Ensure all required fields are correctly populated.#!/bin/bash # Description: Verify the `UpdateDataTreeMessageData` structure is correctly populated. # Test: Search for the `UpdateDataTreeMessageData` type definition. Expect: Proper field definitions and population. ast-grep --lang typescript --pattern $'export type UpdateDataTreeMessageData = { workerResponse: EvalTreeResponseData; }'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Commits
Files that changed from the base of the PR and between c48a98e and 39e38c602393a819d3248ab49e4309cec4bc22bc.
Files selected for processing (3)
- app/client/src/sagas/EvalWorkerActionSagas.ts (2 hunks)
- app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts (2 hunks)
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts (3 hunks)
Files skipped from review due to trivial changes (1)
- app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts
Additional comments not posted (3)
app/client/src/sagas/EvalWorkerActionSagas.ts (2)
26-27
: LGTM! TheunevalTree
property has been successfully removed.The removal aligns with the PR objective to eliminate
unevalTree
from the codebase.
142-147
: LGTM! ThehandleEvalWorkerMessage
function has been updated correctly.The function now retrieves
unevalTree
fromunEvalAndConfigTree
, which centralizes the source and simplifies the message data structure.app/client/src/workers/Evaluation/evalTreeWithChanges.ts (1)
Line range hint
59-61
:
LGTM! TheevaluateAndGenerateResponse
function has been updated correctly.The function now assigns the result of
dataTreeEvaluator.getOldUnevalTree()
tounevalTree
, ensuring that it uses the existing unevaluated tree data from the evaluator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Commits
Files that changed from the base of the PR and between 39e38c602393a819d3248ab49e4309cec4bc22bc and 00483a9e225d9e518c7b92accf0eba3fc9410cc7.
Files selected for processing (3)
- app/client/src/sagas/EvalWorkerActionSagas.ts (2 hunks)
- app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts (2 hunks)
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts (3 hunks)
Files skipped from review due to trivial changes (1)
- app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts
Files skipped from review as they are similar to previous changes (2)
- app/client/src/sagas/EvalWorkerActionSagas.ts
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Commits
Files that changed from the base of the PR and between 00483a9e225d9e518c7b92accf0eba3fc9410cc7 and 73e226d.
Files selected for processing (3)
- app/client/src/sagas/EvalWorkerActionSagas.ts (2 hunks)
- app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts (2 hunks)
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts (3 hunks)
Files skipped from review as they are similar to previous changes (3)
- app/client/src/sagas/EvalWorkerActionSagas.ts
- app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts
- app/client/src/workers/Evaluation/evalTreeWithChanges.ts
## Description evalTreeWithChanges is sending a redundant property unevalTree in the payload, we should remove this property to reduce the serialisation cost of including this property in the payload. Fixes appsmithorg#34766 > [!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.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9807127090> > Commit: 73e226d > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9807127090&attempt=1&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.All > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Regression/ClientSide/PartialImportExport/PartialExport_spec.ts > <li>cypress/e2e/Regression/ClientSide/Workspace/MemberRoles_Spec.ts > <li>cypress/e2e/Regression/ClientSide/Workspace/ShareAppTests_Spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Fri, 05 Jul 2024 11:46:05 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved the handling of `unevalTree` by accessing it from `unEvalAndConfigTree` instead of directly from the message data in message handling logic. - **Tests** - Updated tests to reflect the removal of the `unevalTree` property and related assertions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
evalTreeWithChanges is sending a redundant property unevalTree in the payload, we should remove this property to reduce the serialisation cost of including this property in the payload.
Fixes #34766
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.All"
🔍 Cypress test results
Caution
🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9807127090
Commit: 73e226d
Cypress dashboard.
Tags: @tag.All
The following are new failures, please fix them before merging the PR:
Fri, 05 Jul 2024 11:46:05 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
Refactor
unevalTree
by accessing it fromunEvalAndConfigTree
instead of directly from the message data in message handling logic.Tests
unevalTree
property and related assertions.