Skip to content

Make swh db init and swh db-init behavior much closer to one another

While named similarly, these two CLI utilities used to take quite a different approach to doing the same thing.

They now both call out the same initialization function for a given module. The main difference is now the source of information for what databases to initialize: swh db init uses the SWH_CONFIG_FILENAME configuration file, while swh db-init only uses its own command line arguments.

(also sneak in a cosmetic change in a separate commit to db_testing.swh_db_version)

Test Plan

  • reviewed the use of swh db init and swh db-init in all modules and their documentation; All documented usage is still valid.
  • ran the docker initialization with the new swh-core which worked fine

Migrated from D3970 (view on Phabricator)

Merge request reports