-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(events-targets): add LogGroupTargetInput.fromObjectV2() method #33720
fix(events-targets): add LogGroupTargetInput.fromObjectV2() method #33720
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.
(This review is outdated)
✅ 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:
|
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.
(This review is outdated)
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
(This review is outdated)
✅ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be LogGroupTargetInput.fromObjectV2()
?
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.
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 aRuleTargetInput
instead 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
RuleTargetInput
andLogGroupTargetInput
are 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