mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
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:
committed by
Alex Vandiver
parent
20fc1f651a
commit
868180a25d
@@ -219,7 +219,15 @@ elif args.from_git:
|
||||
# update-prod-static with the Git upgrade process. But it'll fail
|
||||
# safely; this seems like a worthwhile tradeoff to minimize downtime.
|
||||
logging.info("Building static assets...")
|
||||
subprocess.check_call(["./tools/update-prod-static"], preexec_fn=su_to_zulip)
|
||||
try:
|
||||
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...")
|
||||
subprocess.check_call(["./tools/cache-zulip-git-version"], preexec_fn=su_to_zulip)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user