Commit Graph

8 Commits

Author SHA1 Message Date
Dustin J. Mitchell
b184f414fd Bug 1286075: fix flake8 error; r=gps CLOSED TREE a=KWierso
MozReview-Commit-ID: 4DWMQTVekwk
2016-09-13 19:44:04 +00:00
Dustin J. Mitchell
b5148a1840 Bug 1286075: delete the legacy kind; r=mshal
MozReview-Commit-ID: F99tUGUWj6d
2016-09-08 00:31:35 +00:00
Dustin J. Mitchell
f29490f01e Bug 1286075: allow defaults in TransformTask; r=gps
MozReview-Commit-ID: 5tdnxykLTZc
2016-09-01 18:48:38 +00:00
Dustin J. Mitchell
1c449ca5e0 Bug 1286075: add support for optimizing based on files changed in the push; r=gps
MozReview-Commit-ID: 5di7TuL9X2P
2016-09-12 18:40:12 +00:00
Dustin J. Mitchell
28515da8c6 Bug 1286075: factor load_yaml into a util module; r=gps
MozReview-Commit-ID: DPWZWslcphy
2016-09-06 18:01:27 +00:00
Gregory Szorc
248b1e1823 Backed out changeset 7a3a65ff5865 (bug 1295486) for test failures 2016-08-18 10:21:26 -07:00
Gregory Szorc
5fe1f3f6e3 Bug 1295486 - Decode YAML files to UTF-8 at read time; r=dustin
Before, we'd open files and feed bytes to yaml.load(). When a str
is fed to yaml.load(), it attempts to guess the encoding. It defaults
to UTF-8 unless somebody set us up the BOM. This is probably OK.
Except if the file isn't valid UTF-8, the exception will be raised
in the bowels of YAML parsing and it may not be obvious the failure
is due to invalid UTF-8 input versus say Python str/unicode
coercion foo.

We change all call sites that load YAML from a file to use
codecs.open() to open the file in UTF-8 and perform UTF-8
decoding/validation at file read time. This should make any UTF-8
failures more obvious. Furthermore, it reinforces that our YAML files
are UTF-8 and not some other encoding.

I discovered this issue as part of trying to get emoji symbols to
render on Treeherder. Unfortunately, it appears pyyaml detects
many emoji as unprintable characters and refuses to load them. This
makes me sad and makes me want to abandon pyyaml/YAML in favor of
something that supports emoji :P

MozReview-Commit-ID: AOvAruZFfnK
2016-08-18 08:58:59 -07:00
Dustin J. Mitchell
dab4ce5291 Bug 1290602: add TransformTask to task-graph machinery; r=gps
This abstracts out the process of running transforms as specified in kind.yml,
with some useful default behavior that can be overridden by subclasses.

MozReview-Commit-ID: 8pY4IYaN7NU
2016-08-01 17:52:52 +00:00