perf: run benchmarks daily and deduplicate regression issues#1871
perf: run benchmarks daily and deduplicate regression issues#1871
Conversation
- Change cron schedule from weekly (Mondays) to daily at 06:00 UTC - When a regression is detected, check for an existing open issue with performance+needs-investigation labels before creating a new one. If one exists, comment on it with updated data instead of duplicating. Closes #1865 Closes #1868 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
Updates the performance monitoring workflow to detect regressions sooner and reduce issue spam by reusing an existing open regression issue when possible.
Changes:
- Switch the benchmark schedule from weekly to daily at 06:00 UTC.
- Add deduplication logic: if an open issue exists with
performance+needs-investigation, comment on it instead of creating a new issue.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/performance-monitor.yml | Changes cron cadence to daily and adds “comment vs create issue” dedup logic for regression reporting. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 2
|
|
||
| if (existing.data.length > 0) { | ||
| // Comment on existing issue instead of creating a duplicate | ||
| const issueNumber = existing.data[0].number; |
There was a problem hiding this comment.
issues.listForRepo returns both Issues and Pull Requests. With the current logic, an open PR that happens to have the performance + needs-investigation labels could be selected and then the workflow would comment on the PR instead of the regression issue. Filter existing.data to exclude items with the pull_request field (or switch to a search that targets issues only) before deciding whether an existing regression issue exists.
| if (existing.data.length > 0) { | |
| // Comment on existing issue instead of creating a duplicate | |
| const issueNumber = existing.data[0].number; | |
| const existingIssues = existing.data.filter(item => !item.pull_request); | |
| if (existingIssues.length > 0) { | |
| // Comment on existing issue instead of creating a duplicate | |
| const issueNumber = existingIssues[0].number; |
There was a problem hiding this comment.
Addressed in a6bde85: added existing.data.filter(item => !item.pull_request) to exclude PRs, and bumped per_page from 1 to 5 to account for the filtering.
| repo: context.repo.repo, | ||
| issue_number: issueNumber, | ||
| body: `## Updated Regression Data\n\n**Run:** [${context.runId}](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})\n\n${body}`, | ||
| }); |
There was a problem hiding this comment.
The comment body currently embeds the full body payload (including the raw JSON details/code block). On daily runs this can create very large comments and may hit GitHub's comment size limits, causing the workflow to fail when trying to comment. Consider making the update comment a shorter summary (e.g., run link + regression list + key stats) and link to the workflow artifacts for full JSON instead of duplicating the entire report each time.
There was a problem hiding this comment.
Addressed in a6bde85: trimmed the update comment to a short summary (date, run link, commit SHA, regression list) with a link to the workflow run for full results and artifacts. No more raw JSON in comments.
Address Copilot review feedback: - Filter out pull requests from issues.listForRepo results since the API returns both issues and PRs; an open PR with matching labels could be mistakenly selected instead of a regression issue. - Reduce update comment size to a short summary (date, run link, commit, regression list) with a link to full artifacts, avoiding potential GitHub comment size limits on daily runs. - Bump per_page from 1 to 5 to account for PRs being filtered out. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Smoke Test Results
Overall: PASS
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Summary
performance+needs-investigationlabels. If one exists, comment on it with updated data instead of creating duplicates.Test plan
Closes #1865
Closes #1868
🤖 Generated with Claude Code