Skip to content
Snippets Groups Projects
  1. Sep 16, 2019
  2. Sep 12, 2019
  3. Sep 09, 2019
  4. Sep 06, 2019
  5. Sep 05, 2019
  6. Sep 04, 2019
    • David Douard's avatar
      tasks: normalize the url argument name of most lister · b810876e
      David Douard authored
      Since all the listing tasks accepts an url as first argument (whatever the
      argument name is), it makes sense to use a simple common argument name for
      this. I've chosen 'url' instead of api_baseurl/forge_url/url.
      
      Also kill now useless `new_lister()` functions.
      b810876e
    • David Douard's avatar
      models: use the same declarative base class for all models · 631b8e76
      David Douard authored
      This is needed to fix the db-init implementation so the debian loader (which
      does use the SQLBase from swh.storage) have its models declared in the
      MetaData used by the initialize() function.
      631b8e76
    • David Douard's avatar
      cgit: reduce the batch size to 10 and add a bit of logging · bd118303
      David Douard authored
      Since the CGit lister now perform an HTTP query for each git repos listed in
      the main index, it is significantly slower, so reducing the time between
      database commits make sense, and won't overload the database.
      
      With a bit of logging, it makes it easier to follow/debug the progress of
      a listing.
      bd118303
    • David Douard's avatar
      plugins: add support for scheduler's task-type declaration · 8d9deeb8
      David Douard authored
      Add a new register-task-types cli that will create missing task-type entries in the
      scheduler according to:
      
      - only create missing task-types (do not update them), but check that the
        backend_name field is consistent,
      - each SWHTask-based task declared in a module listed in the 'task_modules'
        plugin registry field will be checked and added if needed; tasks which name
        start wit an underscore will not be added,
      - added task-type will have:
        - the 'type' field is derived from the task's function name (with underscores
          replaced with dashes),
        - the description field is the first line of that function's docstring,
        - default values as provided by the swh.lister.cli.DEFAULT_TASK_TYPE (with
          a simple pattern matching to have decent default values for full/incremental
          tasks),
        - these default values can be overloaded via the 'task_type' plugin registry
          entry.
      
      For this, we had to rename all tasks names (eg. `cran_lister` -> `list_cran`).
      
      Comes with some tests.
      8d9deeb8
  7. Sep 03, 2019
    • David Douard's avatar
      implement listers as plugins · e3c0ea9d
      David Douard authored
      Listers are declared as plugins via the `swh.workers` entry_point.
      
      As such, the registry function is expected to return a dict with the
      `task_modules` field (as for generic worker plugins), plus:
      
      - `lister`: the lister class,
      - `models`: list of SQLAlchemy models used by this lister,
      - `init` (optionnal): hook (callable) used to initialize the lister's state
        (typically, create/initialize the database for this lister).
        If not set, the default implementation creates database tables (after
        optionally having deleted exisintg ones) according to models declared in
        the `models` register field.
      
      There is no need for explicitely add lister task modules in the main
      `conftest` module, but any new/extra lister to be tested must be registered
      (the tested lister module must be properly installed in the test environment).
      
      Also refactor a bit the cli tools:
      - add support for the standard --config-file option at the 'lister' group
        level,
      - move the --db-url to the 'lister' group,
      - drop the --lister option for the `swh lister db-init` cli tool:
        initializing (especially with --drop-tables) the database for a single
        lister is unreliable, since all tables are created using a sibgle MetaData
        (in the same namespace).
      e3c0ea9d
    • David Douard's avatar
      npm: make NpmVisitModel use the main declarative base class from core.models · c67a926f
      David Douard authored
      This is needed by the (refactored) db init mechanism, since this later uses
      the main declarative base class (thus the main MetaData instance) to gather
      tables to be created/dropped.
      c67a926f
    • David Douard's avatar
      phabricator: fix the FullPhabricatorLister task · 342964ed
      David Douard authored
      forgot the forge_url -> api_baseurl renaming in there.
      342964ed
    • David Douard's avatar
      cgit: fix cgit's task module and tests · 8785fc1a
      David Douard authored
      forgot some `url_prefix` there.
      8785fc1a
  8. Sep 02, 2019
  9. Aug 30, 2019
  10. Aug 29, 2019
  11. Aug 28, 2019
  12. Jul 19, 2019
    • Archit Agrawal's avatar
      swh.lister.packagist · 5727f15c
      Archit Agrawal authored
      Implement a packagist lister to list the
      names and metadata url of all the
      packages.
      
      Closes 1776
      5727f15c
  13. Jul 18, 2019
  14. Jul 11, 2019
  15. Jul 04, 2019
  16. Jun 28, 2019
Loading