Page MenuHomePhabricator

pywikibot api paraminfo should to recover from defective API modules
Closed, ResolvedPublic

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 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.

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

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.

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 Medium priority.Jun 3 2015, 10:34 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

Xqt claimed this task.
Xqt subscribed.

This task is not clear to me and the description is not reproducable. So closing it.