Page MenuHomePhabricator

Creating revision is failling with "*** APIError: ERR-CONDUIT-CORE: #1048: Column 'originalTitle' cannot be null"
Closed, WontfixPublic


Just creating a simple diff in the UI and then trying to create a revision from it with

echo '{
  "diffid": 822
}' | arc call-conduit differential.createrevision

fails here with:

[HTTP/500] Internal Server Error
{"result":null,"error_code":"ERR-CONDUIT-CORE","error_info":"#1048: Column 'originalTitle' cannot be null"}
(Run with `--trace` for a full exception trace.)

Event Timeline

why is there a '\'' before originalTitle in your json? And why are you manually setting originalTitle anyway?

why is there a '\'' before originalTitle in your json? And why are you manually setting originalTitle anyway?

I just tried to set it just in case, but that was not working.

avivey added a project: Differential.
avivey updated the task description. (Show Details)

I can re-create this near HEAD.

I can re-create this near HEAD.

Meaning it works for you in master?

This comment was removed by avivey.

Meaning I get the same error while being close to master.

Either something is missing in the call, and/or a better exception should be raised.

Why are you trying to create revisions with a direct API call? Can you describe the broader problem you're facing? There may be a better solution. See:

I am writing a git module to create revisions from git, it is quite similar to arc but I want to avoid rewriting commit messages (Summary and things like that), have a better integration with git and allow sending branches without squashing the commits.

epriestley claimed this task.

I'd recommend looking at exactly what arc does and following that, rather than trying to construct calls from scratch.

In particular, the correct/required values for the fields parameter depend on the server configuration. If your alternate client doesn't follow the same workflow arc does, it will break if any changes are made on the server to add, remove, or reconfigure revision fields.

Generally, the flow is:

  • Call differential.getcommitmessage to get a template message.
  • Have the user fill it out.
  • Call differential.parsecommitmessage to turn it into structured fields.
  • Pass the fields to differential.createrevision.

If you do this, you'll hit more useful errors and end up with a proper fields payload. Even if you want to hardcode the fields values and don't care about server configuration changes, this will get you started with a working input. Particularly, the title field is required, and differential.parsecommitmessage will give you a tailored error about that if you don't provide one, then emit a "title" field in the output.

Broadly, implementing alternate clients falls under T5447 (custom application development) and isn't something we have the time or bandwidth to help you with in the upstream, nor something we necessarily consider reasonable or accomplishable today. See that task for discussion.

See also history.immutable in arc (which prevents rewriting commit messages), and T1508.