Page MenuHomePhabricator

Revision repository is not updated when it is changed in the UI
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Create a revision making sure no repository is set
  2. Update the revision setting a repository
  3. Run:
echo '{  "ids": [    "NEWREVID"  ]}' | arc call-conduit --conduit-uri <phab_uri> --conduit-token <conduit-token> differential.query

and notice that: "repositoryPHID": null, instead of being set to the repository you just set' PHID

Event Timeline

thiblahute updated the task description. (Show Details)
thiblahute added a project: Conduit.
thiblahute updated the task description. (Show Details)
thiblahute added a subscriber: thiblahute.

For some reason that I don't know offhand (maybe historic reasons, maybe just an error), this method returns the repository PHID of the active diff instead of the repository PHID of the revision itself.

Since this value isn't useless and some callers might rely on it, and we have major API changes planned in the future in T7715, I'm inclined not to touch this until it gets rewritten in terms of ApplicationSearch.

I'll leave this open to make sure it gets fixed up in that process, though.

I see, how could I set the Diff repository (can't find a way to do that in the UI) or actually get the revision repository from conduit?

We've run into this a couple of times. When a user updates a revision through the web UI, the repository field (at /differential/revision/update/{REVID}/) doesn't auto-populate with the revision's repository and people sometimes forget to fill it out. This causes the repository to be stripped from the revision as well.

epriestley claimed this task.

The modern differential.revision.search API returns the repository for the revision.

I expect to just keep the frozen differential.query behavior as it exists, to avoid breaking backward compatibility over a relatively minor abnormality.

The web update workflow is a bug, and should be fixed by D21638.

This is survived by T13643.