HomePhabricator

When multiple web hosts are in service, don't require setup warnings to be…

Description

When multiple web hosts are in service, don't require setup warnings to be dismissed on each one

Summary:
Fixes T10876. Currently, we can end up with a setup warning banner sticking on each web device, since the state is stored in local cache.

Instead:

  • When we actually run the setup checks, save the current state in the database.
  • Before we show a cached banner, make sure the database still says the checks are a problem.

This could lead to some inconsistencies if setup checks legitimately pass on some hosts but not on others. For example, if you have git installed on one machine but not on another, we may raise a setup warning ("No Git Binary!") about it on one host only.

For now, assume users have their operational environments in some sort of reasonable shape and can install the same stuff everywhere. In the future, we could split the issues into "global" and "per-host" issues if we run into problems with this.

Test Plan:
This is somewhat tricky to test locally since you really need multiple webservers to test it properly, but I:

  • Created some setup issues, saw banner.
  • Ignored/cleared them, saw banner go away.
  • Verified database cache writes were occurring properly.

Then I sort of faked it like this:

  • Created a setup issue.
  • Manually set the database cache value to [] ("no issues").
  • Reloaded page.
  • No more banner.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10876

Differential Revision: https://secure.phabricator.com/D15802