Page MenuHomePhabricator

Fix duplicated enrollments in database
Closed, ResolvedPublic

Description

Due to https://github.com/grimoirelab/sortinghat/issues/91 we have some accounts that have duplicated enrollments in the DB. Find and fix them by reviewing the output of SELECT uuid,start,end,organization_id FROM enrollments WHERE uuid IN (SELECT uuid FROM enrollments GROUP BY uuid HAVING COUNT(uuid) > 1) ORDER BY uuid,start;

Event Timeline

In theory done:

To https://github.com/Bitergia/mediawiki-identities.git
   f44cdb9..50e1ccc  master -> master

In practice let's see after the next owlbot activity.

Also added the SQL query to https://www.mediawiki.org/wiki/User:AKlapper_(WMF)/Bitergia_data_quality_queries

Aklapper changed the task status from Open to Stalled.Sep 29 2017, 8:13 PM
Aklapper lowered the priority of this task from Medium to Low.

List is shorter than expected btw:

sortinghat withdraw 025124bdf0ea09267b3a6fddca2ae4552dd44a4d "Wikimedia Foundation"
sortinghat withdraw 025124bdf0ea09267b3a6fddca2ae4552dd44a4d "Independent"
sortinghat withdraw 0ce8b7c58618f160caba607945d4f53bb0ac6f7d "Wikimedia Deutschland"
sortinghat withdraw 0f5aad639624b5a1870b58271ccd44ecefada689 "Independent"

I reviewed the SQL query output based on the latest DB dump (git id d357d21754988e610ac31a906d42dd234bb821a7 from 20170930). I have covered all duplicated enrollments in the proposed changes (=a list of sortinghat commands in a bash script) I posted in https://gitlab.com/Bitergia/c/Wikimedia/support/issues/1#note_42299757 (non-public) and asked Bitergia to merge my proposed changes, as things are broken in https://phabricator.wikimedia.org/T157898#3639876 which do not allow me to push changes myself without getting them overwritten by owlbot currently.

The query is listed on https://www.mediawiki.org/wiki/User:AKlapper_(WMF)/Bitergia_data_quality_queries#Check_duplicated_enrollments so I can repeat this exercise regularly.

Though the production DB does not reflect those fixes yet, there is nothing left to do in this task for the time being - just waiting for Bitergia to merge my changes.

Closing task as resolved.