mirror of https://github.com/zulip/zulip.git
upgrade-zulip-from-git: Improve webpack failure error handling.
We've had a number of unhappy reports of upgrades failing due to webpack requiring too much memory. While the previous commit will likely fix this issue for everyone, it's worth improving the error message for failures here. We avoid doing the stop+retry ourselves, because that could cause an outage in a production system if webpack fails for another reason. Fixes #20105.
This commit is contained in:
parent
72b381d749
commit
9aa2e0ad45
|
@ -215,7 +215,15 @@ elif args.from_git:
|
||||||
# update-prod-static with the Git upgrade process. But it'll fail
|
# update-prod-static with the Git upgrade process. But it'll fail
|
||||||
# safely; this seems like a worthwhile tradeoff to minimize downtime.
|
# safely; this seems like a worthwhile tradeoff to minimize downtime.
|
||||||
logging.info("Building static assets...")
|
logging.info("Building static assets...")
|
||||||
|
try:
|
||||||
subprocess.check_call(["./tools/update-prod-static"], preexec_fn=su_to_zulip)
|
subprocess.check_call(["./tools/update-prod-static"], preexec_fn=su_to_zulip)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
logging.error("Failed to build static assets.")
|
||||||
|
if IS_SERVER_UP:
|
||||||
|
logging.error("Usually the cause is insufficient free RAM to run webpack.")
|
||||||
|
logging.error("Try stopping the Zulip server (scripts/stop-server) and trying again.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
logging.info("Caching Zulip Git version...")
|
logging.info("Caching Zulip Git version...")
|
||||||
subprocess.check_call(["./tools/cache-zulip-git-version"], preexec_fn=su_to_zulip)
|
subprocess.check_call(["./tools/cache-zulip-git-version"], preexec_fn=su_to_zulip)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue