-
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
fix(lambda): SingletonFunction.grantInvoke()
API fails with error 'No child with id'
#8296
Conversation
…No child with id' Updates to the Grant API[1] introduced the need to return the statement that was added as a result of the grant operation. A corresponding change[2] was applied to lambda module's `FunctionBase` class with the intention to apply this across all constructs that are variants of `Function`. However, the `SingletonFunction` construct behaves differently in how it modifies the construct tree. Specifically, it contains no child node but instead manipulates a node that is a direct child of the `Stack` node. For this reason, `this.node.findChild()` API does not return the expected underlying node. The fix here is to allow such special inheritors of `FunctionBase` to override where the child node is to be found, via an internal method called `_functionNode()`. [1]: 1819a6b [2]: 1819a6b#diff-73cb0d8933b87960893373bd263924e2
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…No child with id' (#8296) Updates to the Grant API[1] introduced the need to return the statement that was added as a result of the grant operation. A corresponding change[2] was applied to lambda module's `FunctionBase` class with the intention to apply this across all constructs that are variants of `Function`. However, the `SingletonFunction` construct behaves differently in how it modifies the construct tree. Specifically, it contains no child node but instead manipulates a node that is a direct child of the `Stack` node. For this reason, `this.node.findChild()` API does not return the expected underlying node. The fix here is to allow such special inheritors of `FunctionBase` to override where the child node is to be found, via an internal method called `_functionNode()`. fixes #8240 [1]: 1819a6b [2]: 1819a6b#diff-73cb0d8933b87960893373bd263924e2 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Updates to the Grant API1 introduced the need to return the statement
that was added as a result of the grant operation.
A corresponding change2 was applied to lambda module's
FunctionBase
class with the intention to apply this across all constructs that are
variants of
Function
.However, the
SingletonFunction
construct behaves differently in how itmodifies the construct tree. Specifically, it contains no child node but
instead manipulates a node that is a direct child of the
Stack
node.For this reason,
this.node.findChild()
API does not return theexpected underlying node.
The fix here is to allow such special inheritors of
FunctionBase
tooverride where the child node is to be found, via an internal method
called
_functionNode()
.fixes #8240
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license