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

Fix RDS Validations #2171

Merged
merged 1 commit into from
Aug 16, 2023
Merged

Conversation

JohnPreston
Copy link
Contributor

@JohnPreston JohnPreston commented Aug 14, 2023

The new dbinstance validations do not check properties types resulting in testing a string oracle against Ref for example.
A lot of the tests should be ignored as soon as the DBClusterIdentifier is set, indicating that this is going to be an instance attached to Aurora DB Cluster.

Exception caught

        File "/home/john/.cache/pypoetry/virtualenvs/ecs-composex-6XqxN9Zj-py3.9/lib/python3.9/site-packages/troposphere/validators/rds.py", line 401, in validate_dbinstance
          and "oracle" in engine                                                                          
      TypeError: argument of type 'Ref' is not iterable      

@markpeek
Copy link
Member

@tnielsen2 could you take a look at this PR and approve given your recent PR?
@JohnPreston is there a test that can be added to catch any regressions based on this change?

@JohnPreston
Copy link
Contributor Author

@tnielsen2 could you take a look at this PR and approve given your recent PR? @JohnPreston is there a test that can be added to catch any regressions based on this change?

Hey @markpeek
I will have a look and come up with something. I have my project which I created a branch for, to update troposphere version specifically, and it runs lots of tests, the only ones that failed were for RDS, hence how I found this.

I am guessing the validation test should cater for AWS HelperFn

@tnielsen2
Copy link
Contributor

This looks good to me. We don't run tests against validator logic, but the thought did cross my mind that having some in place for this would be great since there is a matrix of acceptable combinations with RDS specifically.

@JohnPreston
Copy link
Contributor Author

Once merged, could we get a patch version released please?
Right now this is just denying using any !Ref etc. for these properties.

@markpeek markpeek merged commit 73075ba into cloudtools:main Aug 16, 2023
5 checks passed
@markpeek
Copy link
Member

Published via Release 4.4.1

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

Successfully merging this pull request may close these issues.

3 participants