Skip to content

test: raise user list query ceiling for core's asset revision header - #64

Merged
imorland merged 1 commit into
2.xfrom
im/fix-query-count-ceiling
Oct 20, 2026
Merged

imorland merged 1 commit into
2.xfrom
im/fix-query-count-ceiling

Conversation

@imorland

Copy link
Copy Markdown
Owner

Changes proposed in this pull request:

Core 2.0.1 added X-Flarum-Assets-Revision to every API response, which costs one asset_revisions read per request. That takes ListUsersQueryCountTest from 11 to 12 queries and turns CI red on every PR. The ceiling and budget now include it; the count is still constant regardless of list size.

Reviewers should focus on:

Screenshot

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Frontend changes: tests are green (run yarn test in js/).
  • Frontend changes: tests have been added, or are not appropriate here.
  • Backend changes: tests are green (run composer test).
  • Backend changes: tests have been added, or are not appropriate here.
  • Where applicable, changes are suitable for all supported database drivers (MySQL, MariaDB, PostgreSQL, SQLite).
  • Core developer confirmed locally this works as intended.
  • The description above is written by me and describes what this pull request actually does.

Required changes:

  • Related documentation PR: (Remove if irrelevant)

Core 2.0.1 stamps every API response with X-Flarum-Assets-Revision, which reads asset_revisions once per request.
@imorland
imorland marked this pull request as ready for review October 20, 2026 09:34
@imorland
imorland merged commit ccac913 into 2.x Oct 20, 2026
22 checks passed
@imorland
imorland deleted the im/fix-query-count-ceiling branch October 20, 2026 09:34
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.

1 participant