Skip to content

Fix gather-extra post-phase failures to show contextual message instead of re-trigger suggestion#120

Merged
vishnuchalla merged 3 commits into
redhat-performance:mainfrom
qu4rkn3t:gather-extra-post-phase
Jun 30, 2026
Merged

Fix gather-extra post-phase failures to show contextual message instead of re-trigger suggestion#120
vishnuchalla merged 3 commits into
redhat-performance:mainfrom
qu4rkn3t:gather-extra-post-phase

Conversation

@qu4rkn3t

Copy link
Copy Markdown
Contributor

Issue

gather-extra failures in post phase were incorrectly categorized as maintenance issue with is_install_issue=True, causing BugZooka to suggest re-triggering the run. However, gather-extra runs at the end of the pipeline after the main workload completes, so these failures aren't installation issues. The actual test may have passed and performance results are still available. Below is the specific slack message

Screenshot 2026-06-30 at 11 21 57 AM

Fix

The fix correctly identifies post-phase and test-phase failures as non-installation issues by checking the phase type rather than defaulting to maintenance issues. It then adds special handling for gather-extra failures to display a contextual message explaining the situation. Specific changes:

  • failure_keywords.py: Added mapping to recognize gather-extra steps in categorization
  • prow_analyzer.py: Dynamically decided whether an issue was related to installation based on step_phase and preserved correct categorization message instead of overwriting with maintenance issue
  • slack_fetcher.py: Better messaging based on error

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@qu4rkn3t, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 960c3fe6-6586-49f2-8fe6-1af5907c27bd

📥 Commits

Reviewing files that changed from the base of the PR and between 005949e and 54796f8.

📒 Files selected for processing (2)
  • bugzooka/analysis/failure_keywords.py
  • bugzooka/integrations/slack_fetcher.py
📝 Walkthrough

Walkthrough

Adds "gather-extra" to FAILURE_KEYWORDS, fixes prow_analyzer to derive is_install_issue from step_phase and reuse categorization_message instead of overriding it, and adds a new Slack "Post-Phase Context" message branch in _send_error_logs_preview for post-phase gather-extra failures.

Changes

gather-extra failure detection and Slack messaging

Layer / File(s) Summary
gather-extra keyword and analyzer fix
bugzooka/analysis/failure_keywords.py, bugzooka/analysis/prow_analyzer.py
Registers "gather-extra" in FAILURE_KEYWORDS and updates the matched_line is None branch to compute is_install_issue from step_phase (non-post/non-test phases) and reuse the existing categorization_message instead of generating a new maintenance string.
Post-Phase Context Slack message
bugzooka/integrations/slack_fetcher.py
Adds a conditional branch in _send_error_logs_preview that detects "post phase" + "gather-extra" in categorization_message and posts a threaded "Post-Phase Context" message at max_ts before the existing is_install_issue logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main fix for gather-extra post-phase failures and the Slack messaging change.
Description check ✅ Passed The description is directly related to the changes and accurately explains the classification and messaging updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bugzooka/analysis/failure_keywords.py`:
- Line 7: Move the `gather-extra` entry ahead of `gather` in `FAILURE_KEYWORDS`
so `classify_failure_type()` in `log_summarizer` matches the more specific
substring first. Keep the ordering in `failure_keywords.py` consistent with the
first-match behavior used by `classify_failure_type()` so `post phase:
gather-extra failure` is categorized as `gather-extra` instead of `Must Gather`.

In `@bugzooka/integrations/slack_fetcher.py`:
- Around line 269-276: The post-phase guidance copy in the Slack fetcher is
inverted for `gather-extra` failures. Update the `retrigger_message` text in
`SlackFetcher` so it reflects the new behavior: the main workload may have
completed successfully and performance results may still be available, instead
of saying it appears to be a general workload failure. Keep the
`get_slack_message_blocks` call as-is and only adjust the guidance wording used
for the post-phase context.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 267f3e24-6538-41a0-a61b-f1db332dbb4f

📥 Commits

Reviewing files that changed from the base of the PR and between fd5506e and 005949e.

📒 Files selected for processing (3)
  • bugzooka/analysis/failure_keywords.py
  • bugzooka/analysis/prow_analyzer.py
  • bugzooka/integrations/slack_fetcher.py

Comment thread bugzooka/analysis/failure_keywords.py
Comment thread bugzooka/integrations/slack_fetcher.py

@vishnuchalla vishnuchalla left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vishnuchalla vishnuchalla merged commit 1e50f20 into redhat-performance:main Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants