Page MenuHomePhabricator

download_dump.py: `dumpdate` parameter is erroneous when using the script in Toolforge
Closed, ResolvedPublic

Description

This is a followup from https://phabricator.wikimedia.org/T183789

rafid@tools-sgebastion-07:~/pywikibot-core$ python3 pwb.py scripts/download_dump.py -filename:pagelinks.sql.gz
Downloading dump from idwiki
Symlinking file from /public/dumps/public/idwiki/20201020/idwiki-20201020-pagelinks.sql.gz
Done! File stored as ./idwiki-latest-pagelinks.sql.gz
rafid@tools-sgebastion-07:~/pywikibot-core$ python3 pwb.py scripts/download_dump.py -filename:pagelinks.sql.gz -dumpdate:20200601
Downloading dump from idwiki
Symlinking file from /public/dumps/public/idwiki/20201020/idwiki-20201020-pagelinks.sql.gz
Done! File stored as ./idwiki-20200601-pagelinks.sql.gz

As we can look above, when we provide the dumpdate parameter for the script when we're in toolforge, it makes a symlink from the latest version (it doesn't even use the dumpdate parameter to do this) and save that symlink with dumpdate in the filename (instead of latest), which is erroneous.

It has to symlink from the right dumpdate file instead of the latest dump date.

Event Timeline

Change 636813 had a related patch set uploaded (by Rafidaslam; owner: Rafid Aslam (refeed|rafidaslam)):
[pywikibot/core@master] download_dump: Make dumpdate param work when using the script in Toolforge

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

Xqt triaged this task as Medium priority.Oct 28 2020, 5:30 AM

Change 636813 merged by jenkins-bot:
[pywikibot/core@master] download_dump: Make dumpdate param work when using the script in Toolforge

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

Xqt subscribed.

Thanks a lot