Delay categorized watcher posts until host summary is available

- keep categorized grouped sub-runs in RUNNING state when only the grouped check-xml-files.ts artifact has appeared and the parent log has not yet exposed the real host summary
- prevent blank Mattermost grouped-run posts with empty host tables, zero counts, and zero/invalid timing caused by posting too early
- require the categorized watcher to wait for host-level grouped summary data before treating the grouped run as complete
This commit is contained in:
2026-03-26 14:40:11 -04:00
parent f5eb21cccd
commit 293b9bf239

View File

@@ -753,6 +753,8 @@ def discover_categorized_subruns(
state = "RUNNING" state = "RUNNING"
if cancelled: if cancelled:
state = "CANCELLED" state = "CANCELLED"
elif check_ts and not host_results and parent_active:
state = "RUNNING"
elif check_ts or raw_display_name != current_subrun_build or not parent_active: elif check_ts or raw_display_name != current_subrun_build or not parent_active:
state = "FAILED" if any(result.failures for result in host_results.values()) else "COMPLETED" state = "FAILED" if any(result.failures for result in host_results.values()) else "COMPLETED"
display_name = corrected_categorized_display_name(raw_display_name, list(host_results)) display_name = corrected_categorized_display_name(raw_display_name, list(host_results))
@@ -761,6 +763,8 @@ def discover_categorized_subruns(
notes.append("Final `check-xml-files.ts` validation passed.") notes.append("Final `check-xml-files.ts` validation passed.")
if summary and host_results: if summary and host_results:
notes.append("Host result details were derived from the parent categorized run log summary.") notes.append("Host result details were derived from the parent categorized run log summary.")
elif check_ts and not host_results and parent_active:
notes.append("Grouped reporter XML arrived before the parent run log exposed the final host summary; waiting to post until host details are available.")
if display_name != raw_display_name: if display_name != raw_display_name:
notes.append(f"Child build id was reported as `{raw_display_name}`, but the actual grouped run was inferred from host execution as `{display_name}`.") notes.append(f"Child build id was reported as `{raw_display_name}`, but the actual grouped run was inferred from host execution as `{display_name}`.")
if cancelled: if cancelled: