Closed
Bug 1381801
Opened 7 years ago
Closed 7 years ago
Task payload timestamps have inconsistent precision with top level task timestamps
Categories
(Taskcluster :: Services, enhancement)
Taskcluster
Services
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla56
People
(Reporter: pmoore, Assigned: pmoore)
Details
Attachments
(1 file)
1.90 KB,
patch
|
dustin
:
review+
|
Details | Diff | Splinter Review |
When we generate tasks in the gecko decision task, timestamps are given microsecond precision.
The top level task timestamps (deadline, created, expires) are downgraded to millisecond provision in the Queue, however, the Queue does not interpret the timestamps included in the task payload.
This leads to unwanted behaviour. For example:
A worker will consider that if a task has an artifact which expires later than the task, the task is invalid, and will raise a malformed-payload exception.
In the case that the artifact expiry is set to equal the task expiry, the queue will truncated the task expiry to millisecond precision, but not the artifact expiry, and therefore result in a task definition where the artifact expires some number of microseconds after the task expiry. This then leads to tasks being resolved as malformed-payload, due to the different treatment of timestamps in the payload by the taskcluster systems.
To work around this limitation, I propose we reduce generated timestamps to millisecond precision, to match the Queue's precision.
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Explanation of implementation choice
====================================
According to https://docs.python.org/2/library/datetime.html:
datetime.isoformat([sep])
Return a string representing the date and time in ISO 8601 format, YYYY-MM-DDTHH:MM:SS.mmmmmm or, if microsecond is 0, YYYY-MM-DDTHH:MM:SS
Therefore, trivially appending [:-3] to the timestamp expression to strip the last three microseconds will fail 1 time in a million fail (when microseconds == 0).
However, appending [:23] should do the trick, as this won't truncate in the case the expression is 23 characters or less already.
Assignee | ||
Comment 3•7 years ago
|
||
My editor did some funky tab/space replacement in my edit which caused a flake8 failure in my task run, but I've fixed that manually and created this patch (which should be tab free).
Thanks!
Updated•7 years ago
|
Attachment #8887456 -
Flags: review?(dustin) → review+
Pushed by pmoore@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7554ee085d2c
use millisecond precision in taskcluster task definition timestamps;r=dustin
Comment 5•7 years ago
|
||
Commit pushed to master at https://github.com/taskcluster/generic-worker
https://github.com/taskcluster/generic-worker/commit/87c3b37aca6c16c33426b72aabcb9640056b0f8c
Bug 1381801 - be less strict with timestamp comparisons in generic-worker to account for timestamp rounding in upstream systems
Comment 6•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Assignee | ||
Comment 7•6 years ago
|
||
Updated•6 years ago
|
Component: Integration → Services
You need to log in
before you can comment on or make changes to this bug.
Description
•