-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(cognito): add analyticsConfiguration to UserPoolClient #32862
feat(cognito): add analyticsConfiguration to UserPoolClient #32862
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32862 +/- ##
=======================================
Coverage 80.83% 80.83%
=======================================
Files 236 236
Lines 14253 14253
Branches 2490 2490
=======================================
Hits 11522 11522
Misses 2446 2446
Partials 285 285
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…-add-analytics-configuration
…-add-analytics-configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @ren-yamanashi , thank you for this contribution, could you please adjust the validation and tests as described in the comments? thank you in advance!
@@ -618,4 +667,13 @@ export class UserPoolClient extends Resource implements IUserPoolClient { | |||
throw new Error(`${name}: Must be a duration between ${min.toHumanString()} and ${max.toHumanString()} (inclusive); received ${value.toHumanString()}.`); | |||
} | |||
} | |||
|
|||
private validateAnalytics(analytics: AnalyticsConfiguration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the CloudFormation expects either ApplicationArn
or all of ApplicationId
, ExternalId
and RoleArn
to be provided. Could you please adjust the validation for this?
// resources: [pinpointApp.attrArn], | ||
// })); | ||
|
||
new UserPoolClient(stack, 'Client', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cloud you please provide more test cases for 1) providing only ApplicationArn
and using the Cognito's service role and 2) providing all of ApplicationId
, ExternalId
and RoleArn
?
Thank you comment ! I will adjust the PR content based on your comment and #32865 🙏. |
@mergify update |
✅ Branch has been successfully updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing! Left some comments, mostly nits and questions I had
...s/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.ts
Outdated
Show resolved
Hide resolved
Thanks for your review! I have fixed, so please confirm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing! Everything LGTM
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). |
This pull request has been removed from the queue for the following reason: The pull request can't be updated You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
✅ Pull request refreshed |
@mergify requeue |
This pull request has been removed from the queue for the following reason: The pull request can't be updated You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
This pull request has been removed from the queue for the following reason: The pull request #32862 has been manually updated You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
Pull request has been modified.
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. |
Issue # (if applicable)
Closes #32837
Reason for this change
UserPoolClient in Cognito did not support the
analyticsConfiguration
property.Description of changes
analytics
property to UserPoolClientProps(interface)validationAnalytics
method to UserPoolClient(Class / L2 Construct)Description of how you validated changes
Added both unit and integration tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license