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
F13059774: D16031.diff
Fri, Apr 19, 4:48 PM
Unknown Object (File)
Thu, Apr 18, 9:35 PM
Unknown Object (File)
Thu, Apr 11, 9:02 AM
Unknown Object (File)
Sun, Apr 7, 12:13 AM
Unknown Object (File)
Sun, Mar 31, 2:30 PM
Unknown Object (File)
Tue, Mar 26, 1:13 AM
Unknown Object (File)
Feb 15 2024, 3:46 AM
Unknown Object (File)
Feb 9 2024, 12:03 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