Skip to content

Allow module to specify another config key than their module name

Some module cannot just define their module db configuration key entry as their module name because they define more services than just their db (e.g. indexer, scrubber, ...)

Related to T4284

Test Plan

scrubber0.staging patched and it's happy with the fix:

swhworker@scrubber0:~$ swh db --config-file /etc/softwareheritage/scrubber/postgres.yml \
  version scrubber
Usage: swh db version [OPTIONS] MODULE

Error: Invalid value: Configuration cls must be set to 'postgresql' for this command.

swhworker@scrubber0:~$ swh db --config-file /etc/softwareheritage/scrubber/postgres.yml \
  version scrubber --module-config-key=scrubber_db
module: scrubber
current code version: 2
version: 1

Migrated from D7910 (view on Phabricator)

Merge request reports