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
Remove usage of GenericBaseModel outside of LegacyResourceProvider #8711
Remove usage of GenericBaseModel outside of LegacyResourceProvider #8711
Conversation
57d9a84
to
14cef9a
Compare
@@ -328,7 +328,7 @@ def test_describe_change_set_nonexisting(snapshot, aws_client): | |||
snapshot.match("exception", ex.value) | |||
|
|||
|
|||
@pytest.mark.xfail(reason="fails because of the properties mutation in the result_handler") | |||
@pytest.mark.skip(reason="fails because of the properties mutation in the result_handler") |
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.
don't see a point in waiting 5min for all the timeouts here, so this should speed up the tests a bit 😅
|
||
if config.CFN_IGNORE_UNSUPPORTED_RESOURCE_TYPES: | ||
# TODO: figure out a better way to handle non-implemented here? | ||
return ProgressEvent(OperationStatus.SUCCESS, resource_model={}) |
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.
not sure about the returned model here
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.
Looks like some great changes, I love the overall negative number of lines changed!
cd5675f
to
2ff3f6c
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.
Awesome!!!
bd66bc2
to
5cbb717
Compare
5cbb717
to
889a301
Compare
Changes
CFN_IGNORE_UNSUPPORTED_RESOURCE_TYPES
config variable to determine if we should fail if a resource type doesn't exist. E.g. settingCFN_IGNORE_UNSUPPORTED_RESOURCE_TYPES=0
will cause a stack deployment to fail if the resource type doesn't have an associated provider.RESOURCE_MODELS
, i.e. the GenericBaseModel classes in the template_deployer, except the current fallback for retrievingFn::GetAtt
targets that still needs to use them. If we refactor the models to remove allget_cfn_attribute
calls, we can delete this completely.retrieve_resource_details
extract_resource_attribute
resolve_ref
get_resource_model_instance
invoke_function
(unused)get_ref_from_model
=> simple physical resource ID lookup nowdetermine_resource_physical_id
=> simple physical resource ID lookup nowis_deployable_resource
andis_updateable
=> everything should be a "deployable resource" andis_updateable
is now only used in theLegacyResourceProvider
update_resource_details
=> this was a bit of a headache unfortunately since it was responsible for populating the_state_
, i.e. the result of the fetch_state call in the models. This initially broke UPDATEs on the old models. I've introduced a workaround for Add and Modify operations in the LegacyResourceProvider. It's a bit hacky but we also shouldn't let those currently 15 resources with (partial) UPDATE support live for too long as GenericBaseModels anyway.GenericBaseModel.get_ref
GenericBaseModel.fetch_state_if_missing