submit is broken when no commit in diffphid - IndexError: list index out of range
Categories
(Conduit :: moz-phab, defect, P2)
Tracking
(Not tracked)
People
(Reporter: florent, Assigned: florent)
References
(Regression)
Details
(Keywords: conduit-triaged)
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Steps to reproduce:
- I created a commit to fix an issue.
- Then, I used "moz-phab submit", it was successful and created the following phabricator entry:
"https://phabricator.services.mozilla.com/D96210" - As there was lint errors, I tried to modify the diff directly from fabricator by using the "update diff" button.
- The reviewer told me to resubmit with moz-phab as it looks like that there was no commit info with my diff.
- So I did a:
"hg commit --amend"
"moz-phab submit"
Actual results:
The command failed with the following error "IndexError: list index out of range"
ERROR 2020-11-10 20:58:05,591 Traceback (most recent call last):
File "/home/florent/.virtualenvs/firefoxpy3/lib/python3.8/site-packages/mozphab/mozphab.py", line 83, in main
args.func(repo, args)
File "/home/florent/.virtualenvs/firefoxpy3/lib/python3.8/site-packages/mozphab/commands/submit.py", line 442, in submit
show_commit_stack(commits, wip=args.wip, validate=True, ignore_reviewers=args.wip)
File "/home/florent/.virtualenvs/firefoxpy3/lib/python3.8/site-packages/mozphab/commands/submit.py", line 198, in show_commit_stack
!= diffs[revision["fields"]["diffPHID"]]["attachments"][
IndexError: list index out of range
Expected results:
The command should have worked
Assignee | ||
Comment 1•4 years ago
|
||
Even if for different root cause, this issue is related to the following one:
https://bugzilla.mozilla.org/show_bug.cgi?id=1674310
In both cases the code fails at the same place for the same reason.
In my case, the "diff" created on phabricator will not create any "commit" associated with the new diff.
And so, when moz-phab look at the previous diff commit to see if the diff sha1 has changed, it crashes.
I have created a patch for this issue that I will push.
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D96655
Comment 5•3 years ago
•
|
||
Fixed in 1.0.0rc1, see bug 1718540.
Description
•