Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispose entities on unmaintained namespace, add maintenance alert, refs 4468 #4744

Merged
merged 1 commit into from Apr 25, 2020

Conversation

mwjames
Copy link
Contributor

@mwjames mwjames commented Apr 25, 2020

This PR is made in reference to: #4468

This PR addresses or contains:

  • The disposeOutdatedEntities.php script will check for "invalid entities" on unmaintained namespaces which may have been lingering in the object table due to a removed namespace setting where a user did not run a rebuild of the data as suggested by [0]
  • Adds a maintenance alert for invalid entities by namespace

This PR includes:

  • Tests (unit/integration)
  • CI build passed

[0] https://www.semantic-mediawiki.org/wiki/Help:Custom_namespaces

Example

image

$ php maintenance/disposeOutdatedEntities.php

Semantic MediaWiki:                                             3.2.0-alpha
MediaWiki:                                                     1.35.0-alpha

--- About -----------------------------------------------------------------

This script will remove outdated entities and entities rendered invalid due
to redeclared namespace settings. It will also dispose of query link
entries from tables that no longer hold a valid entity reference in
Semantic MediaWiki.

--- Outdated entitie(s) ---------------------------------------------------

Removing outdated and invalid entities ...
   ... checking outdated entities ...                                     ✓
   ... checking invalid entities by namespace ...
       ... cleaning up entity                                   4836 (100%)
       ... removed (IDs) ...                                              1
   ... done.

Removing query links ...
   ... checking query links (invalid) ...                                 ✓
   ... checking query links (unassigned) ...                              ✓
   ... done.

@mwjames mwjames merged commit 2a0c446 into master Apr 25, 2020
@mwjames mwjames deleted the invalid-entities branch April 25, 2020 11:47
@kghbln kghbln added the enhancement Alters an existing functionality or behaviour label Apr 25, 2020
@kghbln kghbln added this to the SMW 3.2.0 milestone Apr 25, 2020
@kghbln
Copy link
Member

kghbln commented Apr 25, 2020

Documented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Alters an existing functionality or behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants