-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lambda): make the Version hash calculation stable (#12364)
In a recent CloudFormation specification update, the `Handler` and `Runtime` properties of the `AWS::Lambda::Function` resource were made optional. This resulted in the hash calculation of the current Version to change, as it uses the stringified output of the resource JSON, and our L1 code generation sorts properties alphabetically, but the required ones always first - the resulting order change of the keys resulted in a different hash. The quick fix for that was to amend the specification to keep those two properties required, but of course that has an adverse effect on our L1 usability. Make the hash calculation stable with regards to optional properties by sorting the historically required ones first. This is future-proof, as there will never be more required properties added to the Function resource (as that would be a backwards-incompatible change). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
6 changed files
with
50 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
packages/@aws-cdk/cfnspec/spec-source/720_Lambda_handler_runtime_patch.json
This file was deleted.
Oops, something went wrong.