-
Notifications
You must be signed in to change notification settings - Fork 404
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
Update validation.js (and comments) #726
Conversation
What is the problem that we're trying to solve here? |
@KrishnaIyer asked me to take over that PR and to update the comments so. |
Whoops that mention was an accident |
What is the problem this pull request is trying to solve? |
Running the validation very often results in an |
Do you encounter this yourself? Are there reports from users? |
I encounter it everytime i run it, and users also often do. |
Many users seem to be encountering this issue. I believe the following code could provide a temporary solution, though it may slow down the process. It still occasionally encounters an Additionally, it's important to note that |
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.
If the issue is that too many child processes run at the same time, why not run them sequentially instead? What is the point of parallelism if they're scheduled 1 second apart?
validatePayloadCodecs()
is awaited. So instead of pushing promises to an array and awaiting them, just await every run.
So i decided to at least give it a shot and run the feedback through ChatGPT and it seems it runs really well now. It's now running through it sequentially and it's not giving me any errors. Hope this is what we're looking for. @Jaime-Trinidad please take a look as well. |
bin/validate.js
Outdated
for (let index = 0; index < runs.length; index++) { | ||
const r = runs[index]; | ||
await new Promise((resolve, reject) => { | ||
setTimeout(async () => { |
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.
You can remove this
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've made a change that should hopefully be what your intention is.
Summary
Picking up #633 to fix the comments in response to @KrishnaIyer