Page MenuHomePhabricator

Scraper: sanity check dump size by including the sitestats article count
Closed, ResolvedPublic

Description

T345176 and T354018 are turning out to be long-term issues and could easily regress even once fixed. To protect against data quality issues, let's request the article count from the MediaWiki sitestats API for each site, and store in the final report. Test that the final number of deduplicated articles is similar to the self-reported dump size when using the data.

Implementation notes

Although it's a slight abuse of the intended design, this would fit well in the "general" module's aggregations, where we also produce the final :page_count of successfully-processed rows. Aggregations with the :finalizer option also have access to the other columns, allowing us to calculate the proportion of pages missing.

The docs for Wiki.Action include an example of how to fetch statistics from a wiki, and the wiki name should be available through the wiki field.

Review

https://gitlab.com/wmde/technical-wishes/scrape-wiki-html-dump/-/merge_requests/104

Event Timeline

WMDE-Fisch removed a project: Patch-For-Review.
WMDE-Fisch moved this task from Tech Review to Done on the WMDE-TechWish-Sprint-2024-03-13 board.
WMDE-Fisch subscribed.

I've verified (by spot-checking) that the dumps don't include any page_is_redirect pages, so it seems that the siteinfo article count can be expected to exactly match the page count from the dump.