When base commit is not available in repository arc patch --arcbundle will fail with EXCEPTION: (ConduitClientException) ERR-INVALID-SESSION: Session key is not present.
Reproduction:
$ git clone ssh://secure@secure.phabricator.com/source/phabricator.git $ cd phabricator # this is patch from arcanist repository to make sure base commit doesn't exist: $ pushd /tmp; arc export --diff 49918 --arcbundle 49918 --conduit-uri https://secure.phabricator.com; popd $ arc patch --arcbundle /tmp/49918 --no-branch --trace
Fails with error:
INFO Base commit is not in local repository; trying to fetch. >>> [11] (+1,064) <exec> $ git fetch --quiet --all <<< [11] (+7,341) <exec> 6,276,866 us >>> [12] (+7,342) <exec> $ git show -s --format='%H' '70c0fd3f2233c2e71e056cca3e85a6d4aad7fead' -- <<< [12] (+7,352) <exec> 10,199 us >>> [13] (+7,353) <http> https://secure.phabricator.com/api/differential.query <<< [13] (+7,618) <http> 264,976 us [2020-02-10 09:26:33] EXCEPTION: (ConduitClientException) ERR-INVALID-SESSION: Session key is not present. at [<phutil>/src/conduit/ConduitFuture.php:62] arcanist(head=21a1828ea06cf031e93082db8664d73efc88290a, ref.master=1e9581a0e38f), phabricator(head=master, ref.master=2327578adc94), phutil(head=deployment, ref.master=9f2c1e1412e2, ref.deployment=048e10231a43) #0 ConduitFuture::didReceiveResult(array) called at [<phutil>/src/future/FutureProxy.php:58] #1 FutureProxy::getResult() called at [<phutil>/src/future/FutureProxy.php:35] #2 FutureProxy::resolve() called at [<phutil>/src/conduit/ConduitClient.php:64] #3 ConduitClient::callMethodSynchronous(string, array) called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:1123] #4 ArcanistPatchWorkflow::buildDependencyGraph(ArcanistBundle) called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:931] #5 ArcanistPatchWorkflow::applyDependencies(ArcanistBundle) called at [<arcanist>/src/workflow/ArcanistPatchWorkflow.php:469] #6 ArcanistPatchWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]