Skip to content

Support multiple viz HTML files per orion step directory#123

Merged
vishnuchalla merged 1 commit into
redhat-performance:mainfrom
mmnabeel317:fix/multi-viz-html-per-step
Jul 8, 2026
Merged

Support multiple viz HTML files per orion step directory#123
vishnuchalla merged 1 commit into
redhat-performance:mainfrom
mmnabeel317:fix/multi-viz-html-per-step

Conversation

@mmnabeel317

@mmnabeel317 mmnabeel317 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • When a single Orion step runs multiple test configs (e.g. telco's oslat-changepoint.yaml with telco-oslat-latency and telco-oslat-availability), it produces multiple _viz.html files in the same artifacts directory
  • Previously construct_all_orion_viz_urls() only picked up html_files[0] — the first HTML per step directory
  • Now when multiple HTMLs exist in one step, iterates all of them and derives display names from filenames (strip _viz.html suffix + strip_step_prefixes). Single-HTML steps still use the folder name for backward compatibility with perfscale jobs.

What changes

Scenario Before After
Perfscale success (1 HTML per step) Shows all step links Unchanged
Telco success (2 HTMLs in 1 step) Shows only first HTML Shows both
Deferred orion-report failure Same as above Same as above

Test plan

  • All 96 existing tests pass
  • Verified against real telco artifact structure (#2074463759547502592)
  • Confirmed backward compatibility with perfscale naming (cluster-density, node-density, etc.)
  • Manual verification on test Slack channel with telco success job

Relates to: PERFSCALE-5191
/cc @vishnuchalla

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 10 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: 6637a782-a7c3-40de-87df-bc1c4f1821e9

📥 Commits

Reviewing files that changed from the base of the PR and between 67041e6 and b991c67.

📒 Files selected for processing (1)
  • bugzooka/analysis/log_summarizer.py
📝 Walkthrough

Walkthrough

The construct_all_orion_viz_urls function in log_summarizer.py was updated to handle multiple HTML visualization files per step directory, replacing prior logic that only used the first HTML file found, generating one URL mapping entry per file when multiple exist.

Changes

Deferred Viz URL Construction

Layer / File(s) Summary
Multi-file HTML viz URL handling
bugzooka/analysis/log_summarizer.py
construct_all_orion_viz_urls branches on the count of HTML files: skips empty results, retains single-file mapping behavior, and builds one {test_name: url} entry per file for multiple HTML files, deriving test names from filenames stripped of _viz.html.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: supporting multiple viz HTML files in a single Orion step directory.
Description check ✅ Passed The description is directly related to the code changes and accurately summarizes the updated URL construction behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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/log_summarizer.py`:
- Around line 250-255: The multi-file path in log_summarizer.py silently
overwrites entries in viz_urls when multiple HTML files normalize to the same
test_name. Update the loop that builds viz_urls to detect collisions after
strip_step_prefixes(html_name.removesuffix("_viz.html")) and either log a
warning and preserve both entries or generate a unique suffixed key instead of
replacing the existing one. Use the existing gcs_basename, strip_step_prefixes,
and viz_urls assignment block to locate the change.
- Around line 242-255: Add a focused unit test for the multi-file branch in
log_summarizer’s viz URL assembly logic, since tests/test_slack_fetcher.py only
mocks construct_all_orion_viz_urls. Exercise the path where len(html_files) > 1
in the summarizer code, and verify each html_file is converted via gcs_basename,
has the _viz.html suffix removed before calling strip_step_prefixes, and is
stored in viz_urls with the expected artifact URL.
🪄 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: 46b66c20-4be9-486c-94aa-cc9c93f59159

📥 Commits

Reviewing files that changed from the base of the PR and between 25a27bd and 67041e6.

📒 Files selected for processing (1)
  • bugzooka/analysis/log_summarizer.py

Comment thread bugzooka/analysis/log_summarizer.py
Comment on lines +250 to +255
for html_file in html_files:
html_name = gcs_basename(html_file)
test_name = strip_step_prefixes(
html_name.removesuffix("_viz.html")
)
viz_urls[test_name] = f"{artifacts_url}{html_name}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Silent key collision when multiple HTML files map to the same test name.

In the multi-file branch, test_name is derived from html_name.removesuffix("_viz.html") passed through strip_step_prefixes. If two HTML files in the same step directory produce the same stripped name (e.g., orion-test_viz.html and test_viz.html both yield test after prefix stripping), the second entry silently overwrites the first in viz_urls, losing a visualization URL without any warning.

Consider logging a warning or appending a suffix on collision to preserve all entries.

🛡️ Suggested fix: detect and warn on collisions
             for html_file in html_files:
                 html_name = gcs_basename(html_file)
                 test_name = strip_step_prefixes(
                     html_name.removesuffix("_viz.html")
                 )
+                if test_name in viz_urls:
+                    logger.warning("Duplicate viz test name '%s' from '%s' — overwrites existing entry", test_name, html_name)
                 viz_urls[test_name] = f"{artifacts_url}{html_name}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
for html_file in html_files:
html_name = gcs_basename(html_file)
test_name = strip_step_prefixes(
html_name.removesuffix("_viz.html")
)
viz_urls[test_name] = f"{artifacts_url}{html_name}"
for html_file in html_files:
html_name = gcs_basename(html_file)
test_name = strip_step_prefixes(
html_name.removesuffix("_viz.html")
)
if test_name in viz_urls:
logger.warning("Duplicate viz test name '%s' from '%s' — overwrites existing entry", test_name, html_name)
viz_urls[test_name] = f"{artifacts_url}{html_name}"
🤖 Prompt for 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.

In `@bugzooka/analysis/log_summarizer.py` around lines 250 - 255, The multi-file
path in log_summarizer.py silently overwrites entries in viz_urls when multiple
HTML files normalize to the same test_name. Update the loop that builds viz_urls
to detect collisions after
strip_step_prefixes(html_name.removesuffix("_viz.html")) and either log a
warning and preserve both entries or generate a unique suffixed key instead of
replacing the existing one. Use the existing gcs_basename, strip_step_prefixes,
and viz_urls assignment block to locate the change.

Signed-off-by: Nabeel Mohd <mmnabeel317@gmail.com>
@mmnabeel317 mmnabeel317 force-pushed the fix/multi-viz-html-per-step branch from 574fb0f to b991c67 Compare July 8, 2026 10:33

@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 10851cb into redhat-performance:main Jul 8, 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