Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

blueslip: Remove SAVE_FRONTEND_STACKTRACES setting.

Anders Kaseorg98194b9316fe
diff --git a/static/js/blueslip.ts b/static/js/blueslip.ts
index 051c7424308..59cbd8f1594 100644
--- a/static/js/blueslip.ts
+++ b/static/js/blueslip.ts
@@ -12,7 +12,6 @@ import * as blueslip_stacktrace from "./blueslip_stacktrace";
import {page_params} from "./page_params";
import * as ui_report from "./ui_report";
-export let last_stacktrace: string | undefined;
if (Error.stackTraceLimit !== undefined) {
Error.stackTraceLimit = 100000;
}
@@ -163,15 +162,6 @@ function report_error(
}
},
});
-
- if (page_params.save_stacktraces) {
- // Save the stacktrace so it can be examined even in
- // development servers. (N.B. This assumes you have set DEBUG
- // = False on your development server, or else this code path
- // won't execute to begin with -- useful for testing
- // (un)minification.)
- last_stacktrace = stack;
- }
}
class BlueslipError extends Error {
diff --git a/static/js/page_params.ts b/static/js/page_params.ts
index 60df12f79fc..fd181728e48 100644
--- a/static/js/page_params.ts
+++ b/static/js/page_params.ts
@@ -10,7 +10,6 @@ export const page_params: {
}[];
development_environment: boolean;
request_language: string;
- save_stacktraces: boolean;
translation_data: Record<string, string>;
} = $("#page-params").remove().data("params");
const t2 = performance.now();
diff --git a/static/js/zulip_test.js b/static/js/zulip_test.js
index 915ba7f3221..907d596ffeb 100644
--- a/static/js/zulip_test.js
+++ b/static/js/zulip_test.js
@@ -14,4 +14,3 @@ export {last_visible as last_visible_row, id as row_id} from "./rows";
export {cancel as cancel_compose} from "./compose_actions";
export {page_params, page_params_parse_time} from "./page_params";
export {initiate as initiate_reload} from "./reload";
-export {last_stacktrace} from "./blueslip";
diff --git a/zerver/lib/home.py b/zerver/lib/home.py
index 6f4450275d8..7f8912f6f78 100644
--- a/zerver/lib/home.py
+++ b/zerver/lib/home.py
@@ -189,7 +189,6 @@ def build_page_params_for_home_page_load(
test_suite=settings.TEST_SUITE,
insecure_desktop_app=insecure_desktop_app,
login_page=settings.HOME_NOT_LOGGED_IN,
- save_stacktraces=settings.SAVE_FRONTEND_STACKTRACES,
warn_no_email=settings.WARN_NO_EMAIL,
search_pills_enabled=settings.SEARCH_PILLS_ENABLED,
# Only show marketing email settings if on Zulip Cloud
diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py
index 871198f3e63..815ee9fdf0f 100644
--- a/zerver/tests/test_home.py
+++ b/zerver/tests/test_home.py
@@ -203,7 +203,6 @@ class HomeTest(ZulipTestCase):
"realm_wildcard_mention_policy",
"recent_private_conversations",
"request_language",
- "save_stacktraces",
"search_pills_enabled",
"server_avatar_changes_disabled",
"server_generation",
diff --git a/zproject/default_settings.py b/zproject/default_settings.py
index 1f5a7217f73..c8465c51fd3 100644
--- a/zproject/default_settings.py
+++ b/zproject/default_settings.py
@@ -288,10 +288,6 @@ EMAIL_BACKEND: Optional[str] = None
# Set in settings.py when email isn't configured.
WARN_NO_EMAIL = False
-# Whether to keep extra frontend stack trace data.
-# TODO: Investigate whether this should be removed and set one way or other.
-SAVE_FRONTEND_STACKTRACES = False
-
# If True, disable rate-limiting and other filters on sending error messages
# to admins, and enable logging on the error-reporting itself. Useful
# mainly in development.
diff --git a/zproject/dev_settings.py b/zproject/dev_settings.py
index 45fd0a2dfe1..f5ab55e770f 100644
--- a/zproject/dev_settings.py
+++ b/zproject/dev_settings.py
@@ -78,8 +78,6 @@ INVITES_MIN_USER_AGE_DAYS = 0
EMBEDDED_BOTS_ENABLED = True
-SAVE_FRONTEND_STACKTRACES = True
-
SYSTEM_ONLY_REALMS: Set[str] = set()
USING_PGROONGA = True
# Flush cache after migration.