Usage Exception: User aborted the workflow

I used “arc diff” to raise a PR. After that reviewers suggested some changes. After making those changes, whenever I run the “arc diff” command, I get the error: “Usage Exception: User aborted the workflow.”. I have tried various other commands like “arc diff --update <revision_id>” and tried patching the earlier PR in a new branch and then updating from there but every time I am getting the same error. Can anyone please help me with why this error is coming and what should I do to fix it?

My PR is ⚙ D104015 [MLIR] Simplify affine.if ops with trivial conditions

run arc diff --trace - this would show logs and maybe show what when wrong.

Also - which version of arc, and which OS are you using?

 ARGV  /opt/arcanist/bin/arc diff --trace
>>> [1] (+0) <exec> $ php -f /opt/arcanist/scripts/arcanist.php -- diff --trace
 ARGV  /opt/arcanist/scripts/arcanist.php diff --trace
 LOAD  Loaded "arcanist" from "/opt/arcanist/src".
Config: Reading user configuration file "/home1/shashij/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/home1/shashij/mlir-public/llvm-project/.arcconfig".
Working Copy: Path "/home1/shashij/mlir-public/llvm-project" is part of `git` working copy "/home1/shashij/mlir-public/llvm-project".
Working Copy: Project root is at "/home1/shashij/mlir-public/llvm-project".
Config: Did not find local configuration at "/home1/shashij/mlir-public/llvm-project/.git/arc/config".
>>> [1] (+0) <http> https://reviews.llvm.org/api/user.whoami
<<< [1] (+758) <http> 758,888 us
>>> [2] (+761) <exec> $ git --version
<<< [2] (+765) <exec> 3,451 us
>>> [3] (+765) <exec> $ git status --porcelain=2 -z
<<< [3] (+1,004) <exec> 238,754 us
You have untracked files in this working copy.

  Working copy: /home1/shashij/mlir-public/llvm-project/

  Untracked changes in working copy:
  (To ignore these 1 change(s), add them to ".git/info/exclude".)
    0001-MLIR-Simplify-affine.if-ops-with-trivial-conditions.patch

    Ignore these 1 untracked file(s) and continue? [y/N] y

>>> [4] (+12,328) <event> diff.didCollectChanges <listeners = 0>
<<< [4] (+12,328) <event> 73 us
>>> [5] (+12,328) <exec> $ git rev-parse --verify HEAD^
<<< [5] (+12,332) <exec> 3,859 us
>>> [6] (+12,332) <exec> $ git cat-file -t 'HEAD^'
<<< [6] (+12,336) <exec> 3,980 us
>>> [7] (+12,337) <exec> $ git rev-parse HEAD
<<< [7] (+12,340) <exec> 3,545 us
>>> [8] (+12,340) <exec> $ git log --first-parent --format=medium 'HEAD^..1b2e5a07dd4ee5057ff33b9a750e175e1ab30c7e' --
<<< [8] (+12,344) <exec> 3,708 us
>>> [9] (+12,347) <http> https://reviews.llvm.org/api/differential.query
<<< [9] (+13,102) <http> 754,445 us
>>> [10] (+13,102) <http> https://reviews.llvm.org/api/differential.query
<<< [10] (+13,372) <http> 270,045 us
>>> [11] (+13,372) <http> https://reviews.llvm.org/api/differential.getcommitmessage
<<< [11] (+13,644) <http> 271,482 us
>>> [12] (+13,644) <http> https://reviews.llvm.org/api/differential.parsecommitmessage
<<< [12] (+13,903) <http> 258,423 us
>>> [13] (+13,903) <event> diff.didBuildMessage <listeners = 0>
<<< [13] (+13,903) <event> 30 us
>>> [14] (+13,903) <exec> $ git rev-parse --git-dir
<<< [14] (+13,907) <exec> 3,672 us
>>> [15] (+13,907) <exec> $ git log --first-parent --format=medium 'HEAD^..1b2e5a07dd4ee5057ff33b9a750e175e1ab30c7e' --
<<< [15] (+13,911) <exec> 4,248 us
>>> [16] (+13,912) <exec> $ which editor
<<< [16] (+13,915) <exec> 3,352 us
>>> [17] (+13,916) <exec> $ editor /tmp/edit.2l1pmw5paeck0w84/differential-update-comments
<<< [17] (+19,675) <exec> 5,759,350 us
Usage Exception: User aborted the workflow.

[2021-06-11 07:55:52] EXCEPTION: (ArcanistUserAbortException) User aborted the workflow. at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:712]
arcanist(head=master, ref.master=239ad5c55d8d)
  #0 ArcanistDiffWorkflow::buildRevisionFromCommitMessage(ArcanistDifferentialCommitMessage) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:362]
  #1 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:419]
<<< [1] (+19,735) <exec> 19,735,309 us

arc version: arcanist 239ad5c55d8d5b09ec87fcf125e5dbe746a64842 (8 Feb 2021)
OS: Ubuntu 20.04.2 LTS

[17] (+13,916) <exec> $ editor /tmp/edit.2l1pmw5paeck0w84/differential-update-comments <<< [17] (+19,675) <exec> 5,759,350 us

What happens when it runs this? Does nano shows up?

Updating D104015: [MLIR] Simplify affine.if ops with trivial conditions

Enter a brief description of the changes included in this update.

The first line is used as subject, next lines as comment.

If you intended to create a new revision, use:

$ arc diff --create

~
~
~
~
~
~
~
~
~
~
~
“/tmp/edit.2h8uafi81jqc0owk/differential-update-comments” 10L, 281C 7,1 All

This shows up in vi

and what do you do next?

This could be ⚓ T13297 "vi" and "vim" may exit with errors even though edits succeed
To solve, you can set the editor: arc set-config editor vi which will tell arc to enter a vi-compatibility mode.

Just :wq to save and exit

Tried this. Still same error!

Can you try replacing the editor with nano (or some other non-vi editor)?

still same error

does it actually load nano, or do you still get vi ?

It loads nano

Try making any edit to the message loaded before saving, maybe that will change something.

Nope! Already tried that

Which shell are you using? If it’s not bash maybe try running the command from within a bash shell and see if you get the same result.

I am using bash only

How about using --message to skip the editor - does that succeed?

yes that worked! Thanks

Ok, I’m going to file this one under “ghosts”.