1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 19:52:44 +01:00
phorge-phorge/src/applications/diffusion/query
epriestley b88a87c43a Address a transaction issue with some audit actions not applying correctly
Summary:
See <https://discourse.phabricator-community.org/t/cannot-accept-commits-in-audit/2166/>.

In D19842, I changed `PhabricatorEditField->shouldGenerateTransactionsFromComment()`.

  - Previously, it bailed on `getIsConduitOnly()`.
  - After the patch, it bails on a missing `getCommentActionLabel()`.

The old code was actually wrong, and it was previously possible to apply possibly-invalid actions in some cases (or, at least, sneak them through this layer: they would only actually apply if not validated properly).

In practice, it let a different bug through: we sometimes loaded commits without loading their audit authority, so testing whether the viewer could "Accept" the commit or not (or take some other actions like "Raise Concern") would always fail and throw an exception: "Trying to access data not attached to this object..."

Fixing the insufficiently-strict transaction generation code exposed the "authority not attached" bug, which caused some actions to fail to generate transactions.

This appeared in the UI as either an unhelpful error ("You can't post an empty comment") or an action with no effect. The unhelpful error was because we show that error if you aren't taking any //other// actions, and we wouldn't generate an "Accept" action because of the interaction of these bugs, so the code thought you were just posting an empty comment.

Test Plan: Without leaving comments, accepted and rejected commits. No more error messages, and actions took effect.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: stephan.senkbeil, hskiba

Differential Revision: https://secure.phabricator.com/D19845
2018-12-09 16:39:21 -08:00
..
blame Stop "git blame" from printing "^" markers on root repository commits 2018-04-20 14:13:10 -07:00
filecontent Return Diffusion diffs through Files, not directly over Conduit 2016-08-27 09:11:03 -07:00
lowlevel Pull Git filesize logic into a separate LowLevel query and use more Iterators 2018-11-28 14:32:59 -08:00
pathchange Extend from Phobject 2015-06-15 18:02:27 +10:00
pathid Fix a few more undeclared properties 2015-06-15 19:39:04 +10:00
rawdiff Filter and reject "--config" and "--debugger" flags to Mercurial in any position 2017-11-10 08:42:07 -08:00
DiffusionCachedResolveRefsQuery.php Continue cleaning up queries in the wake of changes to "%Q" 2018-11-16 12:49:44 -08:00
DiffusionCommitHintQuery.php When commits have a "rewritten" hint, try to show that in handles in other applications 2016-08-24 09:35:19 -07:00
DiffusionCommitQuery.php Address a transaction issue with some audit actions not applying correctly 2018-12-09 16:39:21 -08:00
DiffusionCommitRequiredActionResultBucket.php Continue converting Audit constants, allowing the Query to handle either strings or integers 2018-09-10 14:46:47 -07:00
DiffusionCommitResultBucket.php Provide bucketing for commits in Audit 2017-01-12 12:04:05 -08:00
DiffusionDiffInlineCommentQuery.php Extend TransactionCommentQuery for Diffusion 2015-03-09 14:11:22 -07:00
DiffusionFileFutureQuery.php Fix some issues with Diffusion file data limits 2018-01-22 11:52:37 -08:00
DiffusionLintCountQuery.php Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
DiffusionPathQuery.php Fix all query warnings in "arc unit --everything" 2018-11-15 03:51:25 -08:00
DiffusionPullLogSearchEngine.php Change the "can see remote address?" policy to "is administrator?" everywhere 2018-01-30 15:45:23 -08:00
DiffusionQuery.php Use futures to improve clustered repository main page performance 2016-12-08 07:26:32 -08:00
DiffusionRenameHistoryQuery.php Extend from Phobject 2015-06-15 18:02:27 +10:00
DiffusionRepositoryIdentitySearchEngine.php Assign RepositoryIdentity objects to commits 2018-05-31 07:28:23 -07:00
DiffusionResolveUserQuery.php Provide a standalone query for resolution of commit author/committer into Phabricator users 2013-12-19 11:05:17 -08:00
DiffusionSymbolQuery.php Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
DiffusionSyncLogSearchEngine.php Add a basic web UI for intracluster sync logs 2018-11-10 04:58:36 -08:00