Page MenuHomePhabricator

pywikibot api paraminfo should to recover from defective API modules
Open, NormalPublic

Description

If loading the initialisation of ParamInfo was successful, some of the core API modules are working correctly.
If then loading a batch of modules causes a server error, the paraminfo class could retry the batch by loading paraminfo for one module at a time, and report which module fails.

Another option is to avoid loading non-core modules, or avoid loading all modules to determine prefixes.

This should make pywikibot more resilient for when defective modules deployed to a wiki, and result in quicker & better errors reported to WMF ops / release managers.

(Currently WMF test and beta wikis have such a defective module : T100775 , so fixing this quickly may be necessary in case Wikimedia dont revert / fix the problem)

Event Timeline

jayvdb created this task.May 29 2015, 11:12 AM
jayvdb raised the priority of this task from to Unbreak Now!.
jayvdb updated the task description. (Show Details)
jayvdb added projects: Pywikibot-tests, Pywikibot.
jayvdb added subscribers: greg, Unknown Object (MLST), jayvdb, Aklapper.
XZise added a subscriber: XZise.May 29 2015, 11:30 AM

The problem would be that other parts usually rely on the fact that after the fetch call all modules are now cached.

greg added a comment.May 29 2015, 3:57 PM

Given T100775 is fixed, I think there's nothing else for me here (this task is for a pywikibot-specific issue, yes?), so unusbscribing. Thanks for the heads up though.

greg removed a subscriber: greg.May 29 2015, 3:57 PM
XZise added a comment.May 29 2015, 8:17 PM

Okay if we are going to change something for this I think the most sensible way would be to have a flag in fetch() to ignore failures. And whenever a batch is executed and it's not important that all modules are cached and it “could“ skip some that it skips problematic.

XZise lowered the priority of this task from Unbreak Now! to Needs Triage.Jun 3 2015, 10:08 AM
XZise set Security to None.
jayvdb triaged this task as Normal priority.Jun 3 2015, 10:34 AM
jayvdb moved this task from Backlog to Upstream on the Pywikibot-tests board.Jun 9 2015, 6:25 AM

Change 236246 had a related patch set uploaded (by John Vandenberg):
Deprecate ParamInfo.query_modules_with_limits

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

Change 236246 merged by jenkins-bot:
Deprecate ParamInfo.query_modules_with_limits

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

Change 243060 had a related patch set uploaded (by John Vandenberg):
Deprecate ParamInfo.query_modules_with_limits

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

Change 243060 merged by jenkins-bot:
Deprecate ParamInfo.query_modules_with_limits

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