Closed Bug 1328453 Opened 8 years ago Closed 8 years ago

calculate-durations DataError: (1264, "Out of range value for column 'average_duration' at row 1")

Categories

(Tree Management :: Treeherder: Data Ingestion, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: wlach)

References

Details

Attachments

(1 file, 1 obsolete file)

This is almost certainly somehow my fault. :)
Assignee: nobody → wlachance
On closer examination, I think this could happen if the end time for a job was less than the start time. This should never happen, but apparently does somehow. I think we can guard against it easily, but probably best to wait for the rest of bug 1318474 to land first (so we don't have merge conflicts).
Blocks: 1344021
Comment on attachment 8843112 [details] [review] [treeherder] KWierso:jobtimes > mozilla:master If skipping jobs that finish before they start is needed, would this be what we need?
Attachment #8843112 - Flags: review?(wlachance)
Comment on attachment 8843112 [details] [review] [treeherder] KWierso:jobtimes > mozilla:master Yes, this is the right idea, though I think we can make things more efficient by skipping these jobs at the query level: http://stackoverflow.com/a/12380982 Could you try that? Ideally we would also add a unit test for this case in tests/model/test_calculate_durations.py. If you don't have time to do this, I can probably take care of it, let me know. On reflection I'm not sure if we should try to fix this at the data ingestion level, since (I think) the end before start weirdness is something coming from the jobs themselves.
Attachment #8843112 - Flags: review?(wlachance)
If you can take it, that'd be great.
Attachment #8843112 - Attachment is obsolete: true
Comment on attachment 8843444 [details] [review] [treeherder] wlach:1328453 > mozilla:master Turns out I had accidentally deleted the calculate durations tests. Re-added them, along with a fix for this issue.
Attachment #8843444 - Flags: review?(emorley)
Comment on attachment 8843444 [details] [review] [treeherder] wlach:1328453 > mozilla:master Many thanks for fixing this!
Attachment #8843444 - Flags: review?(emorley) → review+
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/fe5742a236a3bcd96f16fd68cd32b010b628403b Bug 1328453 - Re-add accidentally deleted unit test for calculating durations https://github.com/mozilla/treeherder/commit/1a19c1601ab513e996c486a9bca0e5a580f1ce5e Bug 1328453 - Only use completed jobs for calculating average job duration Completed jobs = those with an end time > start_time
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
No longer blocks: 1344021
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: