Page MenuHomeSoftware Heritage

mailmaps: Avoid false positive when checking IntegrityError.
ClosedPublic

Authored by vlorentz on Feb 7 2022, 6:13 PM.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7113 (id=25777)

Could not rebase; Attempt merge onto ca8e529f2d...

Merge made by the 'recursive' strategy.
 swh/web/auth/mailmap.py                          |  57 ++++++++++--
 swh/web/auth/migrations/0005_usermailmapevent.py |  39 ++++++++
 swh/web/auth/models.py                           |  30 ++++++
 swh/web/tests/auth/test_mailmap.py               | 111 +++++++++++++++++++++--
 4 files changed, 221 insertions(+), 16 deletions(-)
 create mode 100644 swh/web/auth/migrations/0005_usermailmapevent.py
Changes applied before test
commit db1e1b8563705ca1eec92fb7734c4478c094037e
Merge: ca8e529f daf80437
Author: Jenkins user <jenkins@localhost>
Date:   Mon Feb 7 17:14:14 2022 +0000

    Merge branch 'diff-target' into HEAD

commit daf80437da44bd3f413d8c7143b72f4810cd726e
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Feb 7 18:13:17 2022 +0100

    mailmaps: Avoid false positive when checking IntegrityError.

commit cd3e29df747669cd4887529bcd2789b9f1cd4852
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Feb 7 17:03:36 2022 +0100

    mailmaps: Add table UserMailmapEvent
    
    This will log all incoming HTTP requests on update events (assuming the user
    is authorized), for audit purposes.

commit d5b687fb78e03fa4c94da412a061877a59b400f5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Feb 7 17:01:07 2022 +0100

    mailmaps: Add test_mailmap_add_full

commit 74157d48cd2c05951cf6e8f8910fb215791c63d9
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Feb 7 15:02:15 2022 +0100

    mailmaps: Make error handling more robust when 'from_email' is missing/empty.

commit ca4020e97dcf6ee4fc987400646fad6ccce87824
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Feb 7 14:50:58 2022 +0100

    mailmaps: Return a proper error in case of duplicate from_email
    
    Instead of a generic 500.

commit 98bdf12aea75bdcc2e3e96b49515112987daa164
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Feb 7 14:49:54 2022 +0100

    mailmaps: Add an endpoint to fetch the list
    
    This will be useful for debugging and checking records are indeed
    configured.

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

This revision is now accepted and ready to land.Feb 7 2022, 6:40 PM
This revision was landed with ongoing or failed builds.Feb 7 2022, 7:10 PM
This revision was automatically updated to reflect the committed changes.