-
Notifications
You must be signed in to change notification settings - Fork 83
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
Sorting hat package creates identity with missing information when merged and unmerged #243
Comments
Current version of SortingHat doesn't not track historic information to that level of detail, so it's not possible to recreate the previous identity. With the new experimental version (see What's your use case? Why do you need this feature? |
If there's two identities with let's say two emails that are similar, i think in that case it warrants merging and in case a user thinks the merge was a mistake then they can unmerge.
Basically giving users the ability to unmerge an identity if they mistakenly merge two identities. |
I see that the differences between Here is the diff file mungle-master.diff.txt |
@lukaszgryglicki, muggle branch is a totally different thing. It's still experimental and not integrated with any other component in the stack. You should not use that branch unless you want to contribute developing it. You have more info about it here: https://github.com/chaoss/grimoirelab-sortinghat/wiki/Roadmap-to-Sorting-Hat-1.0 I can try to rebase the branch to master but as they are incompatible I don't see the point of doing it right now. |
OK, thanks for the info. How about changes to DB structure needed to handle merge/unmerge operations? |
In muggle we use Django ORM and not SQLAlchemY - as in master - to deal with the database, so it's not only about DB structure. If you want to check it is in here In any case, muggle doesn't implement what I think you want, which is an "undo" of certain operations. It's something that it's possible to implement with the current schema because we store all the operations done with SortingHat. So, using event sourcing pattern would be possible to recreate some states or to roll back. This is not implemented yet and I'm not sure if we should follow that direction. I'm also open to ideas about how to manage these cases plus having PRs solving this issue. |
When we merge one profile with another, we call sortinghat.api.merge_unique_identities (https://github.com/LF-Engineering/dev-analytics-sortinghat-api/blob/master/app/apis/profiles/apis.py#L190), with a
from
andto
uuid. Thefrom
identity is then deleted and added into theto
identity.Afterwards, if we unmerge that identity from the
to
identity, for which we use sortinghat.api.move_identity (https://github.com/LF-Engineering/dev-analytics-sortinghat-api/blob/master/app/apis/profiles/apis.py#L269), thefrom
identity that was earlier deleted is recreated but it will be missing name, email and other personal details information it previously had.The text was updated successfully, but these errors were encountered: