Page MenuHomePhabricator

Allow build plans to be "embedded" inside other build plans
Closed, WontfixPublic

Description

So we have a scenario where there's two build plans:

  • Build
  • Deploy

Build leases a host and runs a set of commands in the leased directory. Deploy leases a host, does Run Build Plan to start "Build" and then attempts to deploy the built code.

The problem is that they get different leased directories, because they both do lease host. But there's no way to run "Build" and pass the lease through to "Deploy", which prevents it from working the right way.

We could have a stronger version of "Run Build Plan" called "Embed Build Plan" or something of that nature, which actually takes the steps from the other build plan and runs them in context, but then we'd also need to update the UI to traverse artifacts across "Embed Build Plan" steps so we can show the appropriate output artifacts from "Embed Build Plan" and so we don't raise warnings about artifacts coming from embedded build plans.

At the moment we are just duplicating the steps from Build into Deploy, but this isn't sustainable because when we need to change the build we have to change both build plans.

Event Timeline

hach-que raised the priority of this task from to Needs Triage.
hach-que updated the task description. (Show Details)
hach-que added a project: Harbormaster.
hach-que added subscribers: hach-que, epriestley, waynea.

I have the same issue. Need a way to be able to share all the steps between one (or more) other plans. Maybe if you can 'share' leases, it wouldn't be much of an issue.

I think the hard part of this is passing the stuff into the sub-build. We can have a step like "emit artifacts" at the end of the parent build, and a step like "collect artifacts" at the beginning of the child build, but this is going to raise the level of complexity/abstraction by a couple of notches.

eadler added a project: Restricted Project.Aug 5 2016, 4:54 PM
epriestley claimed this task.

This is reasonable to build eventually, but there's currently no support mana behind it and this task doesn't have any unique context or discussion.