-
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
fix(scheduler-alpha): scheduler input always get transformed to string with extra double quotes #31894
fix(scheduler-alpha): scheduler input always get transformed to string with extra double quotes #31894
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.
7c611ac
to
01b387a
Compare
01b387a
to
fb485c7
Compare
d55f6c2
to
475fd3f
Compare
475fd3f
to
5b81a3e
Compare
Schedule
role@@ -41,7 +41,7 @@ export abstract class ScheduleTargetInput { | |||
} | |||
|
|||
class FieldAwareEventInput extends ScheduleTargetInput { | |||
constructor(private readonly input: any) { | |||
constructor(private readonly input: any, private readonly toJsonString: boolean) { |
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.
There is probably a better implementation approach but since this is only used internal/private in the class, I will fix the behaviour for now, then improve the design for easier readability and maintainability in subsequent PRs.
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.
I think its fine honestly
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.
I see a similar class in aws-events
where the second parameter is the inputType and the bind method handles the input accordingly. Could we do something similar here?
@@ -41,7 +41,7 @@ export abstract class ScheduleTargetInput { | |||
} | |||
|
|||
class FieldAwareEventInput extends ScheduleTargetInput { | |||
constructor(private readonly input: any) { | |||
constructor(private readonly input: any, private readonly toJsonString: boolean) { |
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.
I think its fine honestly
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). |
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). |
@@ -41,7 +41,7 @@ export abstract class ScheduleTargetInput { | |||
} | |||
|
|||
class FieldAwareEventInput extends ScheduleTargetInput { | |||
constructor(private readonly input: any) { | |||
constructor(private readonly input: any, private readonly toJsonString: boolean) { |
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.
I see a similar class in aws-events
where the second parameter is the inputType and the bind method handles the input accordingly. Could we do something similar here?
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)
Tracking #31785.
Reason for this change
When using
ScheduleTargetInput.fromText("some-string")
, the string is always wrapped with an extra double quotes in the final template:Customers cannot get rid of the extra escaped double quotes other than using escape hatches.
Description of changes
Skip converting the text to JSON string, which is the reason causing the extra double quotes.
Description of how you validated changes
Unit test and integ test.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
BREAKING CHANGE: Got rid of extra double quotes on Schedule input which blocks customer intention of using no double quotes in the input text