@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When executing a repository passthru command via CommandEngine, don't set a timeout

Summary:
Ref T13541. The passthru future does not have time limit behavior, so if we reach this code we currently fail.

Phabricator never reaches this code normally, but this code is reachable during debugging if you try to foreground a slow fetch to inspect it.

Passthru commands generally only make sense to run interactively, and the caller or control script can enforce their own timeouts (usually by pressing "^C" with their fingers).

Test Plan: Used a debugging script to run ref-by-ref fetches in the foreground.

Maniphest Tasks: T13541

Differential Revision: https://secure.phabricator.com/D21284

+5 -2
+5 -2
src/applications/diffusion/protocol/DiffusionCommandEngine.php
··· 120 120 public function newFuture() { 121 121 $argv = $this->newCommandArgv(); 122 122 $env = $this->newCommandEnvironment(); 123 + $is_passthru = $this->getPassthru(); 123 124 124 125 if ($this->getSudoAsDaemon()) { 125 126 $command = call_user_func_array('csprintf', $argv); ··· 127 128 $argv = array('%C', $command); 128 129 } 129 130 130 - if ($this->getPassthru()) { 131 + if ($is_passthru) { 131 132 $future = newv('PhutilExecPassthru', $argv); 132 133 } else { 133 134 $future = newv('ExecFuture', $argv); ··· 139 140 // to try to avoid cases where `git fetch` hangs for some reason and we're 140 141 // left sitting with a held lock forever. 141 142 $repository = $this->getRepository(); 142 - $future->setTimeout($repository->getEffectiveCopyTimeLimit()); 143 + if (!$is_passthru) { 144 + $future->setTimeout($repository->getEffectiveCopyTimeLimit()); 145 + } 143 146 144 147 return $future; 145 148 }