-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[api-minor] Validate the workerPort
/workerSrc
options
#17504
[api-minor] Validate the workerPort
/workerSrc
options
#17504
Conversation
Ensure that users cannot provide incorrect values when trying to set the global worker-options. This patch was prompted by occasionally seeing users manually loading the `pdf.worker.mjs`-file and then assigning it to the `workerSrc`-option, something that obviously doesn't make sense and will cause fake-workers to be used (with poor performance as a result).
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/8b3d79942554442/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/9a90b119a0ead17/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/8b3d79942554442/output.txt Total script time: 24.31 mins
Image differences available at: http://54.241.84.105:8877/8b3d79942554442/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/9a90b119a0ead17/output.txt Total script time: 37.95 mins
Image differences available at: http://54.193.163.58:8877/9a90b119a0ead17/reftest-analyzer.html#web=eq.log |
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.
LGTM. Thank you.
It might have been worth waiting for a major revision for this change as it is likely to break lots of deploys. "make sense" or not, many include/require the worker and pass that as the value, possibly due to this being one of the top hits on Google. Additionally, due to the way bundlers are used these days, it's quite unergonomic and unnatural to include part of a library by "building" (i.e. copying) it separately. For anyone dealing with this issue:
|
Ensure that users cannot provide incorrect values when trying to set the global worker-options.
This patch was prompted by occasionally seeing users manually loading the
pdf.worker.mjs
-file and then assigning it to theworkerSrc
-option, something that obviously doesn't make sense and will cause fake-workers to be used (with poor performance as a result).