Skip to content
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): use of currentVersion fails deployment after upgrade #26777

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Aug 16, 2023

Between version 2.87.0 and version 2.88.0, the hash calculation used to make sure that fn.currentVersion is automatically updated when a new version of the Lambda Function is deployed changed.

This causes a creation of a new Version upon upgrading CDK, but that new Version creation will fail because the underlying Function hasn't changed.

The change was due to property ordering used in calculating a unique hash for the Function configuration.

This change restores the property ordering to the pre-2.88.0 behavior.

Fixes #26739.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Between version `2.87.0` and version `2.88.0`, the hash calculation
used to make sure that `fn.currentVersion` is automatically updated
when a new version of the Lambda Function is deployed changed.

This causes a creation of a new Version upon upgrading CDK, but that new
Version creation will fail because the underlying Function hasn't
changed.

The change was due to property ordering used in calculating a
unique hash for the Function configuration.

This change restores the property ordering to the pre-2.88.0 behavior.

Fixes #26739.
@rix0rrr rix0rrr requested a review from a team August 16, 2023 15:26
@github-actions github-actions bot added bug This issue is a bug. effort/medium Medium work item – several days of effort p0 labels Aug 16, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team August 16, 2023 15:26
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 16, 2023
@rix0rrr rix0rrr added pr-linter/exempt-integ-test The PR linter will not require integ test changes and removed contribution/core This is a PR that came from AWS. labels Aug 16, 2023
@rix0rrr rix0rrr changed the title fix(lambda): use of currentVersion fails on upgrade fix(lambda): use of currentVersion fails deployment after upgrade Aug 16, 2023
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 16, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 183ba06
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 0446e4a into main Aug 17, 2023
@mergify mergify bot deleted the huijbers/function-stability branch August 17, 2023 09:11
@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. effort/medium Medium work item – several days of effort p0 pr-linter/exempt-integ-test The PR linter will not require integ test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-lambda: Logical id of current version changes when upgrading form v2.87.0 to v2.88.0
3 participants