Page MenuHomeSoftware Heritage

package/loader: Implement load_status and visit_status
ClosedPublic

Authored by anlambert on Mon, Sep 19, 4:42 PM.

Details

Summary

Those methods were not reimplemented and could return incorrect statuses
once the load method called.

As they are useful for tests, implement them in PackageLoader class.

Depends on D8503

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Mon, Sep 19, 4:43 PM
Harbormaster failed remote builds in B31607: Diff 30627!

Build is green

Patch application report for D8504 (id=30627)

Could not rebase; Attempt merge onto 0c599bdc81...

Updating 0c599bd..e12ca02
Fast-forward
 swh/loader/package/loader.py                       |  41 +++++---
 .../package_example_example-v1.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v2.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v3.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v4.0.tar.gz            | Bin 0 -> 182 bytes
 swh/loader/package/tests/test_loader.py            | 109 +++++++++++++++++----
 6 files changed, 118 insertions(+), 32 deletions(-)
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v1.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v2.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v3.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v4.0.tar.gz
Changes applied before test
commit e12ca02f894e5769e576d3b799a7c1bd1645a695
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Sep 19 16:26:32 2022 +0200

    package/loader: Implement load_status and visit_status
    
    Those methods were not reimplemented and could return incorrect statuses
    once the load method called.
    
    As they are useful for tests, implement them in PackageLoader class.

commit 99e56d3f8746cf38c90e3e658e8937018c08a57a
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Sep 19 15:29:12 2022 +0200

    package/tests: Add a visit success test for StubPackageLoader
    
    Such test was missing so add a couple of tiny tarballs in tests
    data directory and simulate a successful visit for origin example.
    
    Also update origin URL and remove a couple of hardcoded litterals.

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

Build is green

Patch application report for D8504 (id=30627)

Could not rebase; Attempt merge onto 0c599bdc81...

Updating 0c599bd..e12ca02
Fast-forward
 swh/loader/package/loader.py                       |  41 +++++---
 .../package_example_example-v1.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v2.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v3.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v4.0.tar.gz            | Bin 0 -> 182 bytes
 swh/loader/package/tests/test_loader.py            | 109 +++++++++++++++++----
 6 files changed, 118 insertions(+), 32 deletions(-)
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v1.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v2.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v3.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v4.0.tar.gz
Changes applied before test
commit e12ca02f894e5769e576d3b799a7c1bd1645a695
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Sep 19 16:26:32 2022 +0200

    package/loader: Implement load_status and visit_status
    
    Those methods were not reimplemented and could return incorrect statuses
    once the load method called.
    
    As they are useful for tests, implement them in PackageLoader class.

commit 99e56d3f8746cf38c90e3e658e8937018c08a57a
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Sep 19 15:29:12 2022 +0200

    package/tests: Add a visit success test for StubPackageLoader
    
    Such test was missing so add a couple of tiny tarballs in tests
    data directory and simulate a successful visit for origin example.
    
    Also update origin URL and remove a couple of hardcoded litterals.

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

This revision is now accepted and ready to land.Tue, Sep 20, 11:40 AM

Build is green

Patch application report for D8504 (id=30636)

Could not rebase; Attempt merge onto c4370009d0...

Updating c437000..598873f
Fast-forward
 swh/loader/package/loader.py                       |  41 +++++---
 .../package_example_example-v1.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v2.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v3.0.tar.gz            | Bin 0 -> 181 bytes
 .../package_example_example-v4.0.tar.gz            | Bin 0 -> 182 bytes
 swh/loader/package/tests/test_loader.py            | 109 +++++++++++++++++----
 6 files changed, 118 insertions(+), 32 deletions(-)
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v1.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v2.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v3.0.tar.gz
 create mode 100644 swh/loader/package/tests/data/https_example.org/package_example_example-v4.0.tar.gz
Changes applied before test
commit 598873f00392e75f085aa0b9e957b7261127aaa2
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Sep 19 16:26:32 2022 +0200

    package/loader: Implement load_status and visit_status
    
    Those methods were not reimplemented and could return incorrect statuses
    once the load method called.
    
    As they are useful for tests, implement them in PackageLoader class.

commit 63ccbd9a3a671a4b218529be7d12d2fb1542b5cd
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Sep 19 15:29:12 2022 +0200

    package/tests: Add a visit success test for StubPackageLoader
    
    Such test was missing so add a couple of tiny tarballs in tests
    data directory and simulate a successful visit for origin example.
    
    Also update origin URL and remove a couple of hardcoded litterals.

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