Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Duplicate elasticache.NodeGroupConfiguration definition causing type check failure #1803

Closed
jjpestacio opened this issue Oct 7, 2020 · 1 comment

Comments

@jjpestacio
Copy link

There are two class definitions for NodeGroupConfiguration:
https://github.com/cloudtools/troposphere/blob/master/troposphere/elasticache.py#L101
https://github.com/cloudtools/troposphere/blob/master/troposphere/elasticache.py#L162

This causes a type check failure when creating a ReplicationGroup with a NodeGroupConfiguration:

TypeError: <class 'troposphere.elasticache.ReplicationGroup'>: replicationgroupredisclustertest2.NodeGroupConfiguration is <class 'troposphere.elasticache.NodeGroupConfiguration'>, expected [<class 'troposphere.elasticache.NodeGroupConfiguration'>]

When importing NodeGroupConfiguration, the latter class is used but during validation for ReplicationGroup the former class is used.

The resolution is to remove one of the NodeGroupConfiguration class definitions. Note that there is a difference between the types of NodeGroupId in the class definitions.

@markpeek
Copy link
Member

markpeek commented Oct 7, 2020

Thank you @jjpestacio. Just pushed a fix if you want to test it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants