Page MenuHomePhabricator

Implement leasing working copies from Drydock
AbandonedPublic

Authored by hach-que on May 9 2015, 9:22 AM.
Tags
None
Referenced Files
F13090126: D12783.diff
Thu, Apr 25, 2:13 AM
Unknown Object (File)
Fri, Apr 19, 2:18 AM
Unknown Object (File)
Fri, Apr 19, 2:18 AM
Unknown Object (File)
Fri, Apr 19, 2:18 AM
Unknown Object (File)
Fri, Apr 19, 2:18 AM
Unknown Object (File)
Fri, Apr 19, 2:18 AM
Unknown Object (File)
Fri, Apr 19, 2:18 AM
Unknown Object (File)
Fri, Apr 19, 2:18 AM

Details

Summary

Ref T1049. Ref T2015. This implements the "working copy" blueprint in Drydock and allows Harbormaster to lease from it. More importantly, this implements a cache for repositories, such that a cache of the remote repository is maintained per host resource, and subsequent working copy leases perform git fetch --all on the cache and clone locally.

Currently the working copy blueprint supports taking a lease based on buildablePHIDs, but could easily be extended to allow custom leases. It also resolves revision buildables to their diff / revision IDs, but does not yet support actually acquiring a lease based on a revision.

Test Plan

Tested it with something like:

bin/drydock --trace lease --type working-copy --attributes platform=windows,buildablePHID=PHID-HMBB-y4uubdbzgaobsmlvwwa3

and saw everything work.

Diff Detail

Repository
rP Phabricator
Branch
arcpatch-D12783
Lint
Lint Passed
Unit
Tests Skipped
Build Status
Buildable 6455
Build 6477: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

hach-que retitled this revision from to Implement leasing working copies from Drydock.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
hach-que edited edge metadata.

Move private field to the top of the class

Use the public clone URI so that self-hosted repositories work

  • Ensure working copies are only allocated once per host
  • Fixes for working copy implementation
  • Fix working copy cache update
  • Cache submodules in working copies
  • Support cache-only mode to reduce submodule lease time
  • Prevent working copy resources from being created for other platforms
  • Add an optional host-platform parameter for working copies

Superseded by newer revisions.