Page MenuHomePhabricator

Use the CheckUserLookupUtils service in Special:CheckUser pager classes
Closed, ResolvedPublic3 Estimated Story Points

Description

The CheckUserLookupUtils service was added in T360453, but not made use of in Special:CheckUser. This task is aimed at using this service over the existing static methods in the pager classes used by Special:CheckUser.

To do this, some of the existing unit tests that test that the query info methods need to be converted to integration tests. While the unit tests are faster, they were written in a fairly brittle way and writing them as an integration test will make the test more resilient.

Acceptance criteria
  • The CheckUserLookupUtils service should be used in AbstractCheckUserPager and it's subclasses.

QA Results - Local

Event Timeline

Change 1013094 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Integration test the query info methods of the CheckUser pagers

https://gerrit.wikimedia.org/r/1013094

Change 1013303 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Remove CheckUserGetIPsPagerTest::testGetCountForIPActionsPerTable

https://gerrit.wikimedia.org/r/1013303

Change 1013306 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Delete AbstractCheckUserPager::getQueryInfo unit tests

https://gerrit.wikimedia.org/r/1013306

Change 1013313 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Replace AbstractCheckUserPager::getIndexName with CheckUserLookupUtils

https://gerrit.wikimedia.org/r/1013313

Change #1013330 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Replace ::getIpConds and ::isValidRange with CheckUserLookupUtils

https://gerrit.wikimedia.org/r/1013330

Dreamy_Jazz set the point value for this task to 3.

Change #1013094 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Integration test the query info methods of the CheckUser pagers

https://gerrit.wikimedia.org/r/1013094

Change #1013303 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Remove CheckUserGetIPsPagerTest::testGetCountForIPActionsPerTable

https://gerrit.wikimedia.org/r/1013303

Change #1013306 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Delete AbstractCheckUserPager::getQueryInfo unit tests

https://gerrit.wikimedia.org/r/1013306

Change #1013313 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Replace AbstractCheckUserPager::getIndexName with CheckUserLookupUtils

https://gerrit.wikimedia.org/r/1013313

Change #1013330 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Replace ::getIpConds and ::isValidRange with CheckUserLookupUtils

https://gerrit.wikimedia.org/r/1013330

In this ticket there should have been no change to the functionality of Special:CheckUser. As such, I would suggest verifying that no changes have been observed.

@Dreamy_Jazz I did not come across any changes in functionality as seen in some of the screenshots below. This will be moved to Done. Thanks for all your work!

Status: ✅PASS
Environment: Local: 1.42.0-alpha (2e857b0) 15:04, 25 March 2024; CheckUser: 2.5 (05418d9) 07:35, 25 March 2024
OS: macOS Sonoma 14.4
Browser: Chrome 122, Firefox 123, Safari 17.3, Edge 122
Skins. Vector 2022, Vector 2010, Minerva, Monobook, Timeless
Device: MBA M2
Emulated Device:: n/a
Test Links:
Special:Checkuser
https://en.m.wikipedia.beta.wmflabs.org/wiki/Dog#

✅AC1: https://phabricator.wikimedia.org/T360622

Get usersGet IP addressesGet actionsIP RangeTemp AcctXFFNo Rights
2024-03-25_12-06-04.png (920×3 px, 260 KB)
2024-03-25_09-13-28.png (628×3 px, 157 KB)
2024-03-25_09-13-44.png (1×3 px, 330 KB)
2024-03-25_10-37-31.png (1×2 px, 310 KB)
2024-03-25_11-06-02.png (977×3 px, 274 KB)
2024-03-25_12-14-02.png (1×3 px, 339 KB)
2024-03-25_11-48-46.png (333×3 px, 99 KB)
Vector 2022MinervaMonobookTimeless
2024-03-25_10-37-31.png (1×2 px, 310 KB)
2024-03-25_10-48-38.png (1×2 px, 370 KB)
2024-03-25_10-49-51.png (784×3 px, 314 KB)
2024-03-25_10-49-21.png (1×2 px, 390 KB)
FirefoxSafariChrome
2024-03-25_10-54-36.png (1×2 px, 462 KB)
2024-03-25_10-55-27.png (1×3 px, 605 KB)
2024-03-25_12-06-04.png (920×3 px, 260 KB)