fix(events-targets): add LogGroupTargetInput.fromObjectV2() method#33720
fix(events-targets): add LogGroupTargetInput.fromObjectV2() method#33720mergify[bot] merged 12 commits intoaws:mainfrom
Conversation
✅ 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 #33720 +/- ##
=======================================
Coverage 82.37% 82.37%
=======================================
Files 120 120
Lines 6933 6933
Branches 1169 1169
=======================================
Hits 5711 5711
Misses 1119 1119
Partials 103 103
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
Just a general question, following the conventional approach, have you considered making |
| * matched event. | ||
| */ | ||
| public static fromObjectV2(options?: LogGroupTargetInputOptions): LogGroupTargetInput { | ||
| return RuleTargetInput.fromObjectV2({ |
There was a problem hiding this comment.
should this be LogGroupTargetInput.fromObjectV2()?
There was a problem hiding this comment.
Not necessarily but I don't think I need the duplicate V2 method in RuleTargetInput. I've updated this method in the latest commit.
|
Thanks for review @5d. I'm not able to change the type of |
|
@merigyfio update |
|
@Mergifyio update |
✅ Branch has been successfully updated |
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
The
LogGroupTargetInput.fromObject()function returns aRuleTargetInputinstead of aLogGroupTargetInput. It can therefore not be passed into the following field:Because the types don't match.
This is a bug that hasn't shown up in TypeScript before because according to TypeScript's structural typing rules, the types
RuleTargetInputandLogGroupTargetInputare compatible, but according to Java's nominal typing rules they are not.Description of changes
Deprecated
LogGroupTargetInput.fromObject()and createdLogGroupTargetInput.fromObjectV2()which returns the correct type ofLogGroupTargetInput.Description of how you validated changes
integ test
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license