Page MenuHomePhabricator

Understand difference between author_name and name in gerrit
Closed, ResolvedPublic

Description

As this is slightly relevant when constructing search queries for stats.

e.g. from https://wikimedia.biterg.io/edit/app/kibana#/discover in the gerrit index :

author_name	   	Sam Reed
author_user_name	   	reedy
name	   	Reedy

Seeing e.g. https://gerrit.wikimedia.org/r/#/c/383289/ , Reedy is used.

Looking at the DB dump,

  • as the profile name, Sam Reed is set.
  • as the gerrit username, it is sometimes reedy and sometimes null and sometimes an empty string.
  • as the gerrit name, it is sometimes Reedy and sometimes Sam Reed

Event Timeline

Don't think I can find out myself:

$:acko\> grep -r user_name --exclude="*.json" .
./grimoirelab/panels/README.md:* author_user_name
./grimoirelab/sortinghat/sortinghat/parsing/stackalytics.py:                    "user_name": "John Smith",
./grimoirelab/sortinghat/sortinghat/parsing/stackalytics.py:                    "user_name": "John Doe",
./grimoirelab/sortinghat/sortinghat/parsing/stackalytics.py:                name = self.__encode(user['user_name'])
./grimoirelab/sortinghat/build/lib/sortinghat/parsing/stackalytics.py:                    "user_name": "John Smith",
./grimoirelab/sortinghat/build/lib/sortinghat/parsing/stackalytics.py:                    "user_name": "John Doe",
./grimoirelab/sortinghat/build/lib/sortinghat/parsing/stackalytics.py:                name = self.__encode(user['user_name'])
./grimoirelab/GrimoireELK/grimoire_elk/elk/github.py:            rich_issue['user_name'] = user['name']
./grimoirelab/GrimoireELK/grimoire_elk/elk/github.py:            rich_issue['user_name'] = None
./grimoirelab/GrimoireELK/grimoire_elk/elk/enrich.py:            rol+"_user_name": empty_field,
./grimoirelab/GrimoireELK/grimoire_elk/elk/enrich.py:            eitem_sh[rol+"_user_name"] = None
./grimoirelab/GrimoireELK/grimoire_elk/elk/enrich.py:                eitem_sh[rol+"_user_name"] = identity['username']
./grimoirelab/GrimoireELK/grimoire_elk/elk/enrich.py:            eitem_sh[rol+"_user_name"] = identity['username']

which probably turns this into an upstream documentation request.

Comparison of the three values on the front page:

Aklapper closed this task as Resolved.Dec 6 2017, 5:36 PM
Aklapper moved this task from Backlog to December on the Developer-Advocacy (Oct-Dec 2017) board.

author_name is the global field name; the other two names are data source specific.
I covered this in https://www.mediawiki.org/w/index.php?title=Community_metrics&type=revision&diff=2638787&oldid=2609138 (for me and others).

Closing task as resolved.

Qgil awarded a token.Dec 7 2017, 11:42 AM