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: Report the built client version, as well as server version.

Alex Vandiver19691b170bcb
diff --git a/web/src/blueslip.ts b/web/src/blueslip.ts
index a46a053da29..f90e95d4c4d 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 8338210aa59..ca62b9611ba 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 b12c53f59cb..deec5adb32a 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,