Skip to content

fix: GetTaskDurationsByTaskIds could get wrong row for taskId - #5227

Merged
juliusgeo merged 2 commits into
mainfrom
prom_fix_2
Oct 16, 2026
Merged

juliusgeo merged 2 commits into
mainfrom
prom_fix_2

Conversation

@juliusgeo

@juliusgeo juliusgeo commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

The query GetTaskDurationsByTaskIds does not necessarily return results in the same order as given. Change it so that we are definitively associating the taskId with the correct row, rather than using indices. Also, add some logging to catch other potential error cases.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation change (pure documentation change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking changes to code which doesn't change any behaviour)
  • Performance improvement (non-breaking change which improves performance)
  • CI (any automation pipeline changes)
  • Chore (changes which are not directly related to any business logic)
  • Test changes (add, refactor, improve or change a test)
  • This change requires a documentation update

Checklist

Changes have been:

  • Documented (where applicable)
  • Added to CHANGELOG (where applicable) -- see Keep a Changelog

🤖 AI Disclosure
  • I acknowledge that an LLM was used in the creation of this Pull Request, in accordance with Hatchet's AI_POLICY.md.
  • Details: [e.g. generating tests, writing docs]

@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hatchet-docs Ready Ready Preview Oct 16, 2026 6:15pm UTC

Request Review

@github-actions github-actions Bot added the engine Related to the core Hatchet engine label Oct 16, 2026
@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge.

Summary

The PR fixes GetTaskDurationsByTaskIds by matching returned rows to TaskID rather than their position.

  • Task duration rows stay matched to the task IDs they belong to.
  • The task metrics worker warns when a batch skips observations.

Reviews (2) · Last reviewed commit: "add logging" · Reviewed by Greptile

@juliusgeo
juliusgeo merged commit 1e1c2a9 into main Oct 16, 2026
64 checks passed
@juliusgeo
juliusgeo deleted the prom_fix_2 branch October 16, 2026 18:32

This branch was successfully deployed

1 active deployment
Preview — 3d85e409 Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine Related to the core Hatchet engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants