Page MenuHomePhabricator

Better guard against exceptions from module classes
Closed, ResolvedPublic


When modules are loaded over load.php, RL ensures a valid response is made no matter what.

  1. Exceptions thrown by modules are caught, logged, and displayed in a JS comment on top of the response.
  2. RL gracefully continues to build the response for any other modules in the same request.
  3. The response will end with a mw.loader.state() call to inform mw.loader of any modules that failed to load.

However we don't do the same in the startup module. If the version computation fails with an exception, the entire startup module is blasted away. Only point 1 above helps us ensure the response shows the error in question, but there is no graceful recovery, no executable code is delivered at all (no mw.config, no modules registered, no sources registered, no base modules loaded, no startup.js).

Event Timeline

Krinkle created this task.Dec 3 2016, 3:33 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 3 2016, 3:33 AM

Change 325071 had a related patch set uploaded (by Krinkle):
[WIP] resourceloader: Don't let exception from module break startup

Krinkle triaged this task as Medium priority.Dec 6 2016, 4:15 PM
Krinkle moved this task from Inbox to Doing on the Performance-Team board.

Change 325071 merged by jenkins-bot:
resourceloader: Don't let module exception break startup

Krinkle closed this task as Resolved.Dec 16 2016, 4:14 AM
Krinkle removed a project: Patch-For-Review.