Skip to content

Commit 005949e

Browse files
committed
Fix gather-extra post-phase failures to show contextual message instead of re-trigger suggestion
1 parent c191416 commit 005949e

3 files changed

Lines changed: 28 additions & 5 deletions

File tree

bugzooka/analysis/failure_keywords.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"provision": ("Provision", "provision failure"),
55
"deprovision": ("Deprovision", "deprovision failure"),
66
"gather": ("Must Gather", "must gather failure"),
7+
"gather-extra": ("Gather Extra", "gather-extra failure"),
78
"orion": ("Changepoint", "orion changepoint detection failure"),
89
"cerberus": ("Prow Other", "cerberus health check failure"),
910
"node-readiness": ("Node Readiness", "node-readiness check failure"),

bugzooka/analysis/prow_analyzer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,15 @@ def analyze_prow_artifacts(directory_path, job_name):
292292
step_summary = ""
293293
if matched_line is None:
294294
if step_name and step_phase:
295+
# Determine if it's an install issue based on the phase
296+
# Post-phase runs after the main workload, so failures there aren't install issues
297+
is_install_issue = step_phase.lower() not in ["post", "test"]
298+
295299
return ProwAnalysisResult(
296300
errors=[step_summary] if step_summary else [],
297-
categorization_message=(
298-
f"Maintenance Issue: {step_name} failed in" f" {step_phase} phase"
299-
),
301+
categorization_message=categorization_message, # Use already-set categorization
300302
requires_llm=False,
301-
is_install_issue=True,
303+
is_install_issue=is_install_issue,
302304
step_name=step_name,
303305
full_errors_for_file=None,
304306
)

bugzooka/integrations/slack_fetcher.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,27 @@ def _send_error_logs_preview(
260260
# in the thread (just before job history).
261261
pending_file = errors_for_file.strip() if needs_file else None
262262

263-
if is_install_issue:
263+
# Check for post-phase and gather-extra failures
264+
is_post_phase = categorization_message and "post phase" in categorization_message.lower()
265+
is_gather_extra = categorization_message and "gather-extra" in categorization_message.lower()
266+
267+
if is_post_phase and is_gather_extra:
268+
# gather-extra runs after the main workload, so provide context
269+
retrigger_message = (
270+
"gather-extra runs at the end of the pipeline. "
271+
"Appears to be general workload failure, but we have performance results to look further."
272+
)
273+
message_block = self.get_slack_message_blocks(
274+
markdown_header=":information_source: *Post-Phase Context*\n",
275+
content_text=retrigger_message,
276+
)
277+
self.client.chat_postMessage(
278+
channel=self.channel_id,
279+
text="Post-Phase Context",
280+
blocks=message_block,
281+
thread_ts=max_ts,
282+
)
283+
elif is_install_issue:
264284
retrigger_message = (
265285
"This appears to be an installation or maintenance issue. "
266286
"Please re-trigger the run."

0 commit comments

Comments
 (0)