Closed
Bug 1391123
Opened 8 years ago
Closed 8 years ago
./mach try fuzzy should add a newline at the end of try_task_config.json
Categories
(Testing :: General, enhancement)
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fixed |
People
(Reporter: KWierso, Assigned: KWierso)
Details
Attachments
(1 file)
Looking at https://hg.mozilla.org/try/rev/d2539729043c396ee050207160bd5cdfd1121375 it complains about no newline at the end of the file. It should be pretty easy to add a newline and have it stop complaining about that.
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 2•8 years ago
|
||
This seems to work. Is there a test that would need updated anywhere?
Assignee: nobody → wkocher
Comment 3•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8908918 [details]
Bug 1391123 - Add a newline to the end of try_task_config.json
https://reviewboard.mozilla.org/r/180536/#review185672
AFAIK there are no tests that need to be updated for this.
::: tools/tryselect/vcs.py:88
(Diff revision 1)
> with open(config, 'w') as fh:
> try_task_config = {'tasks': sorted(labels)}
> if templates:
> try_task_config['templates'] = templates
>
> - json.dump(try_task_config, fh, indent=2, separators=(',', ':'))
> + json_text = json.dumps(try_task_config, indent=2, separators=(',', ':'))
We should continue to use ``json.dump`` here. Just add an ``fh.write('\n')`` after it to add the newline.
Attachment #8908918 -
Flags: review?(gps) → review-
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 5•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8908918 [details]
Bug 1391123 - Add a newline to the end of try_task_config.json
https://reviewboard.mozilla.org/r/180536/#review185676
Attachment #8908918 -
Flags: review?(wkocher)
| Assignee | ||
Updated•8 years ago
|
Attachment #8908918 -
Flags: review?(wkocher)
Comment 6•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8908918 [details]
Bug 1391123 - Add a newline to the end of try_task_config.json
https://reviewboard.mozilla.org/r/180536/#review185678
Oh, I do see there are "cram" tests for `mach try`. I even reviewed them, heh. `mach cramtest tools/tryselect`. Although they fail for me locally :/
You might want to run this by Try via `mach try fuzzy cram`.
Attachment #8908918 -
Flags: review?(gps) → review+
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 8•8 years ago
|
||
Updated the tests so they pass. I'm not sure why I had to add the whitespace to the newlines, though... Does that seem right to you?
Flags: needinfo?(gps)
Comment 9•8 years ago
|
||
The whitespace is needed to preserve the added newline. I reckon somewhere we are doing a print(), which will print the newline from the JSON plus a newline itself. (print() emits a trailing newline unless you tell it not to.)
I wouldn't worry too much about it. Let's land this.
Flags: needinfo?(gps)
Comment 10•8 years ago
|
||
Pushed by kwierso@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6835fc2e493b
Add a newline to the end of try_task_config.json r=gps
Comment 11•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•