Page MenuHomePhabricator

Extract repository command construction from Repositories
ClosedPublic

Authored by epriestley on Apr 19 2016, 12:16 AM.
Tags
None
Referenced Files
F13042786: D15752.id37958.diff
Wed, Apr 17, 12:20 PM
Unknown Object (File)
Thu, Apr 11, 8:29 AM
Unknown Object (File)
Wed, Apr 10, 4:06 AM
Unknown Object (File)
Sun, Mar 31, 4:41 PM
Unknown Object (File)
Sun, Mar 31, 4:40 PM
Unknown Object (File)
Sun, Mar 31, 4:40 PM
Unknown Object (File)
Sun, Mar 31, 4:40 PM
Unknown Object (File)
Wed, Mar 27, 10:38 AM
Subscribers
None

Details

Summary

Ref T4292. Ref T10366. Depends on D15751. Today, generating repository commands is purely a function of the repository, so they use protocols and credentials based on the repository configuration.

For example, a repository with an SSH "remote URI" always generate SSH "remote commands".

This needs to change in the future:

  • After T10366, repositories won't necessarily just have one type of remote URI. They can only have one at a time still, but the repository itself won't change based on which one is currently active.
  • For T4292, I need to generate intracluster commands, regardless of repository configuration. These will have different protocols and credentials.

Prepare for these cases by separating out command construction, so they'll be able to generate commands in a more flexible way.

Test Plan
  • Added unit tests.
  • Browsed diffusion.
  • Ran bin/phd debug pull to pull a bunch of repos.
  • Ran daemons.

Diff Detail

Repository
rP Phabricator
Branch
rlock3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11830
Build 14844: Run Core Tests
Build 14843: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Extract repository command construction from Repositories.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
PHP Fatal error:  Call to undefined method ExecFuture::getEnv() in /core/data/drydock/workingcopy-70/repo/phabricator/src/applications/diffusion/protocol/__tests__/DiffusionCommandEngineTestCase.php on line 146

Yeah, the unit test thing isn't smart enough to figure out dependencies like that yet.

chad edited edge metadata.
This revision is now accepted and ready to land.Apr 19 2016, 2:35 AM
This revision was automatically updated to reflect the committed changes.