Page MenuHomePhabricator

Extract repository command construction from Repositories
ClosedPublic

Authored by epriestley on Apr 19 2016, 12:16 AM.
Tags
None
Referenced Files
F15475173: D15752.id37961.diff
Sun, Apr 6, 4:56 PM
F15427051: D15752.id37958.diff
Sun, Mar 23, 12:23 PM
F15419787: D15752.id.diff
Fri, Mar 21, 8:53 AM
F15335430: D15752.id37958.diff
Mar 8 2025, 3:14 PM
F15292518: D15752.id37961.diff
Mar 5 2025, 2:27 AM
Unknown Object (File)
Feb 24 2025, 6:37 PM
Unknown Object (File)
Feb 13 2025, 6:53 AM
Unknown Object (File)
Feb 10 2025, 6:15 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.