Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions app/client/src/sagas/EvaluationsSaga.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ describe("evaluateTreeSaga", () => {
[select(getCurrentPageDSLVersion), 1],
])
.call(evalWorker.request, EVAL_WORKER_ACTIONS.EVAL_TREE, {
cacheProps: {
instanceId: "instanceId",
appId: "applicationId",
pageId: "pageId",
appMode: false,
timestamp: new Date("11 September 2024").toISOString(),
dslVersion: 1,
},
unevalTree: unEvalAndConfigTree,
widgetTypeConfigMap: undefined,
widgets: {},
Expand Down Expand Up @@ -113,14 +105,6 @@ describe("evaluateTreeSaga", () => {
[select(getCurrentPageDSLVersion), 1],
])
.call(evalWorker.request, EVAL_WORKER_ACTIONS.EVAL_TREE, {
cacheProps: {
instanceId: "instanceId",
appId: "applicationId",
pageId: "pageId",
appMode: false,
timestamp: new Date("11 September 2024").toISOString(),
dslVersion: 1,
},
unevalTree: unEvalAndConfigTree,
widgetTypeConfigMap: undefined,
widgets: {},
Expand Down Expand Up @@ -170,14 +154,6 @@ describe("evaluateTreeSaga", () => {
[select(getCurrentPageDSLVersion), 1],
])
.call(evalWorker.request, EVAL_WORKER_ACTIONS.EVAL_TREE, {
cacheProps: {
instanceId: "instanceId",
appId: "applicationId",
pageId: "pageId",
appMode: false,
timestamp: new Date("11 September 2024").toISOString(),
dslVersion: 1,
},
unevalTree: unEvalAndConfigTree,
widgetTypeConfigMap: undefined,
widgets: {},
Expand Down
20 changes: 0 additions & 20 deletions app/client/src/sagas/EvaluationsSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ import { resetWidgetsMetaState, updateMetaState } from "actions/metaActions";
import {
getAllActionValidationConfig,
getAllJSActionsData,
getCurrentPageDSLVersion,
} from "ee/selectors/entitiesSelector";
import type { WidgetEntityConfig } from "ee/entities/DataTree/types";
import type {
Expand Down Expand Up @@ -113,12 +112,6 @@ import { evalErrorHandler } from "./EvalErrorHandler";
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
import { endSpan, startRootSpan } from "instrumentation/generateTraces";
import { transformTriggerEvalErrors } from "ee/sagas/helpers";
import {
getApplicationLastDeployedAt,
getCurrentApplicationId,
getCurrentPageId,
} from "selectors/editorSelectors";
import { getInstanceId } from "ee/selectors/organizationSelectors";
import type {
AffectedJSObjects,
EvaluationReduxAction,
Expand Down Expand Up @@ -263,26 +256,13 @@ export function* evaluateTreeSaga(
yield select(getSelectedAppTheme);

log.debug({ unevalTree, configTree: unEvalAndConfigTree.configTree });
const instanceId: string = yield select(getInstanceId);
const applicationId: string = yield select(getCurrentApplicationId);
const pageId: string = yield select(getCurrentPageId);
const lastDeployedAt: string = yield select(getApplicationLastDeployedAt);
const appMode: ReturnType<typeof getAppMode> = yield select(getAppMode);
const widgetsMeta: ReturnType<typeof getWidgetsMeta> =
yield select(getWidgetsMeta);
const dslVersion: number | null = yield select(getCurrentPageDSLVersion);

const shouldRespondWithLogs = log.getLevel() === log.levels.DEBUG;

const evalTreeRequestData: EvalTreeRequestData = {
cacheProps: {
appMode,
appId: applicationId,
pageId,
timestamp: lastDeployedAt,
instanceId,
dslVersion,
},
unevalTree: unEvalAndConfigTree,
widgetTypeConfigMap,
widgets,
Expand Down
15 changes: 1 addition & 14 deletions app/client/src/workers/Evaluation/__tests__/evaluation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import WidgetFactory from "WidgetProvider/factory";
import { generateDataTreeWidget } from "entities/DataTree/dataTreeWidget";
import { sortObjectWithArray } from "../../../utils/treeUtils";
import klona from "klona";
import { APP_MODE } from "entities/App";

const klonaFullSpy = jest.fn();

Expand Down Expand Up @@ -578,19 +577,7 @@ describe("DataTreeEvaluator", () => {
const evaluator = new DataTreeEvaluator(WIDGET_CONFIG_MAP);

it("Checks the number of clone operations in first tree flow", async () => {
await evaluator.setupFirstTree(
unEvalTree,
configTree,
{},
{
appId: "appId",
pageId: "pageId",
timestamp: "timestamp",
appMode: APP_MODE.PUBLISHED,
instanceId: "instanceId",
dslVersion: 1,
},
);
await evaluator.setupFirstTree(unEvalTree, configTree, {});
evaluator.evalAndValidateFirstTree();
// Hard check to not regress on the number of clone operations. Try to improve this number.
expect(klonaFullSpy).toBeCalledTimes(15);
Expand Down
15 changes: 1 addition & 14 deletions app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type { WidgetEntity } from "plugins/Linting/lib/entity/WidgetEntity";
import type { UpdateDataTreeMessageData } from "sagas/types";
import DataTreeEvaluator from "workers/common/DataTreeEvaluator";
import * as evalTreeWithChanges from "./evalTreeWithChanges";
import { APP_MODE } from "entities/App";
import { updateEvalProps } from "./helpers";
export const BASE_WIDGET = {
widgetId: "randomID",
Expand Down Expand Up @@ -190,19 +189,7 @@ describe("evaluateAndGenerateResponse", () => {
beforeEach(async () => {
// we are mimicking the first tree evaluation flow here
evaluator = new DataTreeEvaluator(WIDGET_CONFIG_MAP);
await evaluator.setupFirstTree(
unEvalTree,
configTree,
{},
{
appId: "appId",
pageId: "pageId",
timestamp: "timestamp",
appMode: APP_MODE.PUBLISHED,
instanceId: "instanceId",
dslVersion: 1,
},
);
await evaluator.setupFirstTree(unEvalTree, configTree, {});
evaluator.evalAndValidateFirstTree();
const dataTree = updateEvalProps(evaluator) || {};

Expand Down
3 changes: 0 additions & 3 deletions app/client/src/workers/Evaluation/handlers/evalTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export async function evalTree(
affectedJSObjects,
allActionValidationConfig,
appMode,
cacheProps,
forceEvaluation,
metaWidgets,
shouldReplay,
Expand Down Expand Up @@ -114,7 +113,6 @@ export async function evalTree(
unevalTree,
configTree,
webworkerTelemetry,
cacheProps,
),
webworkerTelemetry,
{ description: "during initialisation" },
Expand Down Expand Up @@ -166,7 +164,6 @@ export async function evalTree(
unevalTree,
configTree,
webworkerTelemetry,
cacheProps,
),
webworkerTelemetry,
{ description: "non-initialisation" },
Expand Down
2 changes: 0 additions & 2 deletions app/client/src/workers/Evaluation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import type { WorkerRequest } from "ee/workers/common/types";
import type { DataTreeDiff } from "ee/workers/Evaluation/evaluationUtils";
import type { APP_MODE } from "entities/App";
import type { WebworkerSpanData, Attributes } from "instrumentation/types";
import type { ICacheProps } from "../common/AppComputationCache/types";
import type { AffectedJSObjects } from "actions/EvaluationReduxActionTypes";
import type { UpdateActionProps } from "./handlers/types";

Expand All @@ -35,7 +34,6 @@ export type EvalWorkerASyncRequest<T = any> = WorkerRequest<
export type EvalWorkerResponse = EvalTreeResponseData | boolean | unknown;

export interface EvalTreeRequestData {
cacheProps: ICacheProps;
unevalTree: unEvalAndConfigTree;
widgetTypeConfigMap: WidgetTypeConfigMap;
widgets: CanvasWidgetsReduxState;
Expand Down
Loading
Loading