Skip to content

Locked stacks have no dependencies#661

Merged
ejholmes merged 1 commit into
masterfrom
locked-no-deps
Sep 25, 2018
Merged

Locked stacks have no dependencies#661
ejholmes merged 1 commit into
masterfrom
locked-no-deps

Conversation

@ejholmes

Copy link
Copy Markdown
Contributor

This is a performance optimization when using the --stacks/--targets flag, and extracted from #632.

Think of the following example

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:

c -> b

@ejholmes ejholmes requested a review from phobologic September 21, 2018 02:11
@ejholmes ejholmes merged commit 63b772f into master Sep 25, 2018
@ejholmes ejholmes deleted the locked-no-deps branch September 25, 2018 00:51
phrohdoh pushed a commit to phrohdoh/stacker that referenced this pull request Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants