Page MenuHomePhabricator

`arc patch --arcbundle` might require authentification if it can't find base commit
AbandonedPublic

Authored by artms on Feb 10 2020, 9:29 AM.
Tags
None
Referenced Files
F19117130: D20972.id49970.diff
Tue, Dec 9, 7:49 PM
F19045816: D20972.diff
Thu, Nov 27, 8:39 AM
F18843710: D20972.diff
Oct 29 2025, 12:25 AM
F18833566: D20972.id.diff
Oct 26 2025, 4:28 AM
F18812395: D20972.diff
Oct 20 2025, 9:00 AM
F18708702: D20972.id49970.diff
Sep 28 2025, 10:23 PM
F18657615: D20972.id49970.diff
Sep 23 2025, 2:38 AM
F18649641: D20972.diff
Sep 20 2025, 9:43 PM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

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]
Test Plan

Apply patch, run same command but now fail to patch because it is wrong code base

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Tests Skipped
Build Status
Buildable 23795
Build 32724: Run Core Tests
Build 32723: arc lint + arc unit

Event Timeline

artms requested review of this revision.Feb 10 2020, 9:29 AM
artms requested review of this revision.

This change is probably no longer relevant with recent large refactoring of arcanist