WP:Bots/Requests for approval/SDZeroBot 10

Category:Approved Wikipedia bot requests for approval

[[User:SDZeroBot|SDZeroBot 10]]

{{Newbot|SDZeroBot|10}}

Operator: {{botop|SD0001}}

Time filed: 18:07, Monday, May 24, 2021 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): TypeScript on Node.js

Source code available: [https://github.com/siddharthvp/SDZeroBot/blob/master/db-tabulator/app.ts github]

Function overview: Allows users to create wikified database reports and keeps them updated.

Links to relevant discussions (where appropriate):

Edit period(s): Daily

Estimated number of pages affected: -

Exclusion compliant (Yes/No): No

Already has a bot flag (Yes/No): Yes

Function details: This is basically the ListeriaBot for database replicas. Instructions for usage are at User:SDZeroBot/Database report. When that template is transcluded to a page (user/WP namespaces), SDZeroBot will run the provided SQL query and update the page (once immediately and then every 24h).

Why we want this in addition to [https://quarry.wmflabs.org/ Quarry]? Wikilinks! Page titles & usernames can be made clickable, unlike in Quarry results. For articles and draft pages, the bot can include excerpts; also not possible in Quarry.

There are some sane checks to prevent abuse of resources (10 min enforced timeout implemented using MariaDB's max_statement_time parameter, limited usage of concurrent db connections, and won’t save to mainspace if someone transcludes the template there).

=Discussion=

Example uses: see :Category:SDZeroBot database report subscriptions (though these are all rather simple examples). – SD0001 (talk) 18:10, 24 May 2021 (UTC)

{{BotTrial|edits=5}} Trial for 5 report updates. ProcrastinatingReader (talk) 18:53, 24 May 2021 (UTC)

:{{BotTrialComplete}} [https://en.wikipedia.org/w/index.php?title=User:SDZeroBot/Articles_with_links_to_drafts&diff=1024933033&oldid=1024933014] [https://en.wikipedia.org/w/index.php?title=User:SDZeroBot/Articles_with_links_to_drafts&diff=1024996373&oldid=1024933171] [https://en.wikipedia.org/w/index.php?title=User:SDZeroBot/AfC_review_counts,_last_24_hours&diff=1024928208&oldid=1024928190] [https://en.wikipedia.org/w/index.php?title=User:SDZeroBot/AfC_review_counts,_last_24_hours&diff=1024996364&oldid=1024928208] [https://en.wikipedia.org/w/index.php?title=User:SDZeroBot/Empty_monthly_maintenance_categories&diff=1024996361&oldid=1024799452] -- picked up some random queries off [https://quarry.wmflabs.org/query/runs/all recent Quarry runs] for the trial. The 1st and 3rd edits are updates done immediately on page creation while the other 3 are the scheduled daily updates. – SD0001 (talk) 13:33, 25 May 2021 (UTC)

@ProcrastinatingReader any concerns? – SD0001 (talk) 12:01, 16 June 2021 (UTC)

Note: moved User:SDZeroBot/Database report and its end template to template namespace ({{t|database report}} & {{t|database report end}}), as it makes it easier to type. Hope this is alright. In theory, another bot could take over the task and reuse the same templates at some point. – SD0001 (talk) 13:20, 16 June 2021 (UTC)

:{{BotApproved}} Trial looks fine to me. I've only skimmed the code but that looks fine too. I'd note that it doesn't appear to be sanitising the user input, but SQL accounts are limited to select queries anyway. Probably best to keep pages of database reports managed by this bot under either bot userspace, subpages of Wikipedia:Database reports, or userspace in general. ProcrastinatingReader (talk) 17:04, 16 June 2021 (UTC)

:The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard.