Page MenuHomePhabricator

Add parameter to only get violations from wbcheckconstraints (days: 1)
Closed, ResolvedPublic

Description

To reduce the size of wbcheckconstraints action API responses requested by the checkConstraints gadget, we’d like to add some parameter so that only the results which the gadget will actually display are returned: warnings, violations, and bad parameters. (This would be disabled by default, otherwise it’d be a breaking change.)

Once we move towards storing the constraint check results in the database (T179849: Cache all constraint check results per-entity; for T180582: List of all constraint violations), we can also consider whether we only want to store those partial results in the database (see T179849#3762879 and T179849#3767372). This would mean that API requests without this parameter set would not benefit from the cache, so we should definitely track how many requests use the parameter, to inform our decision later.

Patch-For-Review:

Related Objects

Event Timeline

It looks like this might be required before we can start with caching. So let’s add a status parameter right now, default value *, but make the gadget only request violation, warning and bad-parameters results, and only cache those. Then, announce a breaking change that we’ll change the default from * to those three statuses, so that all requests with the default value benefit from caching.

Change 403966 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add $statuses parameter to ResultsBuilder::getResults

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

Change 403967 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add status parameter to CheckConstraints

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

Change 403966 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add $statuses parameter to ResultsBuilder::getResults

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

Change 403967 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add status parameter to CheckConstraints

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

WMDE-leszek renamed this task from Add parameter to only get violations from wbcheckconstraints to Add parameter to only get violations from wbcheckconstraints (days: 1).Jan 15 2018, 5:23 PM

Change 404322 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add status parameter to gadget’s API requests

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

Change 404322 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add status parameter to gadget’s API requests

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

Change 404326 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Fix status parameter documentation

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

Change 404326 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Fix status parameter documentation

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