Closed Bug 1517909 Opened 2 years ago Closed 2 years ago

invalid build telemetry when start time has no fractional seconds


(Firefox Build System :: General, defect)

Not set


(firefox65 fixed, firefox66 fixed)

Tracking Status
firefox65 --- fixed
firefox66 --- fixed


(Reporter: agashlin, Assigned: ted)



(Keywords: in-triage)


(1 file)

I encountered this error message after "./mach try again", maybe because the submission happened to be exactly on 50 seconds so the decimal that %S.%f is expecting isn't there?


Build telemetry is invalid:
value does not match expected format %Y-%m-%dT%H:%M:%S.%fZ for dictionary value @ data[u'time']
{u'argv': [u'again'],
 u'build_opts': {u'artifact': False,
                 u'ccache': False,
                 u'compiler': 'clang-cl',
                 u'debug': False,
                 u'opt': True,
                 u'sccache': False},
 u'client_id': u'1f024e65-13a9-4702-93d2-2f5329a15296',
 u'command': u'try',
 u'duration_ms': 65388,
 u'success': True,
 u'system': {u'cpu_brand': u'Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz',
             u'os': u'windows'},
 u'time': u'2019-01-05T02:27:50Z'}
Keywords: in-triage
Assignee: nobody → ted
It turns out that Python's `datetime.isoformat` method will leave off the
fractional component of seconds if it would be all zeroes, but the voluptuous
`Datetime` validator wants it to be present, so it's possible to hit an error
if you run mach at exactly an integer second.

This patch switches from `isoformat` to `strftime` with an explicit format
string instead.
Pushed by
format build telemetry time correctly when seconds has no fractional component. r=nalexander
Summary: invalid build telemetry → invalid build telemetry when start time has no fractional seconds
Blocks: 1506888

Interestingly this also seems to be the cause of the intermittent test_telemetry failures in CI, see bug 1506888 comment 16.

Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Blocks: 1507119
Blocks: 1507670
Blocks: 1507712
Blocks: 1507835

We need this on Beta as well to resolve the intermittents which occasionally burn Windows builds. Can be uplifted a=NPOTB.

Whiteboard: [checkin-needed-beta]
You need to log in before you can comment on or make changes to this bug.