Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1f152e3
chore: Error Tab changes for Debugger
hetunandu Nov 25, 2024
c716b88
update icon
hetunandu Nov 26, 2024
3e99dc8
Merge remote-tracking branch 'origin/release' into chore/debugger-qui…
hetunandu Nov 26, 2024
56eae52
Merge branch 'release' into chore/debugger-quick-wins-errors
hetunandu Nov 26, 2024
11b1d59
fix: Still show action execution error in logs
hetunandu Nov 26, 2024
6211a52
fix: Format change and Log helper message
hetunandu Nov 26, 2024
e706a7c
fix: Format of few in Logs, scrolling and header
hetunandu Nov 26, 2024
48bc150
Standardise Entity Link styles
hetunandu Nov 26, 2024
77dddbe
Merge branch 'release' into chore/debugger-quick-wins-errors
hetunandu Nov 27, 2024
5143d48
Merge branch 'release' into chore/debugger-quick-wins-errors
hetunandu Nov 27, 2024
4a311c4
fix: Query began execution
hetunandu Nov 27, 2024
7ec04ab
fix: Log item collapsible
hetunandu Nov 27, 2024
9d53255
Query execution logs formatting
hetunandu Nov 27, 2024
b44b4a0
Further query error improvements
hetunandu Nov 28, 2024
e7ac144
chore: JS Object and other fixes
hetunandu Nov 28, 2024
999c986
Merge branch 'release' into chore/debugger-quick-wins-errors
hetunandu Nov 28, 2024
3f2655f
fix merge
hetunandu Nov 28, 2024
ae83d44
chore: Cosmetic changes and defaults
hetunandu Nov 29, 2024
e325958
opening the response tab by default for APIs
ankitakinger Nov 29, 2024
44833f5
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger Nov 29, 2024
0142ba8
chore: Showing correct errors in the response tab
hetunandu Nov 29, 2024
adab9c5
adding error message in API response tab
ankitakinger Nov 29, 2024
78c6e44
opening the response tab when the execution has errored out
ankitakinger Nov 29, 2024
bbd201f
removing the debug button on the callout and response headers in the …
ankitakinger Nov 29, 2024
8014dbb
chore: Debugger console
hetunandu Nov 29, 2024
ee1d92b
Merge remote-tracking branch 'origin/chore/open-response-tab-always' …
hetunandu Nov 29, 2024
cc42a59
fix for instance breaking down when API errors out
ankitakinger Nov 29, 2024
5ef06c8
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
ankitakinger Nov 29, 2024
2985ea9
fixing cypress tests
ankitakinger Dec 1, 2024
94ce98d
fixing cypress tests
ankitakinger Dec 1, 2024
2aebad9
Merge remote-tracking branch 'origin/chore/open-response-tab-always' …
hetunandu Dec 2, 2024
9cad6a2
fix: Filter Eval errors without source
hetunandu Dec 2, 2024
8b3ad44
fix tests
hetunandu Dec 2, 2024
e7c02ee
fix: Conflict override change
hetunandu Dec 2, 2024
5699564
Merge branch 'release' into chore/debugger-quick-wins-errors
hetunandu Dec 3, 2024
e6d801c
fix: Remove default search term from Debugger
hetunandu Dec 3, 2024
a727dc6
chore: Add a bottom border for filter header
hetunandu Dec 3, 2024
a5af602
chore: Revert default tab selection on debug CTA click
hetunandu Dec 3, 2024
ca592f2
fix
hetunandu Dec 3, 2024
ec9ce51
Merge branch 'release' into chore/debugger-quick-wins-errors
hetunandu Dec 3, 2024
b6c41f0
chore: Fix debug
hetunandu Dec 3, 2024
16d2717
fix more styles
hetunandu Dec 4, 2024
54457f3
add widget source to framework functions
hetunandu Dec 4, 2024
7398cc6
Merge branch 'release' into chore/debugger-quick-wins-errors
hetunandu Dec 4, 2024
4d71d09
Merge branch 'release' into chore/debugger-quick-wins-errors
hetunandu Dec 4, 2024
1f68778
Merge branch 'chore/debugger-quick-wins-errors' of github.com:/appsmi…
hetunandu Dec 4, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,10 @@ const InputCursorMoveIcon = importSvg(
async () => import("../__assets__/icons/ads/input-cursor-move.svg"),
);

