-
Notifications
You must be signed in to change notification settings - Fork 298
Fix: Make metrics in graph align with badge metrics #2858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Make metrics in graph align with badge metrics #2858
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a discrepancy between graph metrics and badge metrics by changing the data source for the GetTaskPointMetrics query from v1_task_events_olap to v1_statuses_olap, matching the badge metrics implementation. The change also renames the time bucket column from bucket_2 to minute_bucket for clarity.
Changes:
- Changed
GetTaskPointMetricsquery to usev1_statuses_olaptable instead ofv1_task_events_olap - Updated timestamp column from
task_inserted_attoinserted_at - Renamed the result column from
bucket_2tominute_bucketfor better readability
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pkg/repository/sqlcv1/olap.sql | Updated the SQL query to use v1_statuses_olap table and renamed columns for consistency |
| pkg/repository/sqlcv1/olap.sql.go | Generated Go code reflecting the SQL query changes |
| api/v1/server/handlers/v1/tasks/get_point_metrics.go | Updated handler to use the new MinuteBucket field name |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| COUNT(*) FILTER (WHERE readable_status = 'FAILED') AS failed_count | ||
| FROM | ||
| v1_task_events_olap | ||
| FROM v1_statuses_olap |
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The query is now selecting from v1_statuses_olap which contains statuses for both TASKs and DAGs (based on the kind column). Since this function is specifically for task metrics (GetTaskPointMetrics) and the old implementation used v1_task_events_olap which only contained task events, this query should filter by kind = 'TASK' to exclude DAG statuses. Without this filter, the metrics will incorrectly include DAG status counts.
Re-applies #2739