Open
Bug 1504688
Opened 7 years ago
Updated 4 years ago
EventArtifactDefinitions.json present in build folder with "{ invalid,JSON { {1}" contents (Linux)
Categories
(Toolkit :: Telemetry, enhancement, P3)
Toolkit
Telemetry
Tracking
()
NEW
People
(Reporter: chutten, Unassigned)
Details
When building (non-artefact build) and testing on Linux I noticed an error log in the Browser Console complaining that EventArtifactDefinitions.json had invalid JSON. Checking the objdir, it certainly was invalid.
Checking the source code, that file is generated with those contents in only one place: test_invalidJSON in test_TelemetryEvents_buildFaster.js
I'm not sure how it persisted after running the test, which explicitly removes the file at the end. After touching any part of the event build step it generated a proper EventArtifactDefinitions JSON which overwrote it and all is now well.
We should investigate.
Comment 1•7 years ago
|
||
At `mach build`-time the build system is first generating the `EventArtifactDefinitions.json` in the object dir, then sym-linking it into the `obj/dist` directory.
`test_TelemetryEvents_buildFaster.js` gets the path to the file in the `obj/dist` and writes to it. As it is a symlink, the content lands in the original file in the object dir.
After this test it removes the file by the symlink path, therefore only removing the symlink.
The content stays in the original file.
This logs errors about this file being invalid in subsequent runs of that build, though no hard failure.
We could start the test by removing the file by path. Subsequent writes will write a new file, instead of writing through the symlink.
| Reporter | ||
Comment 2•7 years ago
|
||
I find it interesting to note that this implies that ./mach run reads from the objdir itself not dist/, otherwise it would go looking for the symlink and, upon not finding it, not error.
| Reporter | ||
Comment 3•7 years ago
|
||
Maybe I build again in between and ./mach run read from dist/ across the recreated symlink to the invalid file which wasn't regenerated because the build would have been incremental.
Updated•7 years ago
|
Priority: -- → P2
Updated•7 years ago
|
Priority: P2 → P3
Updated•4 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•