Page MenuHomeSoftware Heritage

model: Allow unresolved branches when computing Snapshot hash
ClosedPublic

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

Details

Reviewers
anlambert
Group Reviewers
Reviewers
Maniphest Tasks
Restricted Maniphest Task
Commits
rDMODd76bfcaae05e: model: Allow unresolved branches when computing Snapshot hash
Summary

This is needed by swh-scrubber when recomputing the hash of such snapshots.

Depends on D8201.

Resolves T4425.

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

Build is green

Patch application report for D8202 (id=29594)

Could not rebase; Attempt merge onto 79ed550546...

Updating 79ed550..3d97db6
Fast-forward
 swh/model/git_objects.py            | 6 ++++--
 swh/model/model.py                  | 4 +++-
 swh/model/tests/test_identifiers.py | 8 +++++++-
 3 files changed, 14 insertions(+), 4 deletions(-)
Changes applied before test
commit 3d97db622ce5bb702f0bd46e8fe3234ae8f8d670
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 5 14:22:58 2022 +0200

    model: Allow unresolved branches when computing Snapshot hash
    
    This is needed by swh-scrubber when recomputing the hash of such snapshots.

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/498/ for more details.

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

Build is green

Patch application report for D8202 (id=29620)

Could not rebase; Attempt merge onto 79ed550546...

Updating 79ed550..d76bfca
Fast-forward
 swh/model/git_objects.py            | 10 ++++++++--
 swh/model/model.py                  |  4 +++-
 swh/model/tests/test_identifiers.py |  8 +++++++-
 3 files changed, 18 insertions(+), 4 deletions(-)
Changes applied before test
commit d76bfcaae05e41c204d241e009f86d2db98084ef
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 5 14:22:58 2022 +0200

    model: Allow unresolved branches when computing Snapshot hash
    
    This is needed by swh-scrubber when recomputing the hash of such snapshots.

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/500/ for more details.