Homec4science

Prevent creation of inline comments with mismatched changesetID / revisionPHID

Authored by epriestley <git@epriestley.com> on Jun 3 2016, 22:33.

Description

Prevent creation of inline comments with mismatched changesetID / revisionPHID

Summary:
Ref T11092. With Quicksand (or, possibly, some as-yet-unknown non-Quicksand workflow) the client can get stuck with an out-of-date revision PHID.

We then save comments with a revisionPHID from one revision and a changesetID from a different one.

Detect and prevent this. This stops the workflow immediately when the use first clicks, so it should allow us to detect this issue if it has some other non-Quicksand cause.

Test Plan:

  • Opened revision D123.
  • Pressed \ to enable the sidebar and Quicksand.
  • Clicked a link to revision D124.
  • Added inlines.

Previously, these could ghost. The exact UI behavior is difficult to describe, but in the database they end up with a changesetID for D124 but the original revisionPHID for D123, presumably because state is sticking around from the first page.

After this patch, an exception is thrown immediately. Additionally:

  • Reloaded to clear quicksand state, added comments fine.
  • Disabled sidebar/quicksand, added comments fine.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11092

Differential Revision: https://secure.phabricator.com/D16031

Details

Committed
epriestley <git@epriestley.com>Jun 3 2016, 22:48
Pushed
aubortJan 31 2017, 17:16
Parents
rPH03e54afc146c: Give Phame blogs an explicit 404 controller
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHa34b769b4fea: Prevent creation of inline comments with mismatched changesetID / revisionPHID (authored by epriestley <git@epriestley.com>).Jun 3 2016, 22:48