Skip to content
Snippets Groups Projects

cli: Use memory storage as fallback when no configuration detected

1 unresolved thread

It enables to quickly test loaders through the CLI: swh loader run load-<type> <url>.

Also fix a debug log template.


Migrated from D8600 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
93 93
94 94 conf = ctx.obj.get("config", {})
95 95 if "storage" not in conf:
96 raise ValueError("Missing storage configuration key")
96 logger.warning(
97 "No storage configuration detected, using an in-memory storage instead."
98 )
99 conf["storage"] = {"cls": "memory"}
  • Merge request was accepted

  • vlorentz approved this merge request

    approved this merge request

  • Author Maintainer

    Use warning log level instead of info.

  • Build is green

    Patch application report for D8600 (id=31066)

    Rebasing onto f6a3ed11...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 13e9bf4d698d638ddd5e6107830c6dc4d2878f05
    Author: Antoine Lambert <anlambert@softwareheritage.org>
    Date:   Mon Oct 3 13:58:38 2022 +0200
    
        cli: Use memory storage as fallback when no configuration detected
        
        Also fix a debug log template.

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

  • Author Maintainer

    Merge request was merged

  • Please register or sign in to reply
    Loading