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
F13211655: D16031.diff
Fri, May 17, 5:57 AM
F13196824: D16031.diff
Sun, May 12, 11:36 PM
Unknown Object (File)
Fri, May 3, 7:23 AM
Unknown Object (File)
Mon, Apr 29, 5:06 PM
Unknown Object (File)
Sat, Apr 27, 10:14 PM
Unknown Object (File)
Thu, Apr 25, 1:30 AM
Unknown Object (File)
Apr 19 2024, 4:48 PM
Unknown Object (File)
Apr 18 2024, 9:35 PM
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