Failed landing due to incorrect diff for empty files/lines.
Categories
(Conduit :: moz-phab, defect, P1)
Tracking
(Not tracked)
People
(Reporter: Sylvestre, Assigned: zalun)
References
Details
Attachments
(2 files)
when I tried to land: https://lando.services.mozilla.com/D80029/
As suggested on chat.m.o, pushing with "moz-phab submit --arc" with my issue!
Comment 1•5 years ago
|
||
partially-incorrect |
As far as I can tell this is due to moz-phab setting null metadata on binary file add/removes.
moz-phab gives the following to a file add
"metadata": {
"old:binary-phid": null,
"old:file:size": 0,
"old:file:mime-type": "",
"new:binary-phid": "PHID-FILE-tqeyupg2ofmkpsrprekv",
"new:file:size": 112,
"new:file:mime-type": "image/png"
}
Whereas arcanist will only set the new:
ones for adds, and vice-versa for file removes, like
"metadata": {
"new:file:size": 112,
"new:file:mime-type": "image/png",
"new:binary-phid": "PHID-FILE-wb3sdj7rvy5vgujjhoq2"
}
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
https://phabricator.services.mozilla.com/D80026?vs=298461&id=298777#toc
This one shows a difference between the plain moz-phab
and --arc
diffs.
Seems like file ending. I'll investigate further tomorrow.
Comment 4•5 years ago
|
||
(In reply to Piotr Zalewa [:zalun] from comment #3)
https://phabricator.services.mozilla.com/D80026?vs=298461&id=298777#toc
This one shows a difference between the plainmoz-phab
and--arc
diffs.
Seems like file ending. I'll investigate further tomorrow.
Can confirm the issue is indeed the empty files. moz-phab is giving them a hunk object, whereas arcanist doesn't.
Manual test with a duff hunk: https://phabricator-dev.allizom.org/D2122
From https://phabricator.services.mozilla.com/D80026
moz-phab (Diff 298461):
{
"id": "2687976",
"metadata": {
"hash.effect": "qVzKuHbdOl_L"
},
"oldPath": null,
"currentPath": "third_party/python/pyflakes/pyflakes/scripts/__init__.py",
"awayPaths": [],
"oldProperties": [],
"newProperties": {
"unix:filemode": "100644"
},
"type": "1",
"fileType": "1",
"commitHash": null,
"addLines": "0",
"delLines": "0",
"hunks": [
{
"oldOffset": "0",
"newOffset": "1",
"oldLength": "0",
"newLength": "0",
"addLines": null,
"delLines": null,
"isMissingOldNewline": null,
"isMissingNewNewline": null,
"corpus": ""
}
]
}
arcanist (Diff 298777):
{
"id": "2689840",
"metadata": [],
"oldPath": "third_party/python/pyflakes/pyflakes/scripts/__init__.py",
"currentPath": "third_party/python/pyflakes/pyflakes/scripts/__init__.py",
"awayPaths": [],
"oldProperties": [],
"newProperties": {
"unix:filemode": "100644"
},
"type": "1",
"fileType": "1",
"commitHash": null,
"addLines": "0",
"delLines": "0",
"hunks": []
}
Assignee | ||
Updated•5 years ago
|
Comment hidden (obsolete) |
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Description
•