const DebugIcon = importSvg(
async () => import("../__assets__/icons/ads/debug.svg"),
);

import PlayIconPNG from "../__assets__/icons/control/play-icon.png";

function PlayIconPNGWrapper() {
Expand Down Expand Up @@ -1113,6 +1117,7 @@ const ICON_LOOKUP = {
"show-column": EyeIcon,
"hide-column": EyeOffIcon,
"delete-column": DeleteColumnIcon,
debug: DebugIcon,
"bold-font": BoldFontIcon,
underline: UnderlineIcon,
"italics-font": ItalicsFontIcon,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/client/src/ce/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export const LOGS_FILTER_OPTION_CONSOLE = () => "Console logs";
export const LOGS_FILTER_OPTION_SYSTEM = () => "System logs";
export const NO_LOGS = () => "No logs to show";
export const NO_ERRORS = () => "No signs of trouble here!";
export const DEBUGGER_ERRORS = () => "Errors";
export const DEBUGGER_ERRORS = () => "Linter";
export const DEBUGGER_RESPONSE = () => "Response";
export const DEBUGGER_HEADERS = () => "Headers";
export const DEBUGGER_LOGS = () => "Logs";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ import {
} from "selectors/debuggerSelectors";
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
import Errors from "./Errors";
import EntityDeps from "./EntityDependecies";
import {
createMessage,
DEBUGGER_ERRORS,
DEBUGGER_LOGS,
INSPECT_ENTITY,
} from "ee/constants/messages";
import { DEBUGGER_TAB_KEYS } from "./constants";
import EntityBottomTabs from "../EntityBottomTabs";
Expand Down Expand Up @@ -59,11 +57,6 @@ function DebuggerTabs() {
title: createMessage(DEBUGGER_LOGS),
panelComponent: <DebuggerLogs hasShortCut />,
},
{
key: DEBUGGER_TAB_KEYS.INSPECT_TAB,
title: createMessage(INSPECT_ENTITY),
panelComponent: <EntityDeps />,
},
];

// Do not render if response, header or schema tab is selected in the bottom bar.
Expand Down
20 changes: 12 additions & 8 deletions app/client/src/components/editorComponents/Debugger/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import { useDispatch, useSelector } from "react-redux";
import DebuggerTabs from "./DebuggerTabs";
import { setErrorCount } from "actions/debuggerActions";
import { getMessageCount, showDebuggerFlag } from "selectors/debuggerSelectors";
import { Tooltip } from "@appsmith/ads";
import { Tooltip, Button } from "@appsmith/ads";
import useDebuggerTriggerClick from "./hooks/useDebuggerTriggerClick";
import * as Styled from "./styles";

function Debugger() {
// Debugger render flag
Expand All @@ -32,19 +31,24 @@ export function DebuggerTrigger() {
}`
: `No errors`;

const countContent =
messageCounters.errors !== 0
? messageCounters.errors > 99
? "(99+)"
: `(${messageCounters.errors})`
: "";

return (
<Tooltip content={tooltipContent}>
<Styled.DebuggerTriggerButton
<Button
className="t--debugger-count"
kind={messageCounters.errors > 0 ? "error" : "tertiary"}
onClick={onClick}
size="md"
startIcon={
messageCounters.errors ? "close-circle" : "close-circle-line"
}
startIcon="debug"
>
{messageCounters.errors > 99 ? "99+" : messageCounters.errors}
</Styled.DebuggerTriggerButton>
Debug {countContent}
</Button>
</Tooltip>
);
}
Expand Down
10 changes: 0 additions & 10 deletions app/client/src/components/editorComponents/Debugger/styles.ts

This file was deleted.

7 changes: 0 additions & 7 deletions app/client/src/pages/Editor/DataSourceEditor/Debugger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
createMessage,
DEBUGGER_ERRORS,
DEBUGGER_LOGS,
INSPECT_ENTITY,
} from "ee/constants/messages";
import {
setDebuggerSelectedTab,
Expand All @@ -16,7 +15,6 @@ import EntityBottomTabs from "components/editorComponents/EntityBottomTabs";
import { DEBUGGER_TAB_KEYS } from "components/editorComponents/Debugger/constants";
import Errors from "components/editorComponents/Debugger/Errors";
import DebuggerLogs from "components/editorComponents/Debugger/DebuggerLogs";
import EntityDeps from "components/editorComponents/Debugger/EntityDependecies";
import {
getDebuggerSelectedTab,
getErrorCount,
Expand Down Expand Up @@ -100,11 +98,6 @@ export default function Debugger() {
title: createMessage(DEBUGGER_LOGS),
panelComponent: <DebuggerLogs hasShortCut />,
},
{
key: DEBUGGER_TAB_KEYS.INSPECT_TAB,
title: createMessage(INSPECT_ENTITY),
panelComponent: <EntityDeps />,
},
];

// set the height of the response pane in the store
Expand Down
115 changes: 2 additions & 113 deletions app/client/src/sagas/ActionExecution/PluginActionSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,11 @@ import {
isArrayBuffer,
isEmpty,
isNil,
isString,
set,
unset,
} from "lodash";
import AppsmithConsole from "utils/AppsmithConsole";
import { ENTITY_TYPE, PLATFORM_ERROR } from "ee/entities/AppsmithConsole/utils";
import { ENTITY_TYPE } from "ee/entities/AppsmithConsole/utils";
import {
extractClientDefinedErrorMetadata,
validateResponse,
Expand Down Expand Up @@ -576,10 +575,6 @@ export default function* executePluginActionTriggerSaga(
const plugin: Plugin = yield select(getPlugin, action?.pluginId);
const currentApp: ApplicationPayload = yield select(getCurrentApplication);

const currentEnvDetails: { id: string; name: string } = yield select(
getCurrentEnvironmentDetails,
);

const pluginActionNameToDisplay = getPluginActionNameToDisplay(action);

const actionExecutionAnalytics = getActionExecutionAnalytics(
Expand Down Expand Up @@ -618,40 +613,6 @@ export default function* executePluginActionTriggerSaga(
const { isError, payload } = executePluginActionResponse;

if (isError) {
AppsmithConsole.addErrors([
{
payload: {
id: actionId,
iconId: action.pluginId,
logType: LOG_TYPE.ACTION_EXECUTION_ERROR,
text: `Execution failed with status ${payload.statusCode}`,
environmentName: currentEnvDetails.name,
source: {
type: ENTITY_TYPE.ACTION,
name: pluginActionNameToDisplay,
id: actionId,
httpMethod: action?.actionConfiguration?.httpMethod,
pluginType: action.pluginType,
},
state: payload.request,
messages: [
{
// Need to stringify cause this gets rendered directly
// and rendering objects can crash the app
message: {
name: "PluginExecutionError",
message: !isString(payload.body)
? JSON.stringify(payload.body)
: payload.body,
},
type: PLATFORM_ERROR.PLUGIN_EXECUTION,
subType: payload.errorType,
},
],
pluginErrorDetails: payload.pluginErrorDetails,
},
},
]);
AnalyticsUtil.logEvent("EXECUTE_ACTION_FAILURE", {
...actionExecutionAnalytics,
...payload.pluginErrorDetails,
Expand Down Expand Up @@ -926,54 +887,10 @@ export function* runActionSaga(
error =
readableError || payloadBodyError || clientDefinedError || defaultError;

// In case of debugger, both the current error message
// and the readableError needs to be present,
// since the readableError may be malformed for certain errors.

const appsmithConsoleErrorMessageList = [
{
message: error,
type: PLATFORM_ERROR.PLUGIN_EXECUTION,
subType: payload.errorType,
},
];

if (error === readableError && !!payloadBodyError) {
appsmithConsoleErrorMessageList.push({
message: payloadBodyError,
type: PLATFORM_ERROR.PLUGIN_EXECUTION,
subType: payload.errorType,
});
}

AppsmithConsole.addErrors([
{
payload: {
id: actionId,
iconId: actionObject.pluginId,
logType: LOG_TYPE.ACTION_EXECUTION_ERROR,
environmentName: currentEnvDetails.name,
text: `Execution failed${
payload.statusCode ? ` with status ${payload.statusCode}` : ""
}`,
source: {
type: ENTITY_TYPE.ACTION,
name: pluginActionNameToDisplay,
id: actionId,
httpMethod: actionObject?.actionConfiguration?.httpMethod,
pluginType: actionObject.pluginType,
},
messages: appsmithConsoleErrorMessageList,
state: payload?.request,
pluginErrorDetails: payload?.pluginErrorDetails,
},
},
]);

yield put({
type: ReduxActionErrorTypes.RUN_ACTION_ERROR,
payload: {
error: appsmithConsoleErrorMessageList[0].message,
error,
id: reduxAction.payload.id,
show: false,
},
Expand Down Expand Up @@ -1215,34 +1132,6 @@ function* executePageLoadAction(
);

if (isError) {
AppsmithConsole.addErrors([
{
payload: {
id: pageAction.id,
iconId: action.pluginId,
logType: LOG_TYPE.ACTION_EXECUTION_ERROR,
environmentName: currentEnvDetails.name,
text: `Execution failed with status ${payload.statusCode}`,
source: {
type: ENTITY_TYPE.ACTION,
name: actionName,
id: pageAction.id,
httpMethod: action?.actionConfiguration?.httpMethod,
pluginType: action.pluginType,
},
state: payload.request,
messages: [
{
message: error,
type: PLATFORM_ERROR.PLUGIN_EXECUTION,
subType: payload.errorType,
},
],
pluginErrorDetails: payload.pluginErrorDetails,
},
},
]);

yield put(
executePluginActionError({
actionId: pageAction.id,
Expand Down
31 changes: 3 additions & 28 deletions app/client/src/sagas/JSPaneSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@ import {
createMessage,
ERROR_JS_COLLECTION_RENAME_FAIL,
JS_EXECUTION_SUCCESS,
JS_EXECUTION_FAILURE,
JS_FUNCTION_CREATE_SUCCESS,
JS_FUNCTION_DELETE_SUCCESS,
} from "ee/constants/messages";
import { validateResponse } from "./ErrorSagas";
import AppsmithConsole from "utils/AppsmithConsole";
import { ENTITY_TYPE, PLATFORM_ERROR } from "ee/entities/AppsmithConsole/utils";
import LOG_TYPE from "entities/AppsmithConsole/logtype";
import { ENTITY_TYPE } from "ee/entities/AppsmithConsole/utils";
import { updateCanvasWithDSL } from "ee/sagas/PageSagas";
import { set } from "lodash";
import { updateReplayEntity } from "actions/pageActions";
Expand Down Expand Up @@ -539,32 +537,9 @@ export function* handleExecuteJSFunctionSaga(data: {
);
}

if (!!collection.isMainJSCollection)
if (!!collection.isMainJSCollection) {
logMainJsActionExecution(actionId, false, collectionId, false);

AppsmithConsole.addErrors([
{
payload: {
id: actionId,
logType: LOG_TYPE.ACTION_EXECUTION_ERROR,
text: createMessage(JS_EXECUTION_FAILURE),
source: {
type: ENTITY_TYPE.JSACTION,
name: jsActionPathNameToDisplay,
id: collectionId,
},
messages: [
{
message: {
name: (error as Error).name,
message: (error as Error).message,
},
type: PLATFORM_ERROR.PLUGIN_EXECUTION,
},
],
},
},
]);
}
Comment thread
hetunandu marked this conversation as resolved.
Outdated
}
}

Expand Down