Page MenuHomeSoftware Heritage

Add parameter 'ignore_unresolved' to snapshot_git_object
ClosedPublic

Authored by vlorentz on Aug 5 2022, 2:22 PM.

Details

Reviewers
anlambert
Group Reviewers
Reviewers
Maniphest Tasks
Restricted Maniphest Task
Commits
rDMOD0be753d567db: Add parameter 'ignore_unresolved' to snapshot_git_object
Summary

It allows building a snapshot manifest despite some branches being
unresolved (instead of raising an error).

This feature was removed in D6325
but in the end, Snapshot.compute_hash() will need to use it so that
swh-scrubber does not crash when checksum such snapshots.

Diff Detail

Repository
rDMOD Data model
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz added a task: Restricted Maniphest Task.Aug 5 2022, 2:23 PM

Build is green

Patch application report for D8201 (id=29593)

Rebasing onto 79ed550546...

Current branch diff-target is up to date.
Changes applied before test
commit 525dfeee2af2393c40ceb4b3990bcc6da4668dc0
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 5 14:20:38 2022 +0200

    Add parameter 'ignore_unresolved' to snapshot_git_object
    
    It allows building a snapshot manifest despite some branches being
    unresolved (instead of raising an error).
    
    This feature was removed in 57ae405d312879bec19107d29a20c2c290d7861d
    but in the end, Snapshot.compute_hash() will need to use it so that
    swh-scrubber does not crash when checksum such snapshots.

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

anlambert added a subscriber: anlambert.

Looks good to me but docstring should be updated.

swh/model/git_objects.py
415

Could you add a new sentence in the docstring explaining the purpose of that parameter ?

This revision is now accepted and ready to land.Aug 8 2022, 12:13 PM

Build is green

Patch application report for D8201 (id=29619)

Rebasing onto 79ed550546...

Current branch diff-target is up to date.
Changes applied before test
commit 0be753d567db61e45d7e3c691cc159ecdb085487
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 5 14:20:38 2022 +0200

    Add parameter 'ignore_unresolved' to snapshot_git_object
    
    It allows building a snapshot manifest despite some branches being
    unresolved (instead of raising an error).
    
    This feature was removed in 57ae405d312879bec19107d29a20c2c290d7861d
    but in the end, Snapshot.compute_hash() will need to use it so that
    swh-scrubber does not crash when checksum such snapshots.

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

swh/model/git_objects.py
463

Looks like there is an extra cause word here.

swh/model/git_objects.py
463

oops, fixed (committed directly to master)