Skip to content
Merged
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
4 changes: 4 additions & 0 deletions app/client/src/ce/selectors/entitiesSelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1804,3 +1804,7 @@ export const getUpcomingPlugins = createSelector(
(state: AppState) => state.entities.plugins.upcomingPlugins,
(upcomingPlugins) => upcomingPlugins.list,
);

export const getCurrentPageDSLVersion = (state: AppState) => {
return state.entities.canvasWidgets[0]?.version || null;
};
5 changes: 5 additions & 0 deletions app/client/src/sagas/EvalErrorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ export function* evalErrorHandler(
});
break;
}
case EvalErrorTypes.CACHE_ERROR: {
log.error(error);
captureException(error, { errorName: "CacheError" });
break;
}
default: {
log.error(error);
captureException(reconstructedError, { errorName: "UnknownEvalError" });
Expand Down
11 changes: 10 additions & 1 deletion app/client/src/sagas/EvaluationsSaga.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { expectSaga, testSaga } from "redux-saga-test-plan";
import { EVAL_WORKER_ACTIONS } from "ee/workers/Evaluation/evalWorkerActions";
import { select } from "redux-saga/effects";
import { getMetaWidgets, getWidgets, getWidgetsMeta } from "./selectors";
import { getAllActionValidationConfig } from "ee//selectors/entitiesSelector";
import {
getAllActionValidationConfig,
getCurrentPageDSLVersion,
} from "ee//selectors/entitiesSelector";
import { getSelectedAppTheme } from "selectors/appThemingSelectors";
import { getAppMode } from "ee/selectors/applicationSelectors";
import * as log from "loglevel";
Expand Down Expand Up @@ -59,6 +62,7 @@ describe("evaluateTreeSaga", () => {
select(getApplicationLastDeployedAt),
new Date("11 September 2024").toISOString(),
],
[select(getCurrentPageDSLVersion), 1],
])
.call(evalWorker.request, EVAL_WORKER_ACTIONS.EVAL_TREE, {
cacheProps: {
Expand All @@ -67,6 +71,7 @@ describe("evaluateTreeSaga", () => {
pageId: "pageId",
appMode: false,
timestamp: new Date("11 September 2024").toISOString(),
dslVersion: 1,
},
unevalTree: unEvalAndConfigTree,
widgetTypeConfigMap: undefined,
Expand Down Expand Up @@ -105,6 +110,7 @@ describe("evaluateTreeSaga", () => {
select(getApplicationLastDeployedAt),
new Date("11 September 2024").toISOString(),
],
[select(getCurrentPageDSLVersion), 1],
])
.call(evalWorker.request, EVAL_WORKER_ACTIONS.EVAL_TREE, {
cacheProps: {
Expand All @@ -113,6 +119,7 @@ describe("evaluateTreeSaga", () => {
pageId: "pageId",
appMode: false,
timestamp: new Date("11 September 2024").toISOString(),
dslVersion: 1,
},
unevalTree: unEvalAndConfigTree,
widgetTypeConfigMap: undefined,
Expand Down Expand Up @@ -160,6 +167,7 @@ describe("evaluateTreeSaga", () => {
select(getApplicationLastDeployedAt),
new Date("11 September 2024").toISOString(),
],
[select(getCurrentPageDSLVersion), 1],
])
.call(evalWorker.request, EVAL_WORKER_ACTIONS.EVAL_TREE, {
cacheProps: {
Expand All @@ -168,6 +176,7 @@ describe("evaluateTreeSaga", () => {
pageId: "pageId",
appMode: false,
timestamp: new Date("11 September 2024").toISOString(),
dslVersion: 1,
},
unevalTree: unEvalAndConfigTree,
widgetTypeConfigMap: undefined,
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/sagas/EvaluationsSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ 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 @@ -269,6 +270,7 @@ export function* evaluateTreeSaga(
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;

Expand All @@ -279,6 +281,7 @@ export function* evaluateTreeSaga(
pageId,
timestamp: lastDeployedAt,
instanceId,
dslVersion,
},
unevalTree: unEvalAndConfigTree,
widgetTypeConfigMap,
Expand Down
1 change: 1 addition & 0 deletions app/client/src/utils/DynamicBindingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export enum EvalErrorTypes {
CLONE_ERROR = "CLONE_ERROR",
SERIALIZATION_ERROR = "SERIALIZATION_ERROR",
UPDATE_DATA_TREE_ERROR = "UPDATE_DATA_TREE_ERROR",
CACHE_ERROR = "CACHE_ERROR",
}

export interface EvalError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ describe("DataTreeEvaluator", () => {
timestamp: "timestamp",
appMode: APP_MODE.PUBLISHED,
instanceId: "instanceId",
dslVersion: 1,
},
);
evaluator.evalAndValidateFirstTree();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ describe("evaluateAndGenerateResponse", () => {
timestamp: "timestamp",
appMode: APP_MODE.PUBLISHED,
instanceId: "instanceId",
dslVersion: 1,
},
);
evaluator.evalAndValidateFirstTree();
Expand Down
Loading
Loading