feat: tracked-in field for failures, fix dashboard filter truncation (#155, #156)#160
feat: tracked-in field for failures, fix dashboard filter truncation (#155, #156)#160myakove wants to merge 12 commits into
Conversation
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Branch Management
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
Security Checks
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
PR Summary by QodoAdd tracked-in links for failures and fix dashboard filtering/pagination
AI Description
Diagram
High-Level Assessment
Files changed (14)
|
Code Review by Qodo
Context used✅ Tickets:
🎫 fix: dashboard filters and search are applied after 500-job truncation — older jobs are invisible 🎫 feat: "Tracked In" field for failed tests — link Jira/GitHub issues to failure history✅ Compliance rules (platform):
40 rules 1.
|
|
Code review by qodo was updated up to the latest commit d2d638d |
|
Code review by qodo was updated up to the latest commit 8e43a95 |
|
Code review by qodo was updated up to the latest commit 47d4ebf |
|
Fixed — moved the "Track" button to the failure card header row, positioned right after the classification/pattern badges. It's now visible without expanding the card. Changes:
Pushed to the branch and deployed to dev. Please re-test. |
|
Code review by qodo was updated up to the latest commit 0e00e84 |
0e00e84 to
304925f
Compare
Move the Track button from the expanded action bar to the failure card header row, positioned right after the classification/pattern badges. This makes it visible without expanding the card.
602af19 to
6353282
Compare
|
Code review by qodo was updated up to the latest commit 6353282 |
|
Code review by qodo was updated up to the latest commit 9d159cd |
| updated = await storage.set_tracked_in( | ||
| job_id, | ||
| body.test_name, | ||
| issue_url, | ||
| tracked_type, | ||
| child_job_name=body.child_job_name, | ||
| child_build_number=body.child_build_number, | ||
| ) | ||
| if updated == 0: | ||
| logger.warning( | ||
| "Tracked-in auto-set matched 0 rows for " | ||
| "job_id=%s, test_name=%s, child=%s/%s", | ||
| job_id, | ||
| body.test_name, | ||
| body.child_job_name, | ||
| body.child_build_number, | ||
| ) |
There was a problem hiding this comment.
1. Unreported multi-row update 🐞 Bug ◔ Observability
In _add_tracker_comment(), auto-setting tracked-in only logs when storage.set_tracked_in() updates 0 rows; if it updates >1 rows, the code silently proceeds, making it hard to detect unexpected broad updates. This can mask mismatched scoping (e.g., wildcard child_build_number=0 or duplicate failure_history rows) and complicate debugging when tracked-in links appear on multiple failures.
Agent Prompt
## Issue description
`_add_tracker_comment()` auto-sets tracked-in via `storage.set_tracked_in()` and only warns when `updated == 0`. When `updated > 1`, there is no log/telemetry indicating a broad write occurred, which can hide incorrect scoping and make support/debugging difficult.
## Issue Context
- `storage.set_tracked_in()` can legitimately update multiple rows depending on inputs (e.g., wildcard semantics when `child_build_number == 0`, or multiple matching rows).
- The caller currently treats any `updated > 0` as success without surfacing the breadth of the update.
## Fix Focus Areas
- src/rootcoz/main.py[5249-5265]
### Suggested fix
- Change the rowcount check to:
- warn when `updated == 0` (existing behavior)
- additionally warn when `updated > 1` (or more generally when `updated != 1`) including job_id, test_name, child scope, and the rowcount.
- Keep the tracker URL out of logs (or log only host) to avoid future leakage risk.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit bd9ab4a |
| {trackedIn[repKey]?.tracked_in_url && ( | ||
| <TrackedInBadge url={trackedIn[repKey].tracked_in_url} type={trackedIn[repKey].tracked_in_type} /> | ||
| )} | ||
| {rep.reanalyzed_with && rep.reanalysis_status !== 'running' && ( | ||
| <Tooltip> | ||
| <TooltipTrigger asChild> |
There was a problem hiding this comment.
1. Duplicate tracked-in badge 🐞 Bug ⚙ Maintainability
FailureCard renders TrackedInBadge in the header and again in the expanded section under the same condition (trackedIn[repKey]?.tracked_in_url), so expanded cards show the same tracked-in link twice.
Agent Prompt
### Issue description
`FailureCard` conditionally renders `TrackedInBadge` twice (once in the header badges row and once again in the expanded body). When a failure has `tracked_in_url` and the card is expanded, the same tracked-in link appears twice.
### Issue Context
The duplication is caused by two separate render blocks guarded by the same condition `trackedIn[repKey]?.tracked_in_url`.
### Fix Focus Areas
- frontend/src/pages/report/FailureCard.tsx[398-400]
- frontend/src/pages/report/FailureCard.tsx[725-730]
### Suggested fix
Make the renders mutually exclusive (e.g., show it in the header only when collapsed, or remove the expanded-body copy), so the tracked-in badge/link appears exactly once per card state.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit 4e5d19c |


Summary
Two features:
"Tracked In" field (feat: "Tracked In" field for failed tests — link Jira/GitHub issues to failure history #155): Failed tests can now be linked to Jira/GitHub issues. Links are set automatically when creating issues via the app, or manually by users. Visible in the job results page (badge + dialog), CLI, and API.
Dashboard filter fix (fix: dashboard filters and search are applied after 500-job truncation — older jobs are invisible #156): Dashboard had a hardcoded
LIMIT 500applied before filtering, making older jobs invisible. Now all filters (search, status, date, metadata) are pushed into SQL so the LIMIT applies to the filtered set. Server-side pagination replaces client-side slicing.Closes #155
Closes #156
Changes
Issue #155
tracked_in_urlandtracked_in_typecolumns tofailure_historyPUT /results/{job_id}/tracked-inandGET /results/{job_id}/tracked-inendpointsTrackedInBadge(icon + link) andTrackInDialog(manual URL entry)rootcoz results set-tracked-incommand + display inresults showIssue #156
list_results_for_dashboard_filtered()— filters in SQL before LIMIT/api/dashboardsupportslimit/offset,/api/dashboard/filteredsupportssearch/status/date_from/date_to/limit/offset_parse_dashboard_rowand_DASHBOARD_BASE_SQLto avoid duplicationAll 2590 tests pass (2339 backend + 251 frontend).