Make `swh db init` command work *properly* with the --dbname option
This allows to run the command swh db init --dname DBURI
without
giving a configuration file AND properly set the db version, which
can be handy some times when testing.
Note that this may not work for all swh packages, when the postgresql backend for the given swh package needs more configuration entries than just the psql connection string.
This more or less drop support for "old style" db sql init scripts:
- the
swh db init
will still work for an 'old style' package (in which the sql init scripts do create dbversio table and initialize it) but will display an error message, - the --initial-version option has been dropped, since this made sense only for old style packages,
- the test data 'cli_new' has been renamed as 'cli' (in place of the previous "old style" one)
Merge request reports
Activity
Jenkins job DCORE/gitlab-builds #96 failed .
See Console Output and Coverage Report for more details.mentioned in merge request swh-storage!1063 (merged)
- Resolved by David Douard
Makes sense. Probably worth a test?
added 1 commit
- 310b67a4 - Make `swh db init` command work properly with the --dbname option
Jenkins job DCORE/gitlab-builds #97 failed .
See Console Output and Coverage Report for more details.added 1 commit
- e55829de - Make `swh db init` command work properly with the --dbname option
Jenkins job DCORE/gitlab-builds #98 failed .
See Console Output and Coverage Report for more details.added 1 commit
- 9725ed39 - Make `swh db init` command work properly with the --dbname option
Jenkins job DCORE/gitlab-builds #99 succeeded .
See Console Output and Coverage Report for more details.added 1 commit
- 5b8e7259 - Make `swh db init` command work properly with the --dbname option
Jenkins job DCORE/gitlab-builds #100 succeeded .
See Console Output and Coverage Report for more details.Looks fine to me.
You've kept a bunch of single-argument
pytest.mark.parametrize
decorators, it may be worth getting rid of them in a follow-up commit.The updated docs and commit message use
--dbname
and--db-name
mixed together, we should pick one and use it consistently (I guess the version without the extra hyphen)Commit message review
Make
swh db init
command work properly with the --dbname optionThis allows to run the command
swh db init --dname DBURI
without giving a configuration file AND properly set the db version, which can be handy some times when testing.AND properly set the dbversion > while still populating the dbversion table in the database
Note that this may not work for all swh packages, when the postgresql backend for the given swh package needs more configuration entries than just the psql connection string.
This more or less drop support for "old style" db sql init scripts:
drop > drops
- the
swh db init
will still work for an 'old style' package (in which the sql init scripts do create dbversio table and initialize it) but will display an error message,
dbversio > dbversion
(do we still have old-style packages?)
- the --initial-version option has been dropped, since this made sense only for old style packages,
- the test data 'cli_new' has been renamed as 'cli' (in place of the previous "old style" one)
- the
Jenkins job DCORE/gitlab-builds #101 succeeded .
See Console Output and Coverage Report for more details.