Page MenuHomeSoftware Heritage

Add support for None as author or committer of a Revision
ClosedPublic

Authored by vlorentz on Mar 21 2022, 3:42 PM.

Details

Summary

committer=None happens on some malformed commits generated by old dgit
versions ; and it is possible for author=None to happen for the same reason.

Diff Detail

Repository
rDMOD Data model
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 27734
Build 43411: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 43410: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D7400 (id=26739)

Rebasing onto bc3831fddc...

Current branch diff-target is up to date.
Changes applied before test
commit 7a70a1646d853987df3ad093043d4544c5eae5cc
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 21 15:41:03 2022 +0100

    Add support for None as author or committer of a Revision
    
    committer=None happens on some malformed commits generated by old dgit
    versions ; and it is possible for author=None to happen for the same reason.

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

anlambert added a subscriber: anlambert.

Looks good to me.

This revision is now accepted and ready to land.Mar 22 2022, 10:57 AM
douardda added inline comments.
swh/model/model.py
914–915

?

914–915

well with the closing parenthesis properly placed...

I would got for the more compact version of the code in from_dict, otherwise lgtm.

olasd added a subscriber: olasd.

LGTM, thanks

swh/model/git_objects.py
339–340

Eww. (ISTR that at some point I think the subquery for revision_history would come up with an array containing one NULL value...)

swh/model/model.py
914–915

I wanted to keep it consistent with date handling.

This revision was landed with ongoing or failed builds.Mar 23 2022, 10:57 AM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D7400 (id=26813)

Rebasing onto dbce3cc6da...

First, rewinding head to replay your work on top of it...
Fast-forwarded diff-target to base-revision-466-D7400.
Changes applied before test

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