Wikipedia:Bots/Requests for approval/SDZeroBot 10
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was Approved.
Operator: SD0001 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 18:07, Monday, May 24, 2021 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): TypeScript on Node.js
Source code available: 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 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
[edit]Example uses: see Category:SDZeroBot database report subscriptions (though these are all rather simple examples). – SD0001 (talk) 18:10, 24 May 2021 (UTC)[reply]
Approved for trial (5 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Trial for 5 report updates. ProcrastinatingReader (talk) 18:53, 24 May 2021 (UTC)[reply]
- Trial complete. [1] [2] [3] [4] [5] -- picked up some random queries off 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)[reply]
@ProcrastinatingReader any concerns? – SD0001 (talk) 12:01, 16 June 2021 (UTC)[reply]
Note: moved User:SDZeroBot/Database report and its end template to template namespace ({{database report}} & {{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)[reply]
- Approved. 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)[reply]
- 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.