Skip to content

Commit 0692115

Browse files
author
epriestley
committed
Remove all references to the Conduit ConnectionLog
Summary: Ref T5955, T9980, T9982. We currently store two types of Conduit logs: //connection// logs and //method// logs. Originally, Conduit worked like web logins: you'd call `conduit.connect` and then get a session back. This approach still works, but new clients don't use it and it will probably stop working eventually after T5955 is further along. There was no real reason for things to work like this and no other API in the world does, I think it was just slightly easier to implement back in 2011. This table was used to group up related calls in a UI long ago, I think, but that got deleted at some point. In any case, it serves no purpose in modern Phabricator. Test Plan: `grep` Reviewers: chad Reviewed By: chad Maniphest Tasks: T5955, T9980, T9982 Differential Revision: https://secure.phabricator.com/D14780
1 parent 4a147dc commit 0692115

File tree

5 files changed

+2
-71
lines changed

5 files changed

+2
-71
lines changed

src/__phutil_library_map__.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@
227227
'ConduitCall' => 'applications/conduit/call/ConduitCall.php',
228228
'ConduitCallTestCase' => 'applications/conduit/call/__tests__/ConduitCallTestCase.php',
229229
'ConduitConnectConduitAPIMethod' => 'applications/conduit/method/ConduitConnectConduitAPIMethod.php',
230-
'ConduitConnectionGarbageCollector' => 'applications/conduit/garbagecollector/ConduitConnectionGarbageCollector.php',
231230
'ConduitEpochParameterType' => 'applications/conduit/parametertype/ConduitEpochParameterType.php',
232231
'ConduitException' => 'applications/conduit/protocol/exception/ConduitException.php',
233232
'ConduitGetCapabilitiesConduitAPIMethod' => 'applications/conduit/method/ConduitGetCapabilitiesConduitAPIMethod.php',
@@ -1884,7 +1883,6 @@
18841883
'PhabricatorConduitAPIController' => 'applications/conduit/controller/PhabricatorConduitAPIController.php',
18851884
'PhabricatorConduitApplication' => 'applications/conduit/application/PhabricatorConduitApplication.php',
18861885
'PhabricatorConduitCertificateToken' => 'applications/conduit/storage/PhabricatorConduitCertificateToken.php',
1887-
'PhabricatorConduitConnectionLog' => 'applications/conduit/storage/PhabricatorConduitConnectionLog.php',
18881886
'PhabricatorConduitConsoleController' => 'applications/conduit/controller/PhabricatorConduitConsoleController.php',
18891887
'PhabricatorConduitController' => 'applications/conduit/controller/PhabricatorConduitController.php',
18901888
'PhabricatorConduitDAO' => 'applications/conduit/storage/PhabricatorConduitDAO.php',
@@ -4089,7 +4087,6 @@
40894087
'ConduitCall' => 'Phobject',
40904088
'ConduitCallTestCase' => 'PhabricatorTestCase',
40914089
'ConduitConnectConduitAPIMethod' => 'ConduitAPIMethod',
4092-
'ConduitConnectionGarbageCollector' => 'PhabricatorGarbageCollector',
40934090
'ConduitEpochParameterType' => 'ConduitListParameterType',
40944091
'ConduitException' => 'Exception',
40954092
'ConduitGetCapabilitiesConduitAPIMethod' => 'ConduitAPIMethod',
@@ -5999,7 +5996,6 @@
59995996
'PhabricatorConduitAPIController' => 'PhabricatorConduitController',
60005997
'PhabricatorConduitApplication' => 'PhabricatorApplication',
60015998
'PhabricatorConduitCertificateToken' => 'PhabricatorConduitDAO',
6002-
'PhabricatorConduitConnectionLog' => 'PhabricatorConduitDAO',
60035999
'PhabricatorConduitConsoleController' => 'PhabricatorConduitController',
60046000
'PhabricatorConduitController' => 'PhabricatorController',
60056001
'PhabricatorConduitDAO' => 'PhabricatorLiskDAO',

src/applications/conduit/garbagecollector/ConduitConnectionGarbageCollector.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/applications/conduit/method/ConduitConnectConduitAPIMethod.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@ protected function execute(ConduitAPIRequest $request) {
6363
->truncateString($client_description);
6464
$username = (string)$request->getValue('user');
6565

66-
// Log the connection, regardless of the outcome of checks below.
67-
$connection = new PhabricatorConduitConnectionLog();
68-
$connection->setClient($client);
69-
$connection->setClientVersion($client_version);
70-
$connection->setClientDescription($client_description);
71-
$connection->setUsername($username);
72-
$connection->save();
73-
7466
switch ($client) {
7567
case 'arc':
7668
$server_version = 6;
@@ -154,7 +146,7 @@ protected function execute(ConduitAPIRequest $request) {
154146
}
155147

156148
return array(
157-
'connectionID' => $connection->getID(),
149+
'connectionID' => mt_rand(),
158150
'sessionKey' => $session_key,
159151
'userPHID' => $user->getPHID(),
160152
);

src/applications/conduit/storage/PhabricatorConduitConnectionLog.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/docs/tech/conduit.diviner

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ There is a web interface for viewing and testing Conduit called the "Conduit
4646
Console", implemented by @{class:PhabricatorConduitConsoleController} at
4747
`/conduit/`.
4848

49-
A log of connections and calls is stored by
50-
@{class:PhabricatorConduitConnectionLog} and
49+
A log of connections and calls is stored in
5150
@{class:PhabricatorConduitMethodCallLog}, and can be accessed on the web via
5251
@{class:PhabricatorConduitLogController} at `/conduit/log/`.
5352

0 commit comments

Comments
 (0)