Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locked stacks have no dependencies #661

Merged
merged 1 commit into from
Sep 25, 2018
Merged

Locked stacks have no dependencies #661

merged 1 commit into from
Sep 25, 2018

Conversation

ejholmes
Copy link
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 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