-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update generated IAM acceptance tests to include conditions, or omit IAM conditions from missing test detector #18215
Update generated IAM acceptance tests to include conditions, or omit IAM conditions from missing test detector #18215
Comments
See also this list: GoogleCloudPlatform/magic-modules#10757 (comment) |
We should be able to detect whether a resource supports IAM conditions at generation time using the presence / absence of
|
Weirdly we still add the |
Unfortunately the missing test detector does not run at generation time, and I don't think we have a great way to introspect whether conditions are supported. So the best option really might be to just ignore the conditions field in the missing test detector, since we know they're generated if supported. Alternatively, the "real" fix would be to not support the fields unless conditions are supported - but that would be a breaking change and a much larger one as well. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
@trodge it looks like the omission isn't working - GoogleCloudPlatform/magic-modules#12181 (comment) |
What kind of contribution is this issue about?
MMv1-based resource
Details
When new resources are added to the provider and associated IAM resources are added at the same time there are missing test detector messages like this: GoogleCloudPlatform/magic-modules#10757 (comment)
The PR author doesn't have power to update the IAM resource tests because they are generated, and the PR reviewer needs to know context about IAM resource generation.
I imagine that generated IAM resource tests don't include conditions because they aren't available for all IAM resources, which is fair enough! If that is the case it would be good to come up with a way to either stop the missing test detector flagging condition arguments in IAM resources, or enable conditions to be conditionally included in generated IAM acc tests.
References
No response
The text was updated successfully, but these errors were encountered: