Page MenuHomePhabricator

Page.main_authors() method gives no results for months
Open, MediumPublicBUG REPORT

Description

Steps to replicate the issue:

Try a sample similar to the documentation of Page.main_authors() method but take a page which is not already cached upstream, for example

>>> import pywikibot
>>> pywikibot.config.max_retries = 3
>>> site = pywikibot.Site('wikipedia:als')
>>> page = pywikibot.Page(site, 'Python (Programmiersprache)')
>>> auth = page.main_authors(onlynew=False)
WARNING: WikiHistory timeout.
Waiting 5.0 seconds before retrying.
WARNING: WikiHistory timeout.
Waiting 10.0 seconds before retrying.
WARNING: WikiHistory timeout.
Waiting 20.0 seconds before retrying.
Traceback (most recent call last):
  File "<pyshell#20>", line 1, in <module>
    auth = page.main_authors(onlynew=False)
  File "D:\pwb\GIT\core\pywikibot\page\_toolforge.py", line 108, in main_authors
    raise pywikibot.exceptions.TimeoutError(
pywikibot.exceptions.TimeoutError: Maximum retries attempted without success.

What happens?:
The method retries to retrieve the data but fails with a timeout. The remote url is something like

https://wikihistory.toolforge.org//wiki/getauthors.php?page_id=6995757&wiki=dewiki&onlynew=0

but the response is like

window.setTimeout("importScriptURI('//wikihistory.toolforge.org//wiki/getauthors.php?page_id=6995757&wiki=dewiki&onlynew=1&c=31&x=' + (new Date()).getTime())", 60000);

The problem might be that no jobs are running upstream but the queues are increasing:
https://wikihistory.toolforge.org/admin.php

Seems this is due to T320157: Grid engine was shut down and wh was not migrated to k8s.

What could be done here?:

Event Timeline

Xqt triaged this task as Medium priority.May 28 2024, 6:25 PM
Xqt moved this task from Backlog to Upstream issues on the Pywikibot board.
Xqt removed a project: Pywikibot-tests.

Change #1036734 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [cleanup] deactivate wait cycle for Page.main_authors()

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

Change #1036734 merged by jenkins-bot:

[pywikibot/core@master] [cleanup] deactivate wait cycle for Page.main_authors()

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

Change #1037928 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [fix] re-implement Page.main_authors() using xtools

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

Change #1037928 merged by jenkins-bot:

[pywikibot/core@master] [fix] re-implement Page.main_authors() using xtools

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

WH works again. Maybe take if for the remaining sites which are not supported by xtools