Repository navigation
fix(lambda): calculateLayersHash includes all stack layers - #36818
Abhinandansinha01 wants to merge 2 commits into
Conversation
Previously, calculateFunctionHash was including all layers from the stack (fn._layers) in the hash calculation, even if they were not attached to the function. This caused unrelated layer changes to trigger function updates. This change filters fn._layers to only include those present in the function's CloudFormation properties. Signed-off-by: Abhinandan Sinha <[email protected]>
a23e0d7 to
89dd99d
Compare
There was a problem hiding this comment.
The pull request linter fails with the following errors:
❌ Fixes must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.
|
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing To prevent automatic closure:
This PR will automatically close in 14 days if no action is taken. |
|
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
|
Comments on closed issues and PRs are hard for our team to see. |
Description
Fixes #36713
When calculateFunctionHash computes the hash for a function, it currently includes the hash of all layers in the stack (fn._layers), regardless of whether they are attached to the function. This causes unnecessary function updates when unrelated layers in the same stack are modified.
This PR modifies the logic to filter fn._layers and only include those that are actually present in the function's CloudFormation properties (properties.Layers).
Validation