From 19691b170bcb59bfad122e811971ca6b168e5855 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 3 Mar 2023 21:38:26 +0000 Subject: [PATCH] blueslip: Report the built client version, as well as server version. --- web/src/blueslip.ts | 1 + zerver/lib/error_notify.py | 3 ++- zerver/views/report.py | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/web/src/blueslip.ts b/web/src/blueslip.ts index a46a053da2..f90e95d4c4 100644 --- a/web/src/blueslip.ts +++ b/web/src/blueslip.ts @@ -94,6 +94,7 @@ function report_error( url: "/json/report/error", dataType: "json", data: { + web_version: ZULIP_VERSION, message: msg, stacktrace: stack, ui_message: show_ui_msg, diff --git a/zerver/lib/error_notify.py b/zerver/lib/error_notify.py index 8338210aa5..ca62b9611b 100644 --- a/zerver/lib/error_notify.py +++ b/zerver/lib/error_notify.py @@ -64,7 +64,8 @@ IP address: {ip_address} User agent: {user_agent} href: {href} Server path: {server_path} -Deployed version: {version} +Deployed server version: {server_version} +Web version: {web_version} """.format( **report ) diff --git a/zerver/views/report.py b/zerver/views/report.py index b12c53f59c..deec5adb32 100644 --- a/zerver/views/report.py +++ b/zerver/views/report.py @@ -127,6 +127,7 @@ def report_error( user_agent: str = REQ(), href: str = REQ(), log: str = REQ(), + web_version: Optional[str] = REQ(default=None), more_info: Mapping[str, Any] = REQ(json_validator=check_dict([]), default={}), ) -> HttpResponse: """Accepts an error report and stores in a queue for processing. The @@ -139,7 +140,7 @@ def report_error( if js_source_map: stacktrace = js_source_map.annotate_stacktrace(stacktrace) - version = str(ZULIP_VERSION) + server_version = str(ZULIP_VERSION) # Get the IP address of the request remote_ip = request.META["REMOTE_ADDR"] @@ -169,7 +170,8 @@ def report_error( user=user, user_visible=ui_message, server_path=settings.DEPLOY_ROOT, - version=version, + server_version=server_version, + web_version=web_version, user_agent=user_agent, href=href, message=message,