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

Merge upstream changes #18

Merged
merged 26 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
925341b
Update README.rst
russellballestrini Oct 14, 2019
71ad3d4
Update README.rst
russellballestrini Oct 14, 2019
638db47
Add link to AWS OSS Blog post
ejholmes Nov 15, 2019
1c07ff2
Merge pull request #747 from cloudtools/aws-blogpost
ejholmes Nov 18, 2019
7fc9648
Locked stacks still have requirements (#746)
mromaszewicz Nov 20, 2019
106ddf3
change diff to use CFN change sets instead of comparing template dict…
ITProKyle Feb 9, 2020
46bb7fe
Doc Update: Sturdy -> Onica (#739)
fbattistella Feb 17, 2020
471cc28
Add YAML environment file support (#740)
mromaszewicz Feb 17, 2020
b6d3118
Fix ami lookup 'Name' key error (#734)
Feb 17, 2020
9cf93c3
Fix jinja req and keypair tests
phobologic Feb 17, 2020
98a1cbf
fix diff functional tests
phobologic Feb 17, 2020
722ba88
Move template to an actual resource
phobologic Feb 17, 2020
44a98ef
Fix raw unit tests
phobologic Feb 17, 2020
c113f64
Fix new SNS based functional tests
phobologic Feb 17, 2020
5215e6a
Sleep for 20 seconds between tests to avoid rate limiting
phobologic Feb 17, 2020
13ec7a2
Twiddle with times to try and fix timeouts
phobologic Feb 18, 2020
9bbb391
Add the import-related stack statuses (#752)
laconc Feb 27, 2020
6221107
fix stack.set_outputs not being called by diff if stack did not chang…
ITProKyle Apr 21, 2020
0f8c233
Fix python 2.7/3.5 dependency issue
phobologic Apr 21, 2020
06a4bee
add cf notification arns (#756)
russellballestrini May 29, 2020
72eb1b0
specify dependency for boto3 in the correct way for multiple version …
TomRitserveldt Aug 22, 2020
4e32f25
Release 1.7.1 (#760)
phobologic Aug 22, 2020
eda3a52
address breaking moto change to awslambda (#763)
hauntingEcho Sep 14, 2020
c022c2f
Added Python version validation before update kms decrypt output (#765)
bmcoelho Oct 29, 2020
f563a6f
Release 1.7.2 (#767)
phobologic Nov 10, 2020
867a03f
Fix exception in 'stacker build --dump' when targets are defined
shawnsmith Nov 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Locked stacks still have requirements (cloudtools#746)
This fixes 745. Locked stacks still have dependencies, since there
is no difference between a locked stack and an unlocked stack at
creation time.
  • Loading branch information
mromaszewicz authored and phobologic committed Nov 20, 2019
commit 7fc9648bcc01284715876e815d04fcf9f63ca0d9
6 changes: 0 additions & 6 deletions stacker/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ def required_by(self):

@property
def requires(self):
# By definition, a locked stack has no dependencies, because we won't
# be performing an update operation on the stack. This means, resolving
# outputs from dependencies is unnecessary.
if self.locked and not self.force:
return []

requires = set(self.definition.requires or [])

# Add any dependencies based on output lookups
Expand Down
24 changes: 24 additions & 0 deletions stacker/tests/test_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,30 @@ def fn(stack, status=None):

self.assertEquals(calls, ['namespace-vpc.1', 'namespace-bastion.1'])

def test_execute_plan_locked(self):
# Locked stacks still need to have their requires evaluated when
# they're being created.
vpc = Stack(
definition=generate_definition('vpc', 1),
context=self.context)
bastion = Stack(
definition=generate_definition('bastion', 1, requires=[vpc.name]),
locked=True,
context=self.context)

calls = []

def fn(stack, status=None):
calls.append(stack.fqn)
return COMPLETE

graph = build_graph([Step(vpc, fn), Step(bastion, fn)])
plan = build_plan(
description="Test", graph=graph)
plan.execute(walk)

self.assertEquals(calls, ['namespace-vpc.1', 'namespace-bastion.1'])

def test_execute_plan_filtered(self):
vpc = Stack(
definition=generate_definition('vpc', 1),
Expand Down
26 changes: 0 additions & 26 deletions stacker/tests/test_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,32 +49,6 @@ def test_stack_requires(self):
stack.requires,
)

def test_stack_requires_when_locked(self):
definition = generate_definition(
base_name="vpc",
stack_id=1,
variables={
"Var1": "${noop fakeStack3::FakeOutput}",
"Var2": (
"some.template.value:${output fakeStack2::FakeOutput}:"
"${output fakeStack::FakeOutput}"
),
"Var3": "${output fakeStack::FakeOutput},"
"${output fakeStack2::FakeOutput}",
},
requires=["fakeStack"],
)
stack = Stack(definition=definition, context=self.context)

stack.locked = True
self.assertEqual(len(stack.requires), 0)

# TODO(ejholmes): When the stack is in `--force`, it's not really
# locked. Maybe it would be better if `stack.locked` were false when
# the stack is in `--force`.
stack.force = True
self.assertEqual(len(stack.requires), 2)

def test_stack_requires_circular_ref(self):
definition = generate_definition(
base_name="vpc",
Expand Down