Page MenuHomePhabricator

'Error parsing field "Reviewers"' when using '#' to address groups/projects.
Closed, InvalidPublic

Description

I upgraded to the latest stable branch during the weekend, and it appears as it broke the the use of hashtags in diffs. We're using this to assign the project as reviewers instead of having to manually write out all reviewers.

# Trying to update an existing diff
$ arc diff origin/master --trace
[...]
[2016-01-12 13:08:26] EXCEPTION: (ArcanistDifferentialCommitMessageParserException) Error parsing field "Reviewers": The objects you have listed include objects which do not exist (#). at [<arcanist>/src/differential/ArcanistDifferentialCommitMessage.php:54]
arcanist(head=master, ref.master=aeb374b33348), phutil(head=master, ref.master=0fa7efbf09d7)
  #0 ArcanistDifferentialCommitMessage::pullDataFromConduit(ConduitClient) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1786]
  #1 ArcanistDiffWorkflow::getCommitMessageFromRevision(string) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1518]
  #2 ArcanistDiffWorkflow::buildCommitMessage() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:460]
  #3 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:392]

The diff above was created using the following command:

$ arc diff --create --reviewers "#foo_bar" origin/master

(where 'Foo Bar' is a project in Phabricator)

Server side

# phabrictor
$ git rev-parse HEAD
2e7f2b735702f84cdc9a7fb2167dda40dc47390c

# arcanist
$ git rev-parse HEAD
6833ae5bd33e86b5dbc8ee75221f778fc458b89c

# libphutil
$ git rev-parse HEAD
f5120574826088cba45c5ed4c2c05be4cbacbc86

Client side

I've upgraded arc to the latest version:

$ arc upgrade
Upgrading libphutil...
Upgrading arcanist...
Updated! Your copy of arc is now up to date.

I've also tried re-running it a few times, without luck.

Related Objects

Mentioned In
D15002: Test
Mentioned Here
D15002: Test

Event Timeline

I can't reproduce this. Here's what I did:

  • I checked out a new branch in libphutil.
  • I made some trivial change.
  • I ran arc diff --create --reviewers "#bug_report" origin/master

This popped up this screen with "Reviewers: ..." prefilled. I filled in the title, subject, and test plan.

Screen Shot 2016-01-12 at 5.30.41 AM.png (1×1 px, 106 KB)

  • I saved and exited.
  • This created D15002, as I'd expect.

Oh, you're reporting that updating causes the error, sorry. Let me try that.

After the above, I ran arc diff origin/master --trace to update the revision. Got approximately the same screen (with "Differential Revision" now populated), saved and exited, got a clean update (see D15002).

Very strange. I solved it temporarily by removing the group from the list of reviewers. That way I could at least update the diff. We've had similar issues in the past. The issue appears to mostly happen when you try to update a diff that was created before the upgrade (and not necessarily new update).

epriestley claimed this task.

I was able to reproduce the error message with the obvious, invalid input:

Reviewers: #

Produces:

[2016-01-12 05:57:52] EXCEPTION: (ArcanistDifferentialCommitMessageParserException) Error parsing field "Reviewers": The objects you have listed include objects which do not exist (#).

However, I can not reproduce it with any other input. For example, #invalid produces:

[2016-01-12 06:00:11] EXCEPTION: (ArcanistDifferentialCommitMessageParserException) Error parsing field "Reviewers": The objects you have listed include objects which do not exist (#invalid).

...and a bunch of nonsense characters produces:

[2016-01-12 06:00:44] EXCEPTION: (ArcanistDifferentialCommitMessageParserException) Error parsing field "Reviewers": The objects you have listed include objects which do not exist (#!(*__*))

Since we don't have any way to reproduce this issue, we can't move forward in the upstream. See Contributing Bug Reports.

@epriestley Yeah, I understand. If you cannot reproduce it you can't fix it. ;)