Page MenuHomeSoftware Heritage

migrate_extrinsic_metadata: fix crash when a Debian revision is missing.
ClosedPublic

Authored by vlorentz on Sep 11 2020, 2:00 PM.

Diff Detail

Repository
rDSTO Storage manager
Branch
migrate-debian-origin
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15061
Build 23213: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 23212: arc lint + arc unit

Event Timeline

vlorentz created this revision.Sep 11 2020, 2:00 PM

Build is green

Patch application report for D3926 (id=13836)

Could not rebase; Attempt merge onto fd6d72f98e...

Merge made by the 'recursive' strategy.
 swh/storage/migrate_extrinsic_metadata.py          |  99 +++++-
 .../migrate_extrinsic_metadata/test_debian.py      | 337 ++++++++++++++++++++-
 2 files changed, 418 insertions(+), 18 deletions(-)
Changes applied before test
commit 5132116d145b9ea541249e1c9a9f3d2ada5a8337
Merge: fd6d72f9 236eee78
Author: Jenkins user <jenkins@localhost>
Date:   Fri Sep 11 12:00:36 2020 +0000

    Merge branch 'diff-target' into HEAD

commit 236eee78d2c7d49096c5f42de07f78567c20dcea
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 11 13:59:55 2020 +0200

    migrate_extrinsic_metadata: fix crash when a Debian revision is missing.
    
    https://forge.softwareheritage.org/T997

commit e387a39752a73b057c7e019765e7a17d98497871
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 10 14:23:12 2020 +0200

    migrate_extrinsic_metadata: guess Debian origins.
    
    This works by guessing the package name from the original_artifact data,
    then building origins that would match the package name, then filtering
    out origins by checking if the revision can be reached from them.

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

ardumont accepted this revision.Sep 11 2020, 2:42 PM
ardumont added a subscriber: ardumont.

lgtm, one suggestion above.

swh/storage/tests/migrate_extrinsic_metadata/test_debian.py
217

missing_revision_id = b"21" * 10
...
SnapshotBranch(target_type=TargetType.REVISION, target=missing_revision_id,)
...
call.revision_get([missing_revision_id]),
...

This revision is now accepted and ready to land.Sep 11 2020, 2:42 PM
vlorentz updated this revision to Diff 13864.Sep 14 2020, 10:31 AM

rebase + deduplicate rev and snp id

vlorentz marked an inline comment as done.Sep 14 2020, 10:32 AM

Build is green

Patch application report for D3926 (id=13864)

Could not rebase; Attempt merge onto ed55e9c775...

Updating ed55e9c7..7969d368
Fast-forward
 swh/storage/migrate_extrinsic_metadata.py          |  99 +++++-
 .../migrate_extrinsic_metadata/test_debian.py      | 339 ++++++++++++++++++++-
 2 files changed, 420 insertions(+), 18 deletions(-)
Changes applied before test
commit 7969d368966c43ebfd51b2901c827217b0712dd5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 11 13:59:55 2020 +0200

    migrate_extrinsic_metadata: fix crash when a Debian revision is missing.
    
    https://forge.softwareheritage.org/T997

commit 265fc387f7b3d5f1a55d136b74fa2ee9b9f11f58
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 10 14:23:12 2020 +0200

    migrate_extrinsic_metadata: guess Debian origins.
    
    This works by guessing the package name from the original_artifact data,
    then building origins that would match the package name, then filtering
    out origins by checking if the revision can be reached from them.

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

This revision was landed with ongoing or failed builds.Sep 16 2020, 5:02 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D3926 (id=13970)

Rebasing onto f008a597fd...

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

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