Page MenuHomePhabricator

Extract repository command construction from Repositories
ClosedPublic

Authored by epriestley on Apr 19 2016, 12:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 9, 1:05 PM
Unknown Object (File)
Mon, Aug 8, 11:20 PM
Unknown Object (File)
Mon, Aug 8, 11:20 PM
Unknown Object (File)
Mon, Aug 8, 6:08 PM
Unknown Object (File)
Mon, Aug 8, 6:08 PM
Unknown Object (File)
Sun, Aug 7, 11:47 AM
Unknown Object (File)
Wed, Aug 3, 1:28 PM
Unknown Object (File)
Mon, Aug 1, 6:14 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.