boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
8.82k stars 1.84k forks source link

cloudformation describe_change_set with IncludePropertyValues=True response lacking StatusReason #4178

Open ilons opened 5 days ago

ilons commented 5 days ago

Describe the bug

When calling the describe_change_set function on a cloudformation client for a stack with IncludePropertyValues set to True, the response does not include StatusReason if the change set Status is FAILED.

Expected Behavior

The StatusReason should be included in the response both when IncludePropertyValues is set to True.

Current Behavior

The response returned does not include the StatusReason for a change set with a Status of FAILED (at least not when it failed due to no changes). When performing the same call with IncludePropertyValues set to False, the StatusReason is included in the response.

Reproduction Steps

Create a CloudFormation stack Call create_change_set using the same template Call describe_change_set on the created change set with IncludePropertyValues set to True

Possible Solution

No response

Additional Information/Context

This seems to be a bug in CloudFormation itself, as the AWS Console are performing two calls when viewing a change set, one with include property values set to true, and one with it set to false.

SDK version used

1.34.134

Environment details (OS name and version, etc.)

Python 3.10.12, Linux Pop!_OS 22.04 LTS

tim-finnigan commented 5 days ago

Thanks @ilons for reaching out. I tried to reproduce this issue but was not able do. When running the describe_change_set command and getting a FAILED status, I got the StatusReason in my response with IncludePropertyValues was either set to True or False.

Could you provide code snippets to help us reproduce the issue? Also if you can share debug logs (with sensitive info redacted) by adding boto3.set_stream_logger('') to your script, that could give us insight into the underlying issue here.

Boto3 commands like describe_change_set involve calls to upstream APIs (in this case DescribeChangeSet) so there may be some edge case issue with the CloudFormation API and/or here that we would need to escalate to that team.

ilons commented 4 days ago

Could you provide code snippets to help us reproduce the issue? Also if you can share debug logs (with sensitive info redacted) by adding boto3.set_stream_logger('') to your script, that could give us insight into the underlying issue here.

Thank you for the swift response, I'm afraid it would be very hard for me to provide this in the same timely fashion, as I'm leaving for vacation. However, I'll put a note to provide this as soon as I get back.