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
Add functionResponseTypes sqs #10265
Add functionResponseTypes sqs #10265
Conversation
…test and readme updates
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.
@nicoeft great thanks for fast action on that! In general it looks very good. I have just few suggestions
@@ -22,6 +22,7 @@ class AwsCompileSQSEvents { | |||
batchSize: { type: 'integer', minimum: 1, maximum: 10000 }, | |||
enabled: { type: 'boolean' }, | |||
maximumBatchingWindow: { type: 'integer', minimum: 0, maximum: 300 }, | |||
functionResponseTypes: { enum: ['ReportBatchItemFailures'] }, |
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.
It should be functionResponseType
(as in case of stream
event)
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.
Perfect thanks
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 just checked the CloudFormation docs and it's actually plural + an array there: https://docs.aws.amazon.com/fr_fr/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionresponsetypes
Since all (most?) properties in Serverless Framework are 1:1 mapping with CloudFormation, we should probably reflect that here too?
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.
AWS quite often uses plural names while supporting only singular input (in form of array with single item)
In Framework, in most cases, we work then with singular names. Here we accept a string, and not an array of strings, hence singular form. Also, it reflects 1:1 how we handle this property in other stream
events:
functionResponseType: { enum: ['ReportBatchItemFailures'] }, |
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.
OK that sounds good to me, as long as we use the singular form (which seems to be the case here).
That way if we ever need to support the plural form we can.
Codecov Report
@@ Coverage Diff @@
## master #10265 +/- ##
=======================================
Coverage 85.39% 85.39%
=======================================
Files 339 339
Lines 13840 13842 +2
=======================================
+ Hits 11819 11821 +2
Misses 2021 2021
Continue to review full report at Codecov.
|
Co-authored-by: Matthieu Napoli <matthieu@mnapoli.fr>
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 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.
Adding approval on the feature design + documentation part, I'll let others review the implementation.
Ah @medikoo all good for me ^^ |
Great, thank you guys! |
Added functionResponseTypes property support to SQS event source mapping so 'ReportBatchItemFailures' can be set.