Skip to content

[6.x] Fix Outpost rate limiting and tests - #15114

Merged
jasonvarga merged 2 commits into
6.xfrom
outpost-test-requests
Aug 4, 2026
Merged

[6.x] Fix Outpost rate limiting and tests#15114
jasonvarga merged 2 commits into
6.xfrom
outpost-test-requests

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Aug 4, 2026

Copy link
Copy Markdown
Member

This pull request fixes an issue where real requests would be sent to the Outpost when running an addon's test suite when testing Control Panel URLs.

This PR fixes it by configuring a fake cache store, like we do in our own tests.

This PR also fixes an issue where the CP could throw ErrorException: Undefined array key 0 when the Outpost rate limits a site. This was happening because cacheAndReturnRateLimitResponse() assumed the response always includes a Retry-After header, which isn't guaranteed. I've fixed it by falling back to five minutes when the header is missing or doesn't contain a number of seconds, matching the behaviour for other errors.

duncanmcclean and others added 2 commits August 4, 2026 12:24
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jasonvarga jasonvarga changed the title [6.x] Avoid sending Outpost requests in addon test suites [6.x] Fix Outpost rate limiting and tests Aug 4, 2026
@jasonvarga
jasonvarga merged commit 489dc9f into 6.x Aug 4, 2026
25 checks passed
@jasonvarga
jasonvarga deleted the outpost-test-requests branch August 4, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants