Wrong ownership of contributions

Bug #1634020 reported by Yujun Zhang
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stackalytics
In Progress
Undecided
Yujun Zhang

Bug Description

Some commits from <email address hidden> is not included in the correct user, i.e. `yujunz` but appears under a different user id `zhangyujun`[1]

This is possible a bug caused by reusing an abandoned launchpad id. The events related to the id history are as following

1. <email address hidden> registered as `zhangyujun`
2. <email address hidden> changed his launchpad id to `yujunz` and abandoned `zhangyujun`[3]
3. <email address hidden> registered as `zhangyujun`
4. <email address hidden> submit a patch to fix duplicate user id entries[4]
5. <email address hidden> claims `zhangyujun` [5]

The usage of `default_data.json` here is different from its original purpose, i.e. track the company and email change of the **same** user. `zhangyujun` in `default_data.json` is now containing information of two different people. It might be the cause of this problem.

[1] http://stackalytics.com/?project_type=opnfv-group&metric=commits&user_id=zhangyujun
[2] http://git.openstack.org/cgit/openstack/stackalytics/tree/etc/default_data.json#n20240
[3] https://review.openstack.org/#/c/365375/1/etc/default_data.json
[4] https://review.openstack.org/#/c/384000/1/etc/default_data.json
[5] https://review.openstack.org/#/c/384801/1/etc/default_data.json

This bug is related to https://bugs.launchpad.net/stackalytics/+bug/1293309

Yujun Zhang (yujunz)
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Yujun Zhang (yujunz) wrote :

It seems the bug does not exist in OpenStack stats but in OPNFV stats.

Revision history for this message
Yujun Zhang (yujunz) wrote :

It seems the data resumes to normal since Oct 18, 2016[1]. But the history data between Oct 7 to Oct 17 is still wrong[2].

[1]: http://stackalytics.com/?project_type=opnfv-group&metric=commits&user_id=yujunz
[2]: http://stackalytics.com/?project_type=opnfv-group&metric=commits&user_id=zhangyujun

Revision history for this message
Yujun Zhang (yujunz) wrote :
Revision history for this message
Yujun Zhang (yujunz) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to stackalytics (master)

Reviewed: https://review.openstack.org/420680
Committed: https://git.openstack.org/cgit/openstack/stackalytics/commit/?id=f9791e756cc0a4d613c7056eb2e1b71a166f9630
Submitter: Jenkins
Branch: master

commit f9791e756cc0a4d613c7056eb2e1b71a166f9630
Author: zhangyujun <email address hidden>
Date: Mon Jan 16 19:56:20 2017 +0800

    Add gerrit_id for zhangyujun

    add gerrit_id try to fix this bug temporarily

    Related-Bug: #1634020
    Change-Id: I10bfc5bf484b413eaebe8c49c90966afc2420eb8

Revision history for this message
zhangyujun (zhangyujun) wrote :

add my gerrit_id doesn't fix this.

update yours too ?

