stacks:
- name: a
locked: true
- name: b
requires: [a]
locked: true
- name: c
requires: [b]
This forms a dependency graph like so:
c -> b -> a
Given I run stacker build --targets c, stacker will walk all 3 nodes in the graph, however, given that b is locked, it's unnecessary for stacker to execute a; since b is locked it doesn't need any information from a, and thus, doesn't actually depend on a.
With this change, because b is locked, it has no dependencies, so a will not be included in the filtered graph, which becomes:
This is a performance optimization when using the
--stacks/--targets
flag, and extracted from https://github.com/cloudtools/stacker/pull/632.Think of the following example
This forms a dependency graph like so:
Given I run
stacker build --targets c
, stacker will walk all 3 nodes in the graph, however, given thatb
is locked, it's unnecessary for stacker to executea
; sinceb
is locked it doesn't need any information froma
, and thus, doesn't actually depend ona
.With this change, because
b
is locked, it has no dependencies, soa
will not be included in the filtered graph, which becomes: