-
Notifications
You must be signed in to change notification settings - Fork 260
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
Generated code does not compile if all fields are ignored #1069
Comments
@muvaf Hi! So, in the case you highlighted here, if we did an throwaway assignment of |
Yes, and that's because there is no field remained on the resource to set anyway. So, it's already bound to return an empty struct. In our case, those fields are ignored because we needed special handling of them, hence moved them to |
Hi @jaypipes, I encountered the same issue with Neptune DB Instance resource. Is there a solution/workaround you may suggest?
|
@ezgidemirel apologies for the super-late response on this :( The above is likely not the same issue. If I were to guess, the Neptune API shares a lineage with the RDS API and the shape of the DBSecurityGroups field in the Create Input and Output shapes is a different type, which is what is leading to the above problem. We solved this in the RDS controller using this block of YAML in the |
Thanks @jaypipes! I'll give it a try. |
/reopen |
Describe the bug
There are some resources with very few fields, like KMS
Alias
, and we may end up adding all of their fields to the ignore list. However, since there arefor
loops running for resources like KMS Alias where the read function returns a list, thefor
loop ends up having empty content and sinceelem
is not used, the code does not compile.An example
for
loop generated is as following:Compiler does not accept having
elem
there as unused.Steps to reproduce
Ignore all fields in KMS Alias resource and run the generator.
Expected outcome
I'd expected the code to compile.
Environment
KMS Alias.
Code Generator Commit:
cac5654b7bb64c8f754ad9af01799ef70d9541b6
The text was updated successfully, but these errors were encountered: