chore: introduce promiseall-no-unbounded-parallelism linter rule#31592
chore: introduce promiseall-no-unbounded-parallelism linter rule#31592mergify[bot] merged 21 commits intomainfrom
promiseall-no-unbounded-parallelism linter rule#31592Conversation
0285df4 to
50a07c9
Compare
Since JavaScript is single-threaded, `Promise.all()` will only ever be used for I/O-bound tasks. However, I/O-parallelism isn't free either. Every async I/O-performing task launched will consume some FDs, and their amount is limited. If the amount of promises launched is a function of the input the program runs on, the system FDs might be exhausted. Some concurrency limit must be introduced. This linter rule exists to remind the programmer of that fact. It triggers on every `Promise.all()` invocation and cannot be resolved; the only solution is to think about it, and then silence this rule as proof that you thought about it.
50a07c9 to
a04c4c3
Compare
aws-cdk-automation
left a comment
There was a problem hiding this comment.
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.
…s-cdk into huijbers/no-unbounded-parallelism
|
➡️ PR build request submitted to A maintainer must now check the pipeline and add the |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
…s-cdk into huijbers/no-unbounded-parallelism
|
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). |
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. |
Since JavaScript is single-threaded,
Promise.all()will only ever be used for I/O-bound tasks. However, I/O-parallelism isn't free either. Every async I/O-performing task launched will consume some FDs, and their amount is limited. If the amount of promises launched is a function of the input the program runs on, the system FDs might be exhausted. Some concurrency limit must be introduced.This linter rule exists to remind the programmer of that fact. It triggers on every
Promise.all()invocation and cannot be resolved; the only solution is to think about it, and then silence this rule as proof that you thought about it.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license