Skip to content
Snippets Groups Projects

backend: Move postgresql backend initialization in a separate class

Merged Antoine Lambert requested to merge anlambert/swh-vault:vault-backend-datastore into master

Since commit swh-core@89d48572, the swh db init command attempts to instantiate the postgresql backend of a swh module using the get_datastore function of the module with a cls and db parameters.

While it works fine for most of swh modules, it does not for the vault as more parameters are expected by the get_vault function and thus the database init is failing. The issue was spotted in the docker environment after updating the swh/stack image.

So extract postgresql backend initialization for the vault in a new class named VaultBackendDataStore and set it as swh.vault.get_datastore attribute value.

Related to swh-environment!274 (merged)

Edited by Antoine Lambert

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
Please register or sign in to reply
Loading