From d02256df3ca5b591fb619f173865c57f918f1d0e Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 11 Apr 2019 06:03:16 -0700 Subject: [PATCH] Remove very old "vsDiff" data from commit update / diff extraction pipeline Summary: Ref T13276. This was introduced in D2586 to power a "trigger audits when the committed change does not match the reviewed change" feature. It was removed without ceremony in D15939. Broadly, rebases mean that this sort of feature can't really work like this and this approach is inherently unreliable; see also T182. This property no longer has readers, and is unlikely to get any in the future since my planned pathway for "committed code must match reviewed code, modulo an automated rebase" is automating the rebase via "Land Revision", not comparing the diff text. Remove this to simplify the flow of data here so that things in T13276 can be fixed more easily. Test Plan: Grepped for `vsDiff`, no hits. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13276 Differential Revision: https://secure.phabricator.com/D20395 --- .../engine/DifferentialDiffExtractionEngine.php | 6 ------ .../PhabricatorRepositoryCommitMessageParserWorker.php | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/applications/differential/engine/DifferentialDiffExtractionEngine.php b/src/applications/differential/engine/DifferentialDiffExtractionEngine.php index 7b94b1958b..08e0a344e0 100644 --- a/src/applications/differential/engine/DifferentialDiffExtractionEngine.php +++ b/src/applications/differential/engine/DifferentialDiffExtractionEngine.php @@ -243,8 +243,6 @@ final class DifferentialDiffExtractionEngine extends Phobject { PhabricatorContentSource $content_source) { $viewer = $this->getViewer(); - $result_data = array(); - $new_diff = $this->newDiffFromCommit($commit); $old_diff = $revision->getActiveDiff(); @@ -261,8 +259,6 @@ final class DifferentialDiffExtractionEngine extends Phobject { $old_diff, $new_diff); if ($has_changed) { - $result_data['vsDiff'] = $old_diff->getID(); - $revision_monogram = $revision->getMonogram(); $old_id = $old_diff->getID(); $new_id = $new_diff->getID(); @@ -336,8 +332,6 @@ final class DifferentialDiffExtractionEngine extends Phobject { // lost a race to close the revision. That's perfectly fine, we can // just continue normally. } - - return $result_data; } private function loadConcerningBuilds(DifferentialRevision $revision) { diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php index 8a1b5e5dd1..b0583725a9 100644 --- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php +++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php @@ -278,17 +278,13 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker $content_source = $this->newContentSource(); - $update_data = $extraction_engine->updateRevisionWithCommit( + $extraction_engine->updateRevisionWithCommit( $revision, $commit, array( $commit_close_xaction, ), $content_source); - - foreach ($update_data as $key => $value) { - $data->setCommitDetail($key, $value); - } } } }