Page MenuHomePhabricator

Curator gets limited revision count
Open, LowPublic

Description

"As a Curator, I want to know if I've hit a limit in a revision count call, so I can know that there are 'a lot' of edits without having an exact number."

This user story comes out of the discussion around minor revision count T234941, since it's an expensive query and we want to limit the results. The intermediate count between two revisions T235666 has a similar limit.

We'd like all of the revision count endpoints to support limits in their results:

The results should be limited to 1000 for each endpoint.

Each endpoint should have an additional output property, limit, that is set to true if the real value for the count is strictly greater than the limit.

Details

Related Gerrit Patches:

Event Timeline

Change 547682 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] REST History Counts: Limit the number of edits to count

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

Change 548799 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/tools/api-testing@master] Add limit: false to the expected history count responses

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

Updated the docs with a limit of 500 for all history count types.

Updated the docs with a limit of 500 for all history count types.

I think the above says 1000.

I should have clarified: Looking at the implementation, I'm seeing a limit of 500, which appears to conflict with the task description.

eprodromou triaged this task as Medium priority.Nov 6 2019, 9:03 PM
eprodromou lowered the priority of this task from Medium to Low.

Updated the patch to set the limit to 1000.

Change 547682 merged by jenkins-bot:
[mediawiki/core@master] REST History Counts: Limit the number of edits to count

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

I should have clarified: Looking at the implementation, I'm seeing a limit of 500, which appears to conflict with the task description.

OMG we are going to have the most accurate documentation on the planet

The patch was merged. Nothing to do here, making an integration test to check that 1001 revisions are not queried doesn't seem feasible.

Updated the docs with the limit of 1000.

Change 548799 merged by jenkins-bot:
[mediawiki/tools/api-testing@master] Add limit: false to the expected history count responses

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