Page MenuHomePhabricator

Raise setup warnings immediately when failing to load configuration from the database
ClosedPublic

Authored by epriestley on Sep 6 2016, 7:59 PM.
Tags
None
Referenced Files
F13096668: D16501.diff
Thu, Apr 25, 6:13 PM
Unknown Object (File)
Wed, Apr 24, 11:10 PM
Unknown Object (File)
Sun, Apr 14, 9:25 PM
Unknown Object (File)
Thu, Apr 11, 7:49 AM
Unknown Object (File)
Mon, Apr 8, 9:27 AM
Unknown Object (File)
Sun, Apr 7, 10:48 PM
Unknown Object (File)
Thu, Apr 4, 5:46 PM
Unknown Object (File)
Mar 23 2024, 8:00 PM
Subscribers
None

Details

Summary

Ref T11589. Previously, when we failed to load database configuration we just continued anyway, in order to get to setup checks so we could raise a better error.

There was a small chance that this could lead to pages running in a broken state, where ONLY that connection failed and everything else worked. This was accidentally fixed by narrowing the exceptions we continue on in D16489.

However, this "fix" meant that users no longer got helpful setup instructions. Instead:

  • Keep throwing these exceptions: it's bad to continue if we've failed to connect to the database.
  • However, catch them and turn them into setup errors.
  • Share all the setup code so these errors and setup check errors work the same way.
Test Plan
  • Intentionally broke mysql.host and mysql.pass.
  • Loaded pages.
  • Got good setup errors.
  • Hit normal setup errors too.
  • Put everything back.
  • Swapped into cluster mode.
  • Intentionally broke cluster mode, saw failover to readonly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Raise setup warnings immediately when failing to load configuration from the database.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Sep 6 2016, 8:29 PM
This revision was automatically updated to reflect the committed changes.