Page MenuHomePhabricator

Prevent creation of inline comments with mismatched changesetID / revisionPHID
ClosedPublic

Authored by epriestley on Jun 3 2016, 8:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 9:02 AM
Unknown Object (File)
Thu, Dec 12, 10:52 PM
Unknown Object (File)
Wed, Nov 27, 11:12 PM
Unknown Object (File)
Tue, Nov 26, 4:05 PM
Unknown Object (File)
Tue, Nov 26, 4:05 PM
Unknown Object (File)
Tue, Nov 26, 4:04 PM
Unknown Object (File)
Tue, Nov 26, 3:49 PM
Unknown Object (File)
Sun, Nov 24, 7:41 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Prevent creation of inline comments with mismatched changesetID / revisionPHID.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Jun 3 2016, 8:47 PM
This revision was automatically updated to reflect the committed changes.
src/applications/differential/controller/DifferentialInlineCommentEditController.php
49

reivsion