Skip to content
Snippets Groups Projects
  1. Mar 23, 2021
  2. Mar 08, 2021
    • Antoine Lambert's avatar
      test_cli: Fix test_run_help and test_list_help · 132522e4
      Antoine Lambert authored
      Due to an incomplete command passed to the HelpFormatter.format method,
      the text alignment in the usage_prefix variable was not the same as the
      command output generated by click.
      
      Those tests started to fail since the recent growth of available loaders
      as click wraps help lines to 80 columns.
      132522e4
  3. Mar 05, 2021
  4. Mar 02, 2021
  5. Feb 25, 2021
  6. Feb 19, 2021
  7. Feb 16, 2021
    • Antoine R. Dumont's avatar
      core.loader: Merge Loader into BaseLoader · 7c776a48
      Antoine R. Dumont authored
      This also simplifies the docstring to a more relevant docstring.
      
      This also drops the spurious {*args, **kwargs} no longer used in the core loaders.
    • Antoine R. Dumont's avatar
      Unify loader instantiation · 7116bb75
      Antoine R. Dumont authored
      This unifies and centralizes the instantiation the same way the lister does.
      
      This introduces a new base class swh.loader.core.loader.Loader for all loaders whose
      only concern for now is to instantiate loaders from either a configuration dict or a
      configuration file.
      
      This simplifies instantiation in celery task code and avoids duplicating the
      configuration load in each loader constructor.
      
      The end goal is to simplify the future refactoring on configuration. With the following,
      we will only have to adapt the Loader class when we start simplifying uniformly the
      configuration.
      
      Also note that I mostly reused the equivalent `swh.lister.pattern.Lister.from_config*`.
      I did not refactor the common behavior (to avoid throwing another dependency in the
      mix). That could always be refactored later.
      
      (inspired by both the work on listers and the configuration system work)
      
      Related to T1410
      Verified
      7116bb75
  8. Feb 11, 2021
    • Antoine R. Dumont's avatar
      nixguix: Ensure interaction with the origin url for edge case tests · 7ea69e2b
      Antoine R. Dumont authored
      This also adds comment to clarify the test mechanism for said scenarios.
      Verified
      7ea69e2b
    • Antoine R. Dumont's avatar
      core.loader: Allow vcs loaders to deal with not_found status · 945ff242
      Antoine R. Dumont authored
      This will allow git, mercurial or svn loader implementations to mark the visit status as
      not_found when such event occurs (e.g failing to to remotely communicate with the remote
      server, archive not found, etc...).
      
      Technically, this opens a means to trap a NotFound exception from the main loop. Which
      finalize the visit and mark its status as "not_found".
      
      Related to T3030
    • Antoine R. Dumont's avatar
      package: Mark visit as not_found when relevant · 96b949cf
      Antoine R. Dumont authored
      If any errors happen during the communication with the origin to retrieve package
      information, the visit fails and its status is marked as not_found.
      
      Only pypi, npm and nixguix package loaders are impacted. The other loaders do not read
      anything from their url so there is no way to trigger such possibility.
      
      Note that the nixguix loader got refactored to avoid the side-effect of reading data out
      of the url within the constructor. It was necessary so the check fails and the visit
      status is dealt with as described. Also, this unifies it with how pypi and npm loaders
      deals with the url communication.
      
      Related to T3030
      Verified
      96b949cf
  9. Feb 08, 2021
  10. Feb 05, 2021
  11. Feb 01, 2021
  12. Jan 04, 2021
  13. Nov 24, 2020
  14. Nov 17, 2020
  15. Nov 03, 2020
  16. Oct 29, 2020
  17. Oct 27, 2020
  18. Oct 15, 2020
  19. Oct 13, 2020
    • vlorentz's avatar
      pypi: write metadata on revisions instead of snapshots. · 0c766379
      vlorentz authored
      Writing them on snapshot allowed us to write the raw metadata from the API,
      but it causes a lot of duplication; after running for only a couple of months,
      the metadata storage is already 700GB in size, mostly because of NPM
      metadata, but also because of these (eg. many over 1MB each).
      
      The metadata we wrote on snapshots was made of:
      
      * intrinsic metadata that PyPI extracted from the last upload
      * info on each file (sdist or otherwise)
      
      The former we don't need to archive like this (as they are intrinsic),
      and we keep loading the latter but only for source files and discard
      extrinsic metadata for binary files, as they are not useful.
      0c766379
  20. Oct 05, 2020
    • vlorentz's avatar
      npm: write metadata on revisions instead of snapshots. · fe59ce84
      vlorentz authored
      Writing them on snapshot allowed us to write the raw metadata from the API,
      but it causes a lot of duplication; after running for only a couple of months,
      the metadata storage is already 700GB in size, mostly because of these
      (eg. there are 150k over 1MB each).
      
      The metadata we wrote on snapshots was made of:
      
      * a 'versions' dict, whose content is moved to revisions
      * a 'time' dict, with one timestamp per version, which is used as the
        data of revision objects
      * 'dist-tags', which is currently ignored, but should be converted to
        ALIAS branches in a future commit.
      * a '_rev' property, which is internal to NPM, so not useful to archive
      * everything else can be recomputed from the metadata of the latest
        version.
      fe59ce84
    • vlorentz's avatar
      debian: Fix mypy error by asserting ChangeBlock.package is not None. · 7d3d8ffa
      vlorentz authored
      Under some conditions, mypy can detect it is declared as Optional[str].
      7d3d8ffa
  21. Oct 02, 2020
  22. Oct 01, 2020
Loading