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

[Resolve #1519] Bugfix in differ #1530

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions sceptre/diffing/stack_differ.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ def _create_deployed_stack_config(
if err.response["Error"]["Message"].endswith("does not exist"):
return None

# Unknown error, raise it as-is
raise err

stacks = description["Stacks"]
for stack in stacks:
if stack["StackStatus"] in self.STACK_STATUSES_INDICATING_NOT_DEPLOYED:
Expand Down
8 changes: 8 additions & 0 deletions tests/test_diffing/test_stack_differ.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@ def test_diff__deployed_stack_does_not_exist__returns_is_deployed_as_false(self)
diff = self.differ.diff(self.actions)
assert diff.is_deployed is False

def test_diff__raises_some_other_client_error(self):
self.actions.describe.side_effect = ClientError(
{"Error": {"Code": "ForbiddenException", "Message": "No access"}},
"DescribeStacks",
)
with pytest.raises(ClientError, match="No access"):
self.differ.diff(self.actions)

def test_diff__deployed_stack_does_not_exist__compares_none_to_generated_config(
self,
):
Expand Down