Handle alternate grouped-run completion logs in ATVM watcher
- update the categorized watcher to recognize grouped Cloud Run Finished summaries that are followed by the controller log message as well as the older literal form - allow grouped host summaries like the multi-host ubuntu batch to be parsed and posted even when the alternate controller log format is used - prevent completed grouped runs from being left in RUNNING state solely because the watcher missed the alternate grouped summary terminator
This commit is contained in:
@@ -276,7 +276,13 @@ def parse_duration_seconds(raw: str) -> Optional[float]:
|
|||||||
|
|
||||||
def extract_completed_subrun_summaries(log_text: str, inventory: Dict[str, str]) -> List[Dict[str, object]]:
|
def extract_completed_subrun_summaries(log_text: str, inventory: Dict[str, str]) -> List[Dict[str, object]]:
|
||||||
summaries: List[Dict[str, object]] = []
|
summaries: List[Dict[str, object]] = []
|
||||||
cloud_blocks = list(re.finditer(r"Cloud Run Finished(.*?)(?:🏁 Recorded Run:\s*(https://\S+))", log_text, re.S))
|
cloud_blocks = list(
|
||||||
|
re.finditer(
|
||||||
|
r"Cloud Run Finished(.*?)(?:🏁 Recorded Run:\s*(https://\S+)|\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} - INFO - Detected 'Recorded Run' after 'Cloud Run Finished' - results uploaded successfully\.)",
|
||||||
|
log_text,
|
||||||
|
re.S,
|
||||||
|
)
|
||||||
|
)
|
||||||
for block in cloud_blocks:
|
for block in cloud_blocks:
|
||||||
block_text = block.group(1)
|
block_text = block.group(1)
|
||||||
currents_url = block.group(2)
|
currents_url = block.group(2)
|
||||||
|
|||||||
Reference in New Issue
Block a user