-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Inconsistent behavior across AWS constructs #31080
Comments
Needs input from team to review findings in comment #31059 (comment), reevaluate the design and advise if we could get away with memoizing the result in |
I think this is fair to call it a bug. Comparing with other grant method in the I have a unit test and a code change that I used to validate the analysis. So I will re-use that to open a PR. |
UpdateI tried to add an integration test to validate that the example provided could be successfully executed by CloudFormation, but it seems that this cannot work. My understanding is that we should not use
|
I opened another issue, #31059, describing a situation where the grantInvokeUrl method for Lambda functions raises an exception during synthesis, in a way that is inconsistent with other grant methods (of other constructs, and even of other grant methods of Lambda functions). This was closed, so I can't do anything there, and I believe closing it was a mistake. The person who closed the issue stated that there are source-code comments related to some decisions made by the developers. With the implication that this means it is not a bug. However, they did not provide any evidence that the developers were aware that their decisions would lead to inconsistent behavior across constructs. This inconsistency should be considered a bug, and I believe should be considered an issue even if the developers were aware of it.
AWS documentation at https://docs.aws.amazon.com/cdk/v2/guide/constructs.html states:
Behaviors of AWS provided constructs should be consistent across all resource. It even mentions grant methods as an example. Thus any decision that leads to significant inconsistency is a bad decision.
The text was updated successfully, but these errors were encountered: