chore(lambda): resolve unable to reference AuthType from FunctionUrl#31590
chore(lambda): resolve unable to reference AuthType from FunctionUrl#31590mergify[bot] merged 7 commits intoaws:mainfrom
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.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
badmintoncryer
left a comment
There was a problem hiding this comment.
Thank you for your PR! I've added only a small comment.
| if (fnUrl.authType === lambda.FunctionUrlAuthType.NONE) { | ||
| ; // ok | ||
| } else { | ||
| throw new Error('AuthType must be NONE'); | ||
| } |
There was a problem hiding this comment.
I think it is better to use jest expect().
| if (fnUrl.authType === lambda.FunctionUrlAuthType.NONE) { | |
| ; // ok | |
| } else { | |
| throw new Error('AuthType must be NONE'); | |
| } | |
| expect(fnUrl.authType).toBe(lambda.FunctionUrlAuthType.NONE); |
There was a problem hiding this comment.
Agreed. Also, I believe this PR should be a fix not a chore
There was a problem hiding this comment.
Since there is no change in the resource being created, I don't think this fix needs an integ test, but if the maintainer thinks it does, I'll change it to a fix.
godwingrs22
left a comment
There was a problem hiding this comment.
Thanks @watany-dev for the contribution. Overall LGTM.
Just to make sure this change doesn't break anything, could you please rerun the existing integ test and try to deploy the stack manually and make sure the template is deploying successfully. Also validate if there is any change in the snapshot required. I hope it doesn't.
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.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
I reran the integration test and confirmed it was successful. Since the test contents haven't changed, I reverted the fix back to chore. |
There was a problem hiding this comment.
Not sure why the difference in this feature_flag file is shown here. Could we remove this as i hope it is not related to this change?
Please add a comment to request for exemption of integ test with justification. |
Thanks for confirming. Also please update in the |
|
@godwingrs22 |
godwingrs22
left a comment
There was a problem hiding this comment.
Thanks @watany-dev for the contribution.
|
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 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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Reason for this change
I will resolve this issue: #31339 (comment). In the current FunctionURL implementation, there is no way to access AuthType, and therefore, when writing logic that depends on AuthType, there is no method to reference it.
Description of changes
I will fix the construct to allow access to functionurl.AuthType
Description of how you validated changes
adding unittest and integ-test re-run.
Reason for Exemption:
The fix introduces no changes to the resources being created.
Clarification Request:
This fix only makes the internal property authType of the L2 Construct publicly accessible, and does not introduce any differences in the created resources.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license