target = res.target
if self.resolve_dangling_targets(dag, [target]) == 0:
raise RuntimeError("Failed to resolve {} requested by {}. It is possible that it is not correctly generated by a previous step."
.format(", ".join(set([self.workflow.section_by_id(x._step_uuid).step_name() for x in dag.steps_depending_on(target)])),
target))
// now, there should be no dangling targets, let us connect nodes
// this can be done more efficiently
After Change
cycle = dag.circular_dependencies()
if cycle:
raise RuntimeError("Circular dependency detected {}. It is likely a later step produces input of a previous step.".format(cycle))
elif isinstance(res, RemovedTarget):
runnable._status = None
dag.regenerate_target(res.target)
elif isinstance(res, UnavailableLock):
runnable._status = "pending"
section = self.workflow.section_by_id(runnable._step_uuid)