One feature branch
stacked-task-set
Run a list of tasks in order on a feature branch. Then stop and wait. A person merges the pull request to master.
ganda task work-set --ids <ids> --into <branch>
Select a node, or run the path that the host uses.
How you write it
You write the routine in C#. Each call adds one node. Build makes the intermediate representation.
public static RoutineDefinition Build()
{
return Routine.Named(RoutineId)
.Compute("walk-set", WalkSetAsync)
.Compute("set-outcome", Decide)
.Switch<SetOutcome>(sw => sw
.When(SetOutcome.Failed, then => then
.Compute("stop", Stop))
.When(SetOutcome.Succeeded, then => then
.Compute("merge-feature", MergeFeature)
.Compute("audit", TaskWork.Audit)
.Compute("open-master-pr", OpenMasterPr)
.Gate("human-merge")))
.Build();
}The file is source/timewarp-taratibu/routines/stacked-task-set/stacked-task-set.cs. Taratibu master 53de8c4.
Why this shape
Related kitchens must see each merge before the next task starts. The merge to master is still a decision for a person. The loop for each id stays inside walk-set. The same switch label on the graph is a cycle. The checker rejects that cycle.
What you get
- FeatureBranch is the base of the stack. Child N+1 starts from the branch after child N merges. The child does not wait for origin-home.
- A dependency inside the set is complete when that merge lands on the feature branch.
- The first child that fails stops the set. There is no flag to continue after an error.
- The merge to master is the human-merge gate. The host does not merge it.
Rules
- You must pass --into. The value must not be master.
- Each child task-work still checks the work and opens its own pull request. The host merges those requests onto --into.
- If a child node is Blocked, or if a child gate stops, the host stops walk-set. The host does not record walk-set. A later run starts that child again.
- After success the host runs merge-feature, then audit, then open-master-pr. Then the host stops at the gate.
This routine starts
The drawing follows the D2 file in the repo. Node ids do not change. Ganda connects the commands. Ganda does not change the graph.