Skip to content

fix: bound how long admin screens wait on remote requests - #576

Merged
lightbulbman merged 7 commits into
core-betafrom
fix/remote-request-timeouts/core
Oct 19, 2026
Merged

lightbulbman merged 7 commits into
core-betafrom
fix/remote-request-timeouts/core

Conversation

@TallblokeUK

@TallblokeUK TallblokeUK commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Towards #471.

Five outbound requests stated no limit of their own and so fell back to WordPress's default: the welcome document, three public cloud API calls, and the list of installable versions. Each is made while an admin screen renders, so a slow or unreachable service holds the screen for as long as that default allows.

Each now names its own limit, following the pattern already used for search and feedback: 3 seconds for the welcome document, and 5 seconds for the cloud and WordPress.org requests. The limits hold when a site raises the default timeout.

What this does not do

The reported symptom is an admin screen that stays stuck, and this does not by itself explain that, so the issue should stay open. Two things found while looking, neither changed here:

  • Welcome_Client fetches over the network from its constructor, and Bootstrap_Admin constructs it on every admin page load, so the fetch is on the path of every admin screen rather than the one that displays it. The result is cached for two days whether it succeeded or not, which bounds how often that is paid but also means a momentary outage hides the content for two days.
  • Version_Switch::get_available_versions() returns early on failure without caching anything, so every call during an outage makes the request again.

Verification

  • New tests assert the limit each call site sets, by capturing requests before they leave, with the default timeout raised to 30 seconds. Five of the six fail without this change, reporting the default; the sixth covers search, which already stated its own limit and passes either way.
  • Full PHPUnit suite (350 tests) and lint:php pass.

@lightbulbman
lightbulbman merged commit 4f8786a into core-beta Oct 19, 2026
18 of 19 checks passed
@lightbulbman
lightbulbman deleted the fix/remote-request-timeouts/core branch October 19, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger automated tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants