Auto-commit local changes before build (2026-01-12 12:52:12)

This commit is contained in:
Ivo Oskamp 2026-01-12 12:52:12 +01:00
parent ae61c563b8
commit e84e42d856
3 changed files with 22 additions and 11 deletions

View File

@ -1 +1 @@
v20260112-07-veeam-vspc-active-alarms-parser
v20260112-08-fix-veeam-vspc-parser-syntaxerror

View File

@ -40,8 +40,12 @@ def _parse_vspc_active_alarms_from_html(html: str) -> Tuple[List[Dict], str, Opt
return [], "Success", None
# Extract each company block and its first alarm table.
company_header_re = re.compile(r"(?is)company:\s*([^<
]+?)\s*\(\s*alarms\s*:\s*(\d+)\s*\)")
# Company header example: "Company: AKR Performance (alarms: 2)"
# Be defensive about line breaks (CR/LF) and HTML formatting.
company_header_re = re.compile(
r"(?is)company:\s*([^<\r\n]+?)\s*\(\s*alarms\s*:\s*(\d+)\s*\)"
)
# Build spans using HTML positions.
headers = [(m.start(), m.end(), (m.group(1) or "").strip(), m.group(2)) for m in company_header_re.finditer(html)]
@ -1027,9 +1031,9 @@ def try_parse_veeam(msg: MailMessage) -> Tuple[bool, Dict, List[Dict]]:
# VSPC Active Alarms summary (no [Success]/[Warning] marker).
is_vspc_active_alarms = (
(\"veeam service provider console\" in html_lower)
and (\"active alarms\" in html_lower or \"active alarms summary\" in subject.lower())
and (\"company:\" in html_lower and \"alarms\" in html_lower)
("veeam service provider console" in html_lower)
and ("active alarms" in html_lower or "active alarms summary" in subject.lower())
and ("company:" in html_lower and "alarms" in html_lower)
)
# If we cannot detect a status marker and this is not an M365 report,
@ -1065,13 +1069,13 @@ def try_parse_veeam(msg: MailMessage) -> Tuple[bool, Dict, List[Dict]]:
objects, overall_status, overall_message = _parse_vspc_active_alarms_from_html(html_body)
result = {
\"backup_software\": \"Veeam\",
\"backup_type\": \"Service Provider Console\",
\"job_name\": \"Active alarms summary\",
\"overall_status\": overall_status,
"backup_software": "Veeam",
"backup_type": "Service Provider Console",
"job_name": "Active alarms summary",
"overall_status": overall_status,
}
if overall_message:
result[\"overall_message\"] = overall_message
result["overall_message"] = overall_message
return True, result, objects

View File

@ -166,6 +166,13 @@
- Implemented parsing of alarms per Company and per alarm row, creating objects named “<Company> | <Object>”.
- Derived object status from “Current State” and attached alarm details where available (fallback to Alarm Name).
---
## v20260112-08-fix-veeam-vspc-parser-syntaxerror
- Fixed a SyntaxError in the Veeam VSPC Active Alarms parser caused by an incomplete regular expression.
- Restored valid parser loading to prevent Gunicorn startup failure and Bad Gateway errors.
- No functional logic changes; fix is limited to syntax correction only.
================================================================================================================================================
## v0.1.19
This release delivers a broad set of improvements focused on reliability, transparency, and operational control across mail processing, administrative auditing, and Run Checks workflows. The changes aim to make message handling more robust, provide better insight for administrators, and give operators clearer and more flexible control when reviewing backup runs.