-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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(v2): env variable TERSER_PARALLEL to customize TerserPlugin.parallel #3497
Conversation
Do not run Terser in parallel when using CircleCI or similar CI environments to avoid "Error: Call retries were exceeded" errors. For more information see https://github.com/webpack-contrib/terser-webpack-plugin#parallel `CI=true` is true for: - https://docs.gitlab.com/ee/ci/variables/#debug-logging - https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables - https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables - https://docs.travis-ci.com/user/environment-variables/
If this could make it into the next release, that would be great as this is blocking all of our documentation builds (and therefore releases) for e.g. ORY Hydra which has a patch in pipeline for fixing a CVE! Thank you! |
Deploy preview for docusaurus-2 ready! Built without sensitive environment variables with commit e42f632 |
Hi, I find this funny because Docusaurus is used on 2 sites:
Afaik this option does not affect all CI environments. I'm willing to provide you an option to disable it for your site only, without changing behavior for other sites that work fine with parallel: true, that seems to work fine with other CI options anyway. So I'd rather have you run a command like If we don't do this, users will report build perf regressions after upgrading. Ideally, I'd even prefer a dedicated build option, like We can get this released in next release if PR is ready soon, likely tomorrow (cc @lex111 ). In the meantime you can use patch-package to apply the change locally |
Is this a problem that affects ALL circle CI sites? A less flexible but easier solution could also be to use something like:
|
Sounds good - should I update the PR accordingly? |
Yes, if the PR is good I'll merge it for next release (likely tomorrow so don't wait :p) |
Sorry for the many commits - you can squash merge it once it passes :) |
Ok, sorry for the many commits. The changes were so minimal I thought I could do them in the web editor but well it turned out my guessing game with eslint/prettier didn't work out so well. Checked it out locally so everything should be good to go IMO |
Thanks, LGTM. Let's keep it this way for now, and add doc and a cli option later if the need for such option becomes important for more users. We don't care about commits as all PRs are squash merged anyway ;) |
Nice, thanks for the quick turnaround! |
Yup, it is a bit funny. |
No pressure, just checking in if the release is to be expected this week - otherwise I'll probably fixup our CI pipeline to patch the package in the meanwhile! |
Hi, sorry we delayed the release but it should be in the next hours ;) |
Motivation
Do not run Terser in parallel when using CircleCI or similar CI environments
to avoid "Error: Call retries were exceeded" errors. For more information
see https://github.com/webpack-contrib/terser-webpack-plugin#parallel
CI=true
is true for:Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
None - hard to test because certain conditions need to be met and because it's not possible to replicate those easily without a published package.