Page MenuHomePhabricator

Rough cut of DrydockRepositoryOperation

Authored by epriestley on Oct 13 2015, 4:39 PM.



Ref T182. This doesn't do anything interesting yet and is mostly scaffolding, but here's roughly the workflow. From previous revision, you can configure "Repository Automation" for a repository:

If it's configured, a new "Land Revision" button shows up:

Once you click it you get a big warning dialog that it won't work, and then this shows up at the top of the revision (completely temporary/placeholder UI, some day a nice progress bar or whatever):

If you're lucky, the operation eventually sort of works:

It only runs git show right now, doesn't actually do any writes or anything.

Test Plan
  • Clicked "Land Revision".
  • Watched phd debug task.
  • Saw it log git show to output.
  • Verified operation success in UI (by fiddling URL, no way to get there normally yet).

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley updated this revision to Diff 34443.Oct 13 2015, 4:39 PM
epriestley retitled this revision from to Rough cut of DrydockRepositoryOperation.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
epriestley added inline comments.Oct 13 2015, 4:44 PM

As I think about it, this isn't necessarily true: we could have a limit of 1 working copy, with two merges in queue, and the second merge might lease it and then wait for the first operation indefinitely.

I'll tweak the comment -- still fine conceptually, we'd just have to do the sequencing a little earlier. It normally costs ~1 second to grab a lease so we aren't losing much by not being aggressive about leasing.

epriestley updated this revision to Diff 34444.Oct 13 2015, 4:46 PM
  • Fix hypotehtical comment to avoid hypothetical race.
revi added a subscriber: revi.Oct 13 2015, 5:30 PM
chad accepted this revision.Oct 13 2015, 7:07 PM
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 13 2015, 7:07 PM
This revision was automatically updated to reflect the committed changes.