fix(lambda): version.fromVersionArn creates invalid Version object#29820
Conversation
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. 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.
|
Exemption Request - unit tests added |
paulhcsun
left a comment
There was a problem hiding this comment.
Left a couple comments
Co-authored-by: paulhcsun <47882901+paulhcsun@users.noreply.github.com>
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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 main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
I reviewed the code and I don't think it works when the function arn is an unresolved token (i.e. passed as a parameter to the CloudFormation stack). See my comment and suggestions here |
|
I think this change is backwards incompatible - it broke our stack. Previously, if you passed a function arn with a version, the |
|
Sorry to hear the change caused an outage. My issue still isn't fixed with the change (see also my comment above, in which I also suggested not to change Function.fromFunctionArn, but instead fix Version.fromVersionArn). This still generates an invalid stack: |
…object" (#30003) ### Issue # (if applicable) Revert #29820 Closes #30002 ### Reason for this change ### Description of changes ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…object" (#30003) ### Issue # (if applicable) Revert #29820 Closes #30002 ### Reason for this change ### Description of changes ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Issue # (if applicable)
Closes #29813
Reason for this change
improve the fromFunctionArn() to better handle the input ARN
Description of changes
fromFunctionArn() does not handle the ARN correctly if the input ARN has trailing version or alias.
Description of how you validated changes
See unit tests
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license