{
    "launchpad_id": "yujunz",
    "gerrit_id": "yujunz",
    "companies": [
       {
          "company_name": "ZTE Corporation",
          "end_date": null
       }
     ],
     "user_name": "Yujun Zhang",
     "emails": ["<email address hidden>", "<email address hidden>"]
},

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to stackalytics (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/423310

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to stackalytics (master)

Reviewed: https://review.openstack.org/423310
Committed: https://git.openstack.org/cgit/openstack/stackalytics/commit/?id=5c6d175c0f2601a1a29e2a4999d5d86f9741b182
Submitter: Jenkins
Branch: master

commit 5c6d175c0f2601a1a29e2a4999d5d86f9741b182
Author: Yujun Zhang <email address hidden>
Date: Fri Jan 20 22:42:22 2017 +0800

    Add gerrit_id

    Change-Id: I1db79dc1619c541e0d98fde9de4fd6b3a590ac8c
    Related-Bug: #1634020

Revision history for this message
Yujun Zhang (yujunz) wrote :

It seems to be caused by `user_processor`. It merges email addresses from `default_data.json` to runtime storage[1]. The email address <email address hidden> is currently associated with both `zhangyujun` and `yujunz`.

We need find a way to remove the obsolete association from runtime storage

[1]: http://git.openstack.org/cgit/openstack/stackalytics/tree/stackalytics/processor/user_processor.py#n99

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to stackalytics (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/426502

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/426545

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to stackalytics (master)

Reviewed: https://review.openstack.org/426545
Committed: https://git.openstack.org/cgit/openstack/stackalytics/commit/?id=692728277ce4b51e890e78ded9550a083964df43
Submitter: Jenkins
Branch: master

commit 692728277ce4b51e890e78ded9550a083964df43
Author: Yujun Zhang <email address hidden>
Date: Sun Jan 29 15:52:10 2017 +0800

    Correct ownership of commits

    - 25 commits in openstack
    - 6 commits in opnfv

    Change-Id: Iae9bc1f208e46381c471cc46707422904361b4b7
    Related-Bug: #1634020

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/426502
Committed: https://git.openstack.org/cgit/openstack/stackalytics/commit/?id=bac722a749b11ff0d7cd49b67d7b75ac73658023
Submitter: Jenkins
Branch: master

commit bac722a749b11ff0d7cd49b67d7b75ac73658023
Author: Yujun Zhang <email address hidden>
Date: Sat Jan 28 21:04:15 2017 +0800

    Add support for user correction

    When user_id changes, the obsoleted association between old user_id
    and emails needs to be corrected. This is done by extending user profile
    update method to apply user corrections from `corrections.json`

    Related-Bug: #1634020
    Change-Id: I580826afbdc2322555a22b12f80b15a0ef3167fb

Yujun Zhang (yujunz)
Changed in stackalytics:
assignee: nobody → Yujun Zhang (yujunz)
status: New → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to stackalytics (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/432255

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to stackalytics (master)

Reviewed: https://review.openstack.org/432255
Committed: https://git.openstack.org/cgit/openstack/stackalytics/commit/?id=3fc43b4d707c860a21c4db04f852aae4e5e99873
Submitter: Jenkins
Branch: master

commit 3fc43b4d707c860a21c4db04f852aae4e5e99873
Author: Yujun Zhang <email address hidden>
Date: Fri Feb 10 19:12:27 2017 +0800

    Fix wrong ownership and user name of commits

    Change-Id: Ib90483924c4819e40a3f24e1dff2fa52efaf2ac0
    Related-Bug: #1634020

Revision history for this message
Yujun Zhang (yujunz) wrote :

It seems the bug is not resolved completely. Wrong ownership is still observed for contributions between

- Oct 7 to Oct 17
- Jan 30 to Feb 21

See http://stackalytics.com/?project_type=opnfv-group&metric=commits&user_id=zhangyujun for details

Changed in stackalytics:
status: Fix Released → In Progress
Revision history for this message
Yujun Zhang (yujunz) wrote :

The email list is not reset as expected.

curl http://stackalytics.com/api/1.0/users/zhangyujun

{"user": {"launchpad_id": "zhangyujun", "user_id": "zhangyujun", "seq": 65434, "company_link": "<a href=\"/?release=ocata&metric=marks&user_id=&company=EasyStack&project_type=all\">EasyStack</a>", "text": "Zhang Yujun", "companies": [{"company_name": "ZTE Corporation", "end_date": 1474588800}, {"company_name": "EasyStack", "end_date": 0}], "id": "zhangyujun", "static": true, "gerrit_id": "zhangyujun", "user_name": "Zhang Yujun", "emails": ["<email address hidden>", "<email address hidden>", "<email address hidden>", "<email address hidden>", "<email address hidden>", "<email address hidden>"]}}

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to stackalytics (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/447386

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to stackalytics (master)

Reviewed: https://review.openstack.org/447386
Committed: https://git.openstack.org/cgit/openstack/stackalytics/commit/?id=2e55e20e875b2a95eb8735aebaf2ad6753a0a075
Submitter: Jenkins
Branch: master

commit 2e55e20e875b2a95eb8735aebaf2ad6753a0a075
Author: Yujun Zhang <email address hidden>
Date: Mon Mar 20 14:36:52 2017 +0800

    Correct wrong ownership of commits

    Change-Id: I3f77f14db5396579dd3826793f4b1f3b2f6548cc
    Related-Bug: #1634020

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.