Skip to content

Bug 2044755 - comment0 improvements - #10065

Open
Andrej1198 wants to merge 4 commits into
mozilla:masterfrom
Andrej1198:Bug2044755_comment0_split
Open

Andrej1198 wants to merge 4 commits into
mozilla:masterfrom
Andrej1198:Bug2044755_comment0_split

Conversation

@Andrej1198

Copy link
Copy Markdown
Contributor

Based on the feedback we've gotten from the comment0 meetings and some interactions with claude I am submitting a 3 patch stack with some long needed improvements for comment0 for regressions that should make it so people who get regressions have an easier time resolving them and so that sheriffs need to do less work asking people for status updates.

I've created a github static page with some before and after for what it should look like before and after:

Part 1: Make the comment 0 tables easier to read

Bugs:

  • Bug 2044768 - Remove options column in Comment0 where possible
  • Bug 2044778 - The column name in the comment0 table should be test: subtest not just test
  • Bug 2044794 - Make the perfherder graph link in the comment 0 alert zoomed in clearly to the regressing time frame

Changes textualSummary.js and adds formatPercent to helpers.js.

  • Columns: % | Test : Subtest | Before -> After | Change | Platform, in place of Regression | Test | Platform | Options | Absolute values. The Options column only shows when an alert has a non-default option, and Performance Profiles only when there are profile links.
  • % cell: an arrow (▲/▼) for the direction the value moved, two decimals when rounding would show 0%, and a link to the graph zoomed in on 3 days around the push.
  • Test : Subtest cell: only the test name links to its docs; the subtest is plain text.
  • Before -> After: 3 significant digits with K/M/G and the unit (e.g. 245 ms -> 311 ms), kept on one line.
  • Change: the difference of the rounded values (e.g. +66 ms), so it matches the values next to it.
  • Options: default options are hidden (e10s, stylo and webrender everywhere, fission on desktop).
  • Layout: ### Regressions and ### Improvements headings, rows sorted from the biggest change, and long tables cut to the 10 biggest and 5 smallest regressions (5 and 1 improvements) with a linked "… and N more" note.
  • Tests: new tests/ui/perfherder/textual_summary_test.js.
  • Risk: low, the current bug templates work with it unchanged.

Part 2: Make the comment 0 title and text shorter and easier to act on

Bugs:

  • Bug 2044758 - Reduce wording of comment 0 title
  • Bug 2044786 - Replace/add additiona hg commit comment link and git equivalent

Changes helpers.js, textualSummary.js, StatusDropdown.jsx and performance_bug_templates.yaml.

  • Bug title: only the biggest %, the suite and the push date (e.g. 27% pdfpaint regression on 10 September 2026), with no ranges, alert counts or platforms.
  • First line: "Perfherder has detected N regressions on X tests across Y platforms from push abc, which contains N commits:", listing up to 10 commit titles with a push log link for the rest. Falls back to the revision when the commits can't be fetched.
  • "What we need from you by ": the date is 3 business days after filing, skipping weekends. Asks for one of Fix, Back out or Accept, points to #perf-help, and says the patch can be backed out under the regression policy.
  • "How to investigate": 6 numbered steps: the guide, the alert summary, PerfCompare, ./mach try perf --alert, ./mach perftest and a profile.
  • Contact line: shorter.
  • Templates: all 9 framework templates × 3 texts (text, critical_text, no_action_required_text).
  • UI: getTemplateArgs fetches the push commits and adds pushDescription, changesSummary and acknowledgeByDate.
  • Tests: tests/ui/helpers/helpers_test.js (title, date, commit list) and the summary line tests in textual_summary_test.js.
  • Risk: the template and the UI code that fills it change together. A tab opened before the deploy can't file a bug until it's reloaded.

Part 3: Attach the alert data for agents to perf regression bugs

No bug

Changes alertTasks.js (new), textualSummary.js, StatusDropdown.jsx, treeherder/webapp/api/bugzilla.py and performance_bug_templates.yaml.

  • Attachment: each new perf bug gets perf-alert-<id>.json with:
    • the alert summary, its links, PerfCompare and the try/local commands
    • the commits, each with its bug, Phabricator and diff links
    • for each alert: test, platform, options, unit, values, change, the before/after tasks with labels, profiles, docs, graph and a data URL for ±14 days
  • Tasks: alertTasks.js finds them, using the closest push that ran the test when the alerting push didn't.
  • Backend: after the bug is filed, bugzilla.py attaches the JSON with the perf sheriff key. Any failure is only logged, so filing still succeeds.
  • UI: the agent data is built in a try/catch and left out above 2 MB, so the request stays under Django's 2.5 MB limit.
  • Template: one line, "For agents and tools: the alert data is in the attachment …". A copied summary points to the API instead.
  • Tests: alert_tasks_test.js, the agent data tests in textual_summary_test.js, test_bugzilla.py (attachment succeeds, fails, can't be made, not sent) and status_dropdown_test.jsx (fails, too big).
  • Risk: the same template/UI coupling as Part 2.

New engineers found the comment 0 tables hard to scan. This puts the percentage and the test in their own columns, adds a Change column, shortens the values, hides default options and zooms the graph links in on the push (bugs 2044768, 2044778, 2044794).
… act on

New engineers found the bug title and comment 0 text long and unclear about what to do. This shortens the title, lists the commits in the push, gives a date to reply by and numbers the investigation steps (bugs 2044758, 2044786).
Agents had no complete machine-readable alert data on the bug. This attaches a JSON file with every alert, its tasks, labels, commits and data URLs, and files the bug without it if it fails or is too big.
@netlify

netlify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for treeherder ready!

Name Link
🔨 Latest commit 397193a
🔍 Latest deploy log https://app.netlify.com/projects/treeherder/deploys/6b08bf26779e4240d7407abd
😎 Deploy Preview https://deploy-preview-10065--treeherder.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@Andrej1198 Andrej1198 self-assigned this Nov 26, 2026
@Andrej1198 Andrej1198 added the perfherder perfherder related PR for the Perf team to work on label Nov 26, 2026
…hole test client

The test patched json.dumps globally, so the test client couldn't encode its own request. It now only breaks the attachment encoding in bugzilla.py.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.61538% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.21%. Comparing base (5d87ca8) to head (397193a).

Files with missing lines Patch % Lines
ui/perfherder/alerts/StatusDropdown.jsx 44.44% 15 Missing ⚠️
ui/perfherder/perf-helpers/textualSummary.js 96.90% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10065      +/-   ##
==========================================
+ Coverage   83.88%   84.21%   +0.33%     
==========================================
  Files         684      685       +1     
  Lines       42501    42782     +281     
  Branches     4039     4185     +146     
==========================================
+ Hits        35651    36029     +378     
+ Misses       6656     6313     -343     
- Partials      194      440     +246     
Flag Coverage Δ
javascript 69.03% <93.55%> (?)
python 92.18% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perfherder perfherder related PR for the Perf team to work on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants