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
F14033281: D16501.id.diff
Sat, Nov 9, 5:21 PM
F14000896: D16501.id39711.diff
Fri, Oct 25, 2:09 AM
F13989456: D16501.diff
Mon, Oct 21, 8:34 PM
Unknown Object (File)
Oct 4 2024, 9:08 PM
Unknown Object (File)
Sep 30 2024, 7:45 PM
Unknown Object (File)
Sep 25 2024, 6:39 AM
Unknown Object (File)
Sep 19 2024, 3:29 PM
Unknown Object (File)
Sep 12 2024, 8:43 AM
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.