-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
handle unsupported resources in CFn v2 #12905
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
Conversation
stack = self._change_set.stack | ||
stack.set_resource_status( | ||
logical_resource_id=logical_resource_id, | ||
# TODO, | ||
physical_resource_id="", | ||
resource_type=resource_type, | ||
status=ResourceStatus.CREATE_FAILED | ||
if action == ChangeAction.Add | ||
else ResourceStatus.UPDATE_FAILED, | ||
resource_status_reason=reason, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The processing of a failed event is handled at a level above. So these lines just add repetition to that
if resource_provider is None: | ||
log_not_available_message( | ||
resource_type, | ||
f'No resource provider found for "{resource_type}"', | ||
) | ||
if not config.CFN_IGNORE_UNSUPPORTED_RESOURCE_TYPES: | ||
raise NoResourceProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simonrw I believe that raising an error would confuse and alert users. Having the deployment fail and explaining why seems to me like a better experience.
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 22m 18s ⏱️ - 1h 21m 52s Results for commit f7d05e1. ± Comparison against base commit ba66ba1. This pull request removes 4040 tests.
♻️ This comment has been updated with latest results. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 34m 51s ⏱️ Results for commit f7d05e1. ♻️ This comment has been updated with latest results. |
9829c9d
to
f7d05e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right this behaviour is better, but this whole feature is going to be revisited in an upcoming initiative so I'm not too worried at the moment about the specifics. Glad we have a passing test though
Motivation
Changes
CFN_IGNORE_UNSUPPORTED_RESOURCE_TYPES
is set to true the engine will ignore nonexistent resource providers and returnunknown
when a property is requested.Testing