Page MenuHomePhabricator

Guard maintenance scripts that interact with certain entity types against use when on repo without the type locally
Closed, ResolvedPublic5 Estimated Story Points

Description

I raised this in the CR of https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/591971/6

repo/maintenance/pruneItemsPerSite.php is a repo script, and now we have repos without all entity types enabled.
This means a simple check that repo is enabled is no longer enough, and if a maintenance script interacts with "items" it should only be allowed to run on a repo with "items" on the local entity source.

We should audit all of our maintenance scripts and add this check where we deem necessary.

Acceptance Criteria🏕️🌟 :

  • All repo maintenance scripts that interact with a specific entity type should ensure it exists on the local entity source

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore renamed this task from Guard maintenance scripts that interact with certain entity types against use when on repo without the type lcoally to Guard maintenance scripts that interact with certain entity types against use when on repo without the type locally.Apr 22 2020, 8:29 PM
Addshore triaged this task as Medium priority.Jul 20 2021, 2:47 PM
Addshore updated the task description. (Show Details)
Addshore updated the task description. (Show Details)
Addshore updated the task description. (Show Details)
Addshore set the point value for this task to 5.

Change 709473 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/extensions/Wikibase@master] Guard maintenance scripts against running on foreign entity types

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

Change 709473 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Guard maintenance scripts against running on foreign entity types

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