Page MenuHomeSoftware Heritage

[wip] package.loader: introduce load_target and resolve_target_from
Changes PlannedPublic

Authored by lewo on Thu, Mar 19, 10:51 AM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

DO NOT REVIEW IT YET!

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Branch
functional-file
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11218
Build 16940: tox-on-jenkinsJenkins
Build 16939: arc lint + arc unit

Event Timeline

lewo created this revision.Thu, Mar 19, 10:51 AM
lewo edited the summary of this revision. (Show Details)Thu, Mar 19, 10:52 AM
lewo updated this revision to Diff 10152.Thu, Mar 19, 11:21 AM
lewo edited the summary of this revision. (Show Details)
  • WIP
lewo planned changes to this revision.Thu, Mar 19, 11:24 AM
lewo added a subscriber: ardumont.

@ardumont I don't understand why the storage doesn't contains 2 contents (a tarball + a file). The test test_loader_one_visit is failing because there is only 1 content in the storage.

ardumont added inline comments.Thu, Mar 19, 1:26 PM
swh/loader/package/functional/loader.py
144

beware to_model can return a Content or a SkippedContent.
That will not be the same endpoint for the storage:

  • Content: self.storage.content_add
  • SkippedContent: self.storage.skipped_content_add

@ardumont I don't understand why the storage doesn't contains 2 contents (a tarball + a file). The test test_loader_one_visit is failing because there is only 1 content in the storage.

It happens to be the same content...
the 2 files you have in the revision.tar.gz and the second file targetted by url in your sample are the same.
It's then deduplicated in the storage...

Change the content of the targetted file
and you should be good to go ;)