Skip to content
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(appsync): set max batch size when using batch invoke #20995

Merged
merged 7 commits into from
Jul 13, 2022
Merged

feat(appsync): set max batch size when using batch invoke #20995

merged 7 commits into from
Jul 13, 2022

Conversation

cponfick
Copy link
Contributor

@cponfick cponfick commented Jul 5, 2022

closes #20467


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • Have you added the new feature to an integration test?
    • Did you use yarn integ to deploy the infrastructure and generate the snapshot (i.e. yarn integ without --dry-run)?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Jul 5, 2022

@aws-cdk-automation aws-cdk-automation requested a review from a team July 5, 2022 10:31
@github-actions github-actions bot added p2 effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 and removed p2 labels Jul 5, 2022
@@ -112,6 +118,7 @@ export class Resolver extends Construct {
requestMappingTemplate: props.requestMappingTemplate ? props.requestMappingTemplate.renderTemplate() : undefined,
responseMappingTemplate: props.responseMappingTemplate ? props.responseMappingTemplate.renderTemplate() : undefined,
cachingConfig: this.createCachingConfig(props.cachingConfig),
maxBatchSize: props.maxBatchSize,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it not be undefined if it's not specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will change it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If props.maxBatchSize isn't specified, it would be undefined with the code as is. maxBatchSize: props.maxBatchSize ? props.maxBatchSize : undefined; is redundant, unless there's something I'm missing.

Copy link
Contributor Author

@cponfick cponfick Jul 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheRealAmazonKendra
You are probably right (I am not too familiar with typescript). I think there is no drawback if it is checked. Actually, it adds some consistency, since other variables are checked as well (line 115 probs.dataSourceName).

Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra Jul 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's checked in line 115 because it's setting dataSourceName to props.dataSource.name. In this case, it would throw an error if props.dataSource is undefined.

The whole line: dataSourceName: props.dataSource ? props.dataSource.name : undefined,

That check is just redundant here, like it would be in lines 112-114.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have missed that. I will just revert it, removing the redundant call.

@cponfick cponfick requested a review from Naumel July 5, 2022 13:29
@cponfick
Copy link
Contributor Author

cponfick commented Jul 8, 2022

@TheRealAmazonKendra, am I required to add this single field to the README ? Currently, there does not exist a section for BatchInvoke. Hence, I would need to add that as well.

@TheRealAmazonKendra TheRealAmazonKendra changed the title feat(appsync): ability to set a max batch size when using batch invoke feat(appsync): set a max batch size when using batch invoke Jul 11, 2022
@TheRealAmazonKendra TheRealAmazonKendra added the pr-linter/exempt-readme The PR linter will not require README changes label Jul 11, 2022
@TheRealAmazonKendra TheRealAmazonKendra changed the title feat(appsync): set a max batch size when using batch invoke feat(appsync): set max batch size when using batch invoke Jul 11, 2022
Copy link
Contributor

@TheRealAmazonKendra TheRealAmazonKendra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@mergify
Copy link
Contributor

mergify bot commented Jul 13, 2022

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).

@mergify mergify bot merged commit 69d25a6 into aws:main Jul 13, 2022
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 9a9c7b0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Jul 13, 2022

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@aws-cdk/aws-appsync-alpha: Unable to set BatchSize for Lambda Direct Resolvers
4 participants