23-Nov-2026 — refuse to deploy from an out-of-date copy of the environments config #424
Release notes
- Deploys, health checks and command-line tools now stop with a clear message if they read the environments config from an old copy of the staging database, for example one left behind on a previous cluster after a move. Before, they carried on and gave sites whose database had since moved a database address that no longer exists, which took those sites offline.
Technical detail
currentEnvironmentsConfig checks that the config's own database is listed on the cluster it was read from (staleEnvironmentsConfigReason), and throws StaleEnvironmentsConfigError if it isn't. Both read paths use it: loadFromDatabase and the server/.env staging fallback (environmentsConfigFromStagingDocument). The error is rethrown rather than swallowed on both, so it stops deploy-to-environments before any site is touched, and the message names the cluster MONGODB_URI / ADMIN_MONGODB_URI should point at.
- Specs cover a current config, a stale copy, databases the config does not list, and the staging fallback accepting a current copy, refusing a stale one and returning nothing when empty.