blueslip: Report the built client version, as well as server version.

This commit is contained in:
Alex Vandiver 2023-03-03 21:38:26 +00:00 committed by Tim Abbott
parent a8181152b7
commit 19691b170b
3 changed files with 7 additions and 3 deletions

View File

@ -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,

View File

@ -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
)

View File

@ -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,