Skip to content

feat: add orion visualization links for successful job runs#106

Merged
vishnuchalla merged 1 commit into
redhat-performance:mainfrom
mmnabeel317:feat/success-viz-links
May 13, 2026
Merged

feat: add orion visualization links for successful job runs#106
vishnuchalla merged 1 commit into
redhat-performance:mainfrom
mmnabeel317:feat/success-viz-links

Conversation

@mmnabeel317
Copy link
Copy Markdown
Contributor

@mmnabeel317 mmnabeel317 commented May 11, 2026

Summary

Orion visualization links were previously only posted for changepoint/orion failure jobs. This PR extends that behavior to also post visualization links as threaded replies on successful job notifications, giving the team quick access to performance trend charts regardless of job outcome.

Changes

bugzooka/analysis/log_summarizer.py

  • Renamed _construct_deferred_viz_urlsconstruct_all_orion_viz_urls to expose it as a public function for reuse outside the failure pipeline.
  • Updated the internal call site in construct_visualization_url to use the new name.
  • No changes to function body or return type.

bugzooka/integrations/slack_fetcher.py

  • Added construct_all_orion_viz_urls to imports.
  • Added success message detection in _process_message(): messages matching "ended with" + "success" are routed to the new handler, placed after the summarize trigger and before the failure gate.
  • Added _handle_success_viz() method that:
    • Extracts the Prow URL from the message.
    • Scans GCS for Orion visualization HTML artifacts via construct_all_orion_viz_urls.
    • Posts a threaded reply with :white_check_mark: links per test if artifacts are found.
    • Silently skips if no Orion artifacts exist (consistent with non-orion failure behavior).
    • Wraps everything in a try/except to avoid crashing the poll loop.

tests/test_slack_fetcher.py

  • Replaced test_success_processing (which asserted zero messages) with two new tests:
    • test_success_processing_with_viz — mocks viz URLs present, asserts 1 message posted with correct content.
    • test_success_processing_no_viz — mocks viz URLs as None, asserts 0 messages posted.

What is NOT changed

  • Failure pipeline (download → analyze → preview → job history → LLM) is completely untouched.
  • Summarize feature, socket mode listener, RAG augmentation, and deduplication logic are unaffected.
  • No new dependencies added.

Test plan

  • All 21 unit tests pass (SLACK_BOT_TOKEN=xoxb-test SLACK_APP_TOKEN=xapp-test make test)
  • ruff check passes with no errors
  • Manual smoke test: copied a real success message into a test Slack channel, confirmed viz links were posted as a threaded reply
  • Manual verification: construct_all_orion_viz_urls returns correct GCS URLs for a real Prow job
  • Confirmed failure messages still trigger the full analysis pipeline as before

/cc @mohit-sheth

Signed-off-by: Nabeel Mohd <mmnabeel317@gmail.com>
@mohit-sheth
Copy link
Copy Markdown
Collaborator

image

@mohit-sheth
Copy link
Copy Markdown
Collaborator

/lgtm

@vishnuchalla
Copy link
Copy Markdown
Collaborator

looks neat. great job on these changes.
/approve

@vishnuchalla vishnuchalla merged commit c8b2754 into redhat-performance:main May 13, 2026
2 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.

3 participants