feat(cli): support hotswapping Lambda function tags#17818
feat(cli): support hotswapping Lambda function tags#17818mergify[bot] merged 5 commits intoaws:masterfrom
Conversation
|
Title does not follow the guidelines of Conventional Commits. Please adjust title before merge. |
9bb95cb to
03b8775
Compare
|
This will need at least one more revision before it's ready; hold off on review til EOD today, at least, please. |
Sound good @offbyone, let us know when you consider this ready for review! |
03b8775 to
b280bce
Compare
|
I'd call it ready for review. Despite our discussion about the asset tags in the metadata, I was unable to avoid removing that check. I believe the property checks in here are sufficient safety. |
b280bce to
09799b2
Compare
|
BTW, the build is failing with: So, you might have to revert your changes to the test setup. |
09799b2 to
8188ffe
Compare
Pull request has been modified.
826a7f6 to
cc18ae6
Compare
Implements aws#17664 For Lambda functions, identify tag changes in the CF diff, and attach tag removal / set operations for all tags that changed.
cc18ae6 to
71ef767
Compare
| */ | ||
| public readonly propertyUpdates: { [key: string]: cfn_diff.PropertyDifference<any> }; | ||
|
|
||
|
|
There was a problem hiding this comment.
Let's revert this one:
| const functionArn = await evaluateCfnTemplate.evaluateCfnExpression({ | ||
| 'Fn::Sub': 'arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:' + functionName, | ||
| }); | ||
|
|
There was a problem hiding this comment.
Let's kill this empty line (I'm actually surprised the linter didn't flag this one):
| let code: LambdaFunctionCode | void = undefined; | ||
| let tags: LambdaFunctionTags | void = undefined; |
There was a problem hiding this comment.
| let code: LambdaFunctionCode | void = undefined; | |
| let tags: LambdaFunctionTags | void = undefined; | |
| let code: LambdaFunctionCode | undefined = undefined; | |
| let tags: LambdaFunctionTags | undefined = undefined; |
| tags = { | ||
| tagUpdates, | ||
| }; |
There was a problem hiding this comment.
| tags = { | |
| tagUpdates, | |
| }; | |
| tags = { tagUpdates }; |
| readonly code: LambdaFunctionCode | void, | ||
| readonly tags: LambdaFunctionTags | void, |
There was a problem hiding this comment.
| readonly code: LambdaFunctionCode | void, | |
| readonly tags: LambdaFunctionTags | void, | |
| readonly code?: LambdaFunctionCode; | |
| readonly tags?: LambdaFunctionTags; |
| // It's really unfortunate, but Lambda allows function _names_ for code | ||
| // updates, but we need the function ARN if we're managing tags. We also | ||
| // can't assume we'll get it from the preceding code update, since there | ||
| // might not _be_ a code update. |
There was a problem hiding this comment.
No need for this comment anymore I think:
| // It's really unfortunate, but Lambda allows function _names_ for code | |
| // updates, but we need the function ARN if we're managing tags. We also | |
| // can't assume we'll get it from the preceding code update, since there | |
| // might not _be_ a code update. |
| } | ||
|
|
||
| // run all of our updates in parallel | ||
| await Promise.all(operations); |
There was a problem hiding this comment.
| await Promise.all(operations); | |
| return Promise.all(operations); |
packages/aws-cdk/lib/logging.ts
Outdated
| DEBUG = 1, | ||
| /** Extremely verbose */ | ||
| TRACE = 2 | ||
| } |
There was a problem hiding this comment.
Let's revert this move too (unless there's a good reason for it...?).
Pull request has been modified.
|
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 |
|
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). |
Fixes aws#17664 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Fixes #17664
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license