Page MenuHomeSoftware Heritage

Incremental Person fullname normalization changes
ClosedPublic

Authored by olasd on Jan 31 2022, 10:08 PM.

Details

Summary

Two commits:

  • postgresql: Use Person.from_fullname if name and email are None
  • Mostly use normalized Person objects in tests

The first commit allows us to populate sensible name and email values out of the
new displayname field, without having to store them.

The second commit opens up the possibility of eventually ignoring the name and
email fields stored in database in favor of parsing them again from the
fullname field (and therefore to update our parsing logic without having to
affect stored data).

Test Plan

unit tests/data fixed up

Diff Detail

Repository
rDSTO Storage manager
Branch
name-parsing-fixups
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26411
Build 41289: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 41288: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D7053 (id=25579)

Rebasing onto 6f0252465c...

Current branch diff-target is up to date.
Changes applied before test
commit f868f3c8ad46d4e9bd53ee800ba26bb03443b705
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Mon Jan 31 20:09:43 2022 +0100

    Mostly use normalized Person objects in tests
    
    This opens up the possibility of eventually ignoring the `name` and
    `email` fields stored in database in favor of parsing them again from
    the fullname field (and therefore to update our parsing logic without
    having to affect stored data).

commit d4ddd41535d0ce1cd50d51d297e154bf0ab6e649
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Mon Jan 31 20:08:04 2022 +0100

    postgresql: Use Person.from_fullname if name and email are None
    
    This allows us to populate sensible name and email values out of the new
    displayname field, without having to store them.

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1544/ for more details.

This revision is now accepted and ready to land.Jan 31 2022, 10:18 